No need to expand the host cc every time.
1 # Makefile.in for building crosstool-NG
2 # This file serves as source for the ./configure operation
6 ###############################################################################
7 # Configuration variables
15 MAKE := $(shell which make || type -p make || echo /usr/bin/make)
17 ###############################################################################
20 build: build-bin build-lib build-doc
22 install: build install-bin install-lib install-doc
24 clean: clean-bin clean-lib clean-doc
29 uninstall: uninstall-bin uninstall-lib uninstall-doc
31 ###############################################################################
34 #--------------------------------------
42 build-doc: docs/ct-ng.1
46 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
47 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
48 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
49 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
50 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
51 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
52 -e 's,@@CT_DATE@@,$(DATE),g;' \
55 #--------------------------------------
66 #--------------------------------------
69 install-bin: $(BINDIR)
71 @install -m 755 ct-ng $(BINDIR)/ct-ng
73 install-lib: $(LIBDIR) install-lib-main install-lib-samples
75 install-lib-main: $(LIBDIR)
76 @for src_dir in config kconfig patches scripts tools; do \
77 echo " INST $${src_dir}/"; \
78 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
80 @rm -f $(LIBDIR)/tools/addToolVersion.sh
81 @for src_file in steps.mk version; do \
82 echo " INST $${src_file}"; \
83 install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
86 # Samples need a little love:
87 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
88 install-lib-samples: $(LIBDIR) install-lib-main
89 @echo " INST samples/"
90 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
91 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
92 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
95 install-doc: install-man $(DOCDIR)
96 @for doc_file in CREDITS docs/overview.txt; do \
97 echo " INST $${doc_file}"; \
98 install -m 644 "$${doc_file}" $(DOCDIR); \
101 install-man: $(MANDIR)
102 @echo " INST ct-ng.1"
103 @install -m 644 docs/ct-ng.1 $(MANDIR)
105 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
107 @install -m 755 -d $@
110 #--------------------------------------
114 @rm -f $(BINDIR)/ct-ng
115 @rm -f $(BINDIR)/ct-ng.extract-config
122 @rm -f $(MANDIR)/ct-ng.1