summaryrefslogtreecommitdiff
path: root/ct-ng.in
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-08-15 14:59:37 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-08-15 14:59:37 (GMT)
commit54cca9f2ba0065fe34013bf712c181601a53c912 (patch)
tree0a95b5283796127fd97bcbca1b475e8d6e592916 /ct-ng.in
parent46e19208cd3a3f8634efa497ad49c25db8df9b5a (diff)
Add the possibility to force the number of // jobs without reconfiguring.
Diffstat (limited to 'ct-ng.in')
-rw-r--r--ct-ng.in23
1 files changed, 15 insertions, 8 deletions
diff --git a/ct-ng.in b/ct-ng.in
index bb39ba0..30b225e 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -41,7 +41,7 @@ help-samples::
help-build::
@echo
- @echo 'Build actions:'
+ @echo 'Build actions (#: force number of // jobs):'
help-clean::
@echo
@@ -65,32 +65,39 @@ help-tail::
# End help system
help-build::
- @echo ' build - Build the toolchain'
+ @echo ' build[.#] - Build the toolchain'
help-clean::
- @echo ' clean - Remove generated files'
- @echo ' distclean - Remove generated files, configuration and build directories'
+ @echo ' clean - Remove generated files'
+ @echo ' distclean - Remove generated files, configuration and build directories'
include $(CT_LIB_DIR)/kconfig/kconfig.mk
+include $(CT_LIB_DIR)/steps.mk
include $(CT_LIB_DIR)/samples/samples.mk
include $(CT_LIB_DIR)/tools/tools.mk
-include $(CT_LIB_DIR)/steps.mk
help-distrib::
- @echo ' tarball - Build a tarball of the configured toolchain'
+ @echo ' tarball - Build a tarball of the configured toolchain'
help-env::
- @echo ' STOP - Stop the build just after this step'
- @echo ' RESTART - Restart the build just before this step'
+ @echo ' STOP - Stop the build just after this step'
+ @echo ' RESTART - Restart the build just before this step'
.config:
@echo 'You must run either one of "$(CT_NG) config" or "$(CT_NG) menuconfig" first'
@false
# Actual build
+ifeq ($(CT_JOBS),)
+CT_JOBS:=1
+endif
+export CT_JOBS
build:: .config
@$(CT_LIB_DIR)/scripts/crosstool.sh
+build.%::
+ @$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
+
PHONY += tarball
#tarball:
# @$(CT_LIB_DIR)/scripts/tarball.sh