Try again to fix the --local behavior.
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-doc
23 install: install-local-test build install-bin install-lib install-doc
25 clean: clean-bin clean-lib clean-doc
30 uninstall: uninstall-bin uninstall-lib uninstall-doc
32 ###############################################################################
35 #--------------------------------------
43 build-doc: docs/ct-ng.1
47 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
48 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
49 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
50 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
51 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
52 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
53 -e 's,@@CT_DATE@@,$(DATE),g;' \
56 #--------------------------------------
67 #--------------------------------------
70 # If using localy, don't install
72 @if [ "$(LOCAL)" = "1" ]; then \
73 echo "You're using local copy as runtime. You can't install."; \
77 install-bin: install-local-test $(BINDIR)
79 @install -m 755 ct-ng $(BINDIR)/ct-ng
81 install-lib: install-local-test $(LIBDIR) install-lib-main install-lib-samples
83 install-lib-main: install-local-test $(LIBDIR)
84 @for src_dir in config kconfig patches scripts tools; do \
85 echo " INST $${src_dir}/"; \
86 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
88 @rm -f $(LIBDIR)/tools/addToolVersion.sh
89 @for src_file in steps.mk version; do \
90 echo " INST $${src_file}"; \
91 install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
94 # Samples need a little love:
95 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
96 install-lib-samples: install-local-test $(LIBDIR) install-lib-main
97 @echo " INST samples/"
98 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
99 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
100 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
103 install-doc: install-local-test $(DOCDIR)
104 @for doc_file in docs/CREDITS docs/overview.txt; do \
105 echo " INST $${doc_file}"; \
106 install -m 644 "$${doc_file}" $(DOCDIR); \
109 install-man: install-local-test $(MANDIR)
110 @echo " INST ct-ng.1"
111 @install -m 644 docs/ct-ng.1 $(MANDIR)
113 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
115 @install -m 755 -d $@
118 #--------------------------------------
122 @rm -f $(BINDIR)/ct-ng
123 @rm -f $(BINDIR)/ct-ng.extract-config
130 @rm -f $(MANDIR)/ct-ng.1