Revert previous spurious commit.
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
30 uninstall: install-local-test uninstall-bin uninstall-lib uninstall-doc uninstall-man
32 ###############################################################################
35 #--------------------------------------
43 build-man: docs/ct-ng.1.gz
45 docs/ct-ng.1.gz: docs/ct-ng.1
51 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
52 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
53 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
54 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
55 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
56 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
57 -e 's,@@CT_DATE@@,$(DATE),g;' \
60 #--------------------------------------
69 @rm -f docs/ct-ng.1.gz
71 #--------------------------------------
74 # If using localy, don't install
76 @if [ "$(LOCAL)" = "1" ]; then \
77 echo "You're using local copy as runtime. You can't (un)install."; \
81 install-bin: install-local-test $(BINDIR)
83 @install -m 755 ct-ng $(BINDIR)/ct-ng
85 install-lib: install-local-test $(LIBDIR) install-lib-main install-lib-samples
87 install-lib-main: install-local-test $(LIBDIR)
88 @for src_dir in config kconfig patches scripts tools; do \
89 echo " INST $${src_dir}/"; \
90 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
92 @rm -f $(LIBDIR)/tools/addToolVersion.sh
93 @for src_file in steps.mk version; do \
94 echo " INST $${src_file}"; \
95 install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
98 # Samples need a little love:
99 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
100 install-lib-samples: install-local-test $(LIBDIR) install-lib-main
101 @echo " INST samples/"
102 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
103 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
104 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
107 install-doc: install-local-test $(DOCDIR)
108 @for doc_file in docs/CREDITS docs/overview.txt; do \
109 echo " INST $${doc_file}"; \
110 install -m 644 "$${doc_file}" $(DOCDIR); \
113 install-man: install-local-test $(MANDIR)
114 @echo " INST ct-ng.1.gz"
115 @install -m 644 docs/ct-ng.1.gz $(MANDIR)
117 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
119 @install -m 755 -d $@
122 #--------------------------------------
125 uninstall-bin: install-local-test
126 @rm -f $(BINDIR)/ct-ng
128 uninstall-lib: install-local-test
131 uninstall-doc: install-local-test
134 uninstall-man: install-local-test
135 @rm -f $(MANDIR)/ct-ng.1{,.gz}