summaryrefslogtreecommitdiff
path: root/ct-ng.in
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-15 21:29:56 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-15 21:29:56 (GMT)
commit4e7d6836a5d1b2bf5dd0ed181a4263ce7b305cd6 (patch)
treef6bb12ede31697ffa3735d15a910a12890d680cc /ct-ng.in
parentb77f4abe34a7d415486f505e2fb11c09114318c6 (diff)
Cheesy kconfig stuff:
- silent/quiet/verbose build: - ct-ng by default only prints quit messages, such as "CC xxx", - if using V=0, nothing is printed, - if using V=1, the full command lines are printed, - other values are indeterminate, - should help in debugging the kconfig stuff; - complete kconfig/{,m}conf generation: - fully dynamic dependencies on source files, - compilation of .c into .o, then linking (instead of direct linking), - VPATH usage when not --local; Typo + a coment moved. /trunk/kconfig/kconfig.mk | 140 87 53 0 +++++++++++++++++++++++++++++++++-------------------- /trunk/tools/tools.mk | 12 6 6 0 ++-- /trunk/steps.mk | 6 3 3 0 +- /trunk/samples/samples.mk | 30 15 15 0 +++++----- /trunk/ct-ng.in | 40 28 12 0 +++++++++++---- 5 files changed, 139 insertions(+), 89 deletions(-)
Diffstat (limited to 'ct-ng.in')
-rw-r--r--ct-ng.in40
1 files changed, 28 insertions, 12 deletions
diff --git a/ct-ng.in b/ct-ng.in
index a6d9820..2a29f2a 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -27,13 +27,27 @@ export CT_VERSION:=@@CT_VERSION@@
export CT_STOP:=$(STOP)
export CT_RESTART:=$(RESTART)
+ifeq ($(strip $(V)),)
+ SILENT=@
+ ECHO=echo
+else
+ ifeq ($(strip $(V)),0)
+ SILENT=@
+ ECHO=:
+ else
+ ifeq ($(strip $(V)),1)
+ SILENT=
+ ECHO=:
+ endif)
+ endif
+endif
+export V
+
.FORCE:
.PHONY: $(PHONY)
PHONY += all
all: help
-HOST_CC := gcc -funsigned-char
-
# Help system
help:: help-head help-config help-samples help-build help-clean help-distrib help-env help-tail
@@ -71,8 +85,6 @@ help-tail::
@echo 'Use action "version" to see the version'
@echo 'See "man 1 ct-ng" for some help as well'
-# End help system
-
help-build::
@echo ' build[.#] - Build the toolchain'
@@ -92,22 +104,24 @@ help-env::
@echo ' STOP - Stop the build just after this step'
@echo ' RESTART - Restart the build just before this step'
+# End help system
+
.config:
@echo 'You must run either one of "$(CT_NG) config" or "$(CT_NG) menuconfig" first'
@false
# Actual build
build: .config
- @$(CT_LIB_DIR)/scripts/crosstool.sh
+ $(SILENT)$(CT_LIB_DIR)/scripts/crosstool.sh
build.%:
- @$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
+ $(SILENT)$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
PHONY += tarball
#tarball:
# @$(CT_LIB_DIR)/scripts/tarball.sh
tarball:
- @echo 'Tarbal creation disabled for now... Sorry.'
+ @echo 'Tarball creation disabled for now... Sorry.'
@true
PHONY += version
@@ -122,11 +136,13 @@ version:
PHONY += clean
clean::
- @rm -f $(CT_TOP_DIR)/.config.*
+ $(SILENT)rm -f .config.*
PHONY += distclean
distclean:: clean
- @rm -f $(CT_TOP_DIR)/.config* $(CT_TOP_DIR)/..config.tmp
- @rm -f $(CT_TOP_DIR)/log.*
- @[ ! -d "$(CT_TOP_DIR)/targets" ] || chmod -R u+w "$(CT_TOP_DIR)/targets"
- @rm -rf "$(CT_TOP_DIR)/targets"
+ @$(ECHO) " CLEAN .config log"
+ $(SILENT)rm -f .config* ..config.tmp
+ $(SILENT)rm -f log.*
+ @$(ECHO) " CLEAN targets"
+ $(SILENT)chmod -R u+w targets >/dev/null 2>&1 || true
+ $(SILENT)rm -rf targets