1.1 --- a/Makefile.in Wed Jun 11 20:40:38 2008 +0000
1.2 +++ b/Makefile.in Wed Jun 11 21:45:57 2008 +0000
1.3 @@ -1,6 +1,8 @@
1.4 # Makefile.in for building crosstool-NG
1.5 # This file serves as source for the ./configure operation
1.6
1.7 +MAKEFLAGS += --no-print-directory --no-builtin-rules
1.8 +
1.9 all: Makefile build
1.10
1.11 # Check if Makefile is up to date:
1.12 @@ -25,15 +27,15 @@
1.13
1.14 build: build-bin build-lib build-man
1.15
1.16 -install: install-local-test build install-bin install-lib install-doc install-man
1.17 +install: build install-bin install-lib install-doc install-man
1.18
1.19 clean: clean-bin clean-lib clean-doc
1.20
1.21 distclean: clean
1.22 - @echo " RM Makefile"
1.23 + @echo " RM 'Makefile'"
1.24 @rm -f Makefile
1.25
1.26 -uninstall: install-local-test uninstall-bin uninstall-lib uninstall-doc uninstall-man
1.27 +uninstall: uninstall-bin uninstall-lib uninstall-doc uninstall-man
1.28
1.29 ###############################################################################
1.30 # Specific make rules
1.31 @@ -42,7 +44,7 @@
1.32 # Build rules
1.33
1.34 build-bin: ct-ng
1.35 - @echo " CHMOD $<"
1.36 + @echo " CHMOD '$<'"
1.37 @chmod a+x $<
1.38
1.39 build-lib:
1.40 @@ -50,11 +52,11 @@
1.41 build-man: docs/ct-ng.1.gz
1.42
1.43 docs/ct-ng.1.gz: docs/ct-ng.1
1.44 - @echo " GZIP $@"
1.45 + @echo " GZIP '$@'"
1.46 @gzip -c9 $< >$@
1.47
1.48 %: %.in Makefile
1.49 - @echo " SED $@"
1.50 + @echo " SED '$@'"
1.51 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
1.52 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
1.53 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
1.54 @@ -68,79 +70,84 @@
1.55 # Clean rules
1.56
1.57 clean-bin:
1.58 - @echo " RM ct-ng"
1.59 + @echo " RM 'ct-ng'"
1.60 @rm -f ct-ng
1.61
1.62 clean-lib:
1.63
1.64 clean-doc:
1.65 - @echo " RM docs/ct-ng.1"
1.66 + @echo " RM 'docs/ct-ng.1'"
1.67 @rm -f docs/ct-ng.1
1.68 - @echo " RM docs/ct-ng.1.gz"
1.69 + @echo " RM 'docs/ct-ng.1.gz'"
1.70 @rm -f docs/ct-ng.1.gz
1.71
1.72 #--------------------------------------
1.73 -# Install rules
1.74 +# Check for --local setup
1.75
1.76 # If using locally, don't install
1.77 -install-local-test:
1.78 +local-test:
1.79 @if [ "$(LOCAL)" = "1" ]; then \
1.80 echo "You're using local copy as runtime. You can't (un)install."; \
1.81 false; \
1.82 fi
1.83
1.84 -install-%: install-local-test
1.85 +#--------------------------------------
1.86 +# Install rules
1.87 +
1.88 +install-%: local-test
1.89
1.90 install-bin: $(BINDIR)
1.91 - @echo " INST ct-ng"
1.92 - @install -m 755 ct-ng $(BINDIR)/ct-ng
1.93 + @echo " INST 'ct-ng'"
1.94 + @install -m 755 ct-ng "$(BINDIR)/ct-ng"
1.95
1.96 install-lib: uninstall-lib $(LIBDIR) install-lib-main install-lib-samples
1.97
1.98 install-lib-main: $(LIBDIR)
1.99 - @for src_dir in arch config kconfig patches scripts tools; do \
1.100 - echo " INST $${src_dir}/"; \
1.101 - tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
1.102 + @for src_dir in arch config kconfig patches scripts tools; do \
1.103 + echo " INST '$${src_dir}/'"; \
1.104 + tar cf - --exclude=.svn $${src_dir} |(cd "$(LIBDIR)"; tar xf -); \
1.105 done
1.106 - @rm -f $(LIBDIR)/tools/addToolVersion.sh
1.107 - @echo " INST steps.mk"
1.108 - @install -m 644 steps.mk $(LIBDIR)/steps.mk
1.109 + @rm -f "$(LIBDIR)/tools/addToolVersion.sh"
1.110 + @echo " INST 'steps.mk'"
1.111 + @install -m 644 steps.mk "$(LIBDIR)/steps.mk"
1.112
1.113 # Samples need a little love:
1.114 # - change every occurrence of CT_TOP_DIR to CT_LIB_DIR
1.115 install-lib-samples: $(LIBDIR) install-lib-main
1.116 - @echo " INST samples/"
1.117 - @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
1.118 - @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
1.119 + @echo " INST 'samples/'"
1.120 + @tar cf - --exclude=.svn samples |(cd "$(LIBDIR)"; tar xf -)
1.121 + @for samp_file in "$(LIBDIR)/samples/"*"/crosstool.config"; do \
1.122 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
1.123 done
1.124
1.125 install-doc: $(DOCDIR)
1.126 - @for doc_file in docs/CREDITS docs/overview.txt; do \
1.127 - echo " INST $${doc_file}"; \
1.128 - install -m 644 "$${doc_file}" $(DOCDIR); \
1.129 + @for doc_file in docs/CREDITS docs/overview.txt; do \
1.130 + echo " INST '$${doc_file}'"; \
1.131 + install -m 644 "$${doc_file}" "$(DOCDIR)"; \
1.132 done
1.133
1.134 install-man: $(MANDIR)
1.135 - @echo " INST ct-ng.1.gz"
1.136 - @install -m 644 docs/ct-ng.1.gz $(MANDIR)
1.137 + @echo " INST 'ct-ng.1.gz'"
1.138 + @install -m 644 docs/ct-ng.1.gz "$(MANDIR)"
1.139
1.140 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR)::
1.141 - @echo " MKDIR $@"
1.142 - @install -m 755 -d $@
1.143 + @echo " MKDIR '$@'"
1.144 + @install -m 755 -d "$@"
1.145
1.146
1.147 #--------------------------------------
1.148 # Uninstall rules
1.149
1.150 -uninstall-bin: install-local-test
1.151 - @rm -f $(BINDIR)/ct-ng
1.152 +uninstall-%: local-test
1.153
1.154 -uninstall-lib: install-local-test
1.155 - @rm -rf $(LIBDIR)
1.156 +uninstall-bin:
1.157 + @rm -f "$(BINDIR)/ct-ng"
1.158
1.159 -uninstall-doc: install-local-test
1.160 - @rm -rf $(DOCDIR)
1.161 +uninstall-lib:
1.162 + @rm -rf "$(LIBDIR)"
1.163
1.164 -uninstall-man: install-local-test
1.165 - @rm -f $(MANDIR)/ct-ng.1{,.gz}
1.166 +uninstall-doc:
1.167 + @rm -rf "$(DOCDIR)"
1.168 +
1.169 +uninstall-man:
1.170 + @rm -f "$(MANDIR)/ct-ng.1"{,.gz}