Apply some scosmetic changes, courtesy Al Stone <ahs3@ahs3.net>.
1 # Makefile.in for building crosstool-NG
2 # This file serves as source for the ./configure operation
6 ###############################################################################
7 # Configuration variables
16 MAKE := $(shell which $(MAKE) || type -p $(MAKE) || echo /usr/bin/make)
18 ###############################################################################
21 build: build-bin build-lib build-man
23 install: install-local-test build install-bin install-lib install-doc install-man
25 clean: clean-bin clean-lib clean-doc
31 uninstall: install-local-test uninstall-bin uninstall-lib uninstall-doc uninstall-man
33 ###############################################################################
36 #--------------------------------------
45 build-man: docs/ct-ng.1.gz
47 docs/ct-ng.1.gz: docs/ct-ng.1
53 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
54 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
55 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
56 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
57 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
58 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
59 -e 's,@@CT_DATE@@,$(DATE),g;' \
62 #--------------------------------------
72 @echo " RM docs/ct-ng.1"
74 @echo " RM docs/ct-ng.1.gz"
75 @rm -f docs/ct-ng.1.gz
77 #--------------------------------------
80 # If using localy, don't install
82 @if [ "$(LOCAL)" = "1" ]; then \
83 echo "You're using local copy as runtime. You can't (un)install."; \
87 install-bin: install-local-test $(BINDIR)
89 @install -m 755 ct-ng $(BINDIR)/ct-ng
91 install-lib: install-local-test $(LIBDIR) install-lib-main install-lib-samples
93 install-lib-main: install-local-test $(LIBDIR)
94 @for src_dir in config kconfig patches scripts tools; do \
95 echo " INST $${src_dir}/"; \
96 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
98 @rm -f $(LIBDIR)/tools/addToolVersion.sh
99 @for src_file in steps.mk .version; do \
100 echo " INST $${src_file}"; \
101 install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
104 # Samples need a little love:
105 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
106 install-lib-samples: install-local-test $(LIBDIR) install-lib-main
107 @echo " INST samples/"
108 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
109 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
110 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
113 install-doc: install-local-test $(DOCDIR)
114 @for doc_file in docs/CREDITS docs/overview.txt; do \
115 echo " INST $${doc_file}"; \
116 install -m 644 "$${doc_file}" $(DOCDIR); \
119 install-man: install-local-test $(MANDIR)
120 @echo " INST ct-ng.1.gz"
121 @install -m 644 docs/ct-ng.1.gz $(MANDIR)
123 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
125 @install -m 755 -d $@
128 #--------------------------------------
131 uninstall-bin: install-local-test
132 @rm -f $(BINDIR)/ct-ng
134 uninstall-lib: install-local-test
137 uninstall-doc: install-local-test
140 uninstall-man: install-local-test
141 @rm -f $(MANDIR)/ct-ng.1{,.gz}