1.1 --- a/ct-ng.in Tue Oct 14 19:29:25 2008 +0000
1.2 +++ b/ct-ng.in Wed Oct 15 21:29:56 2008 +0000
1.3 @@ -27,13 +27,27 @@
1.4 export CT_STOP:=$(STOP)
1.5 export CT_RESTART:=$(RESTART)
1.6
1.7 +ifeq ($(strip $(V)),)
1.8 + SILENT=@
1.9 + ECHO=echo
1.10 +else
1.11 + ifeq ($(strip $(V)),0)
1.12 + SILENT=@
1.13 + ECHO=:
1.14 + else
1.15 + ifeq ($(strip $(V)),1)
1.16 + SILENT=
1.17 + ECHO=:
1.18 + endif)
1.19 + endif
1.20 +endif
1.21 +export V
1.22 +
1.23 .FORCE:
1.24 .PHONY: $(PHONY)
1.25 PHONY += all
1.26 all: help
1.27
1.28 -HOST_CC := gcc -funsigned-char
1.29 -
1.30 # Help system
1.31 help:: help-head help-config help-samples help-build help-clean help-distrib help-env help-tail
1.32
1.33 @@ -71,8 +85,6 @@
1.34 @echo 'Use action "version" to see the version'
1.35 @echo 'See "man 1 ct-ng" for some help as well'
1.36
1.37 -# End help system
1.38 -
1.39 help-build::
1.40 @echo ' build[.#] - Build the toolchain'
1.41
1.42 @@ -92,22 +104,24 @@
1.43 @echo ' STOP - Stop the build just after this step'
1.44 @echo ' RESTART - Restart the build just before this step'
1.45
1.46 +# End help system
1.47 +
1.48 .config:
1.49 @echo 'You must run either one of "$(CT_NG) config" or "$(CT_NG) menuconfig" first'
1.50 @false
1.51
1.52 # Actual build
1.53 build: .config
1.54 - @$(CT_LIB_DIR)/scripts/crosstool.sh
1.55 + $(SILENT)$(CT_LIB_DIR)/scripts/crosstool.sh
1.56
1.57 build.%:
1.58 - @$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
1.59 + $(SILENT)$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
1.60
1.61 PHONY += tarball
1.62 #tarball:
1.63 # @$(CT_LIB_DIR)/scripts/tarball.sh
1.64 tarball:
1.65 - @echo 'Tarbal creation disabled for now... Sorry.'
1.66 + @echo 'Tarball creation disabled for now... Sorry.'
1.67 @true
1.68
1.69 PHONY += version
1.70 @@ -122,11 +136,13 @@
1.71
1.72 PHONY += clean
1.73 clean::
1.74 - @rm -f $(CT_TOP_DIR)/.config.*
1.75 + $(SILENT)rm -f .config.*
1.76
1.77 PHONY += distclean
1.78 distclean:: clean
1.79 - @rm -f $(CT_TOP_DIR)/.config* $(CT_TOP_DIR)/..config.tmp
1.80 - @rm -f $(CT_TOP_DIR)/log.*
1.81 - @[ ! -d "$(CT_TOP_DIR)/targets" ] || chmod -R u+w "$(CT_TOP_DIR)/targets"
1.82 - @rm -rf "$(CT_TOP_DIR)/targets"
1.83 + @$(ECHO) " CLEAN .config log"
1.84 + $(SILENT)rm -f .config* ..config.tmp
1.85 + $(SILENT)rm -f log.*
1.86 + @$(ECHO) " CLEAN targets"
1.87 + $(SILENT)chmod -R u+w targets >/dev/null 2>&1 || true
1.88 + $(SILENT)rm -rf targets