ct-ng.in
changeset 333 d647d0e6021e
parent 289 a9a0a0714860
child 334 49b354cfd34d
     1.1 --- a/ct-ng.in	Mon Jul 23 09:46:05 2007 +0000
     1.2 +++ b/ct-ng.in	Wed Aug 15 14:59:37 2007 +0000
     1.3 @@ -41,7 +41,7 @@
     1.4  
     1.5  help-build::
     1.6  	@echo
     1.7 -	@echo  'Build actions:'
     1.8 +	@echo  'Build actions (#: force number of // jobs):'
     1.9  
    1.10  help-clean::
    1.11  	@echo
    1.12 @@ -65,32 +65,39 @@
    1.13  # End help system
    1.14  
    1.15  help-build::
    1.16 -	@echo  '  build          - Build the toolchain'
    1.17 +	@echo  '  build[.#]          - Build the toolchain'
    1.18  
    1.19  help-clean::
    1.20 -	@echo  '  clean          - Remove generated files'
    1.21 -	@echo  '  distclean      - Remove generated files, configuration and build directories'
    1.22 +	@echo  '  clean              - Remove generated files'
    1.23 +	@echo  '  distclean          - Remove generated files, configuration and build directories'
    1.24  
    1.25  include $(CT_LIB_DIR)/kconfig/kconfig.mk
    1.26 +include $(CT_LIB_DIR)/steps.mk
    1.27  include $(CT_LIB_DIR)/samples/samples.mk
    1.28  include $(CT_LIB_DIR)/tools/tools.mk
    1.29 -include $(CT_LIB_DIR)/steps.mk
    1.30  
    1.31  help-distrib::
    1.32 -	@echo  '  tarball        - Build a tarball of the configured toolchain'
    1.33 +	@echo  '  tarball            - Build a tarball of the configured toolchain'
    1.34  
    1.35  help-env::
    1.36 -	@echo  '  STOP           - Stop the build just after this step'
    1.37 -	@echo  '  RESTART        - Restart the build just before this step'
    1.38 +	@echo  '  STOP               - Stop the build just after this step'
    1.39 +	@echo  '  RESTART            - Restart the build just before this step'
    1.40  
    1.41  .config:
    1.42  	@echo  'You must run either one of "$(CT_NG) config" or "$(CT_NG) menuconfig" first'
    1.43  	@false
    1.44  
    1.45  # Actual build
    1.46 +ifeq ($(CT_JOBS),)
    1.47 +CT_JOBS:=1
    1.48 +endif
    1.49 +export CT_JOBS
    1.50  build:: .config
    1.51  	@$(CT_LIB_DIR)/scripts/crosstool.sh
    1.52  
    1.53 +build.%::
    1.54 +	@$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
    1.55 +
    1.56  PHONY += tarball
    1.57  #tarball:
    1.58  #	@$(CT_LIB_DIR)/scripts/tarball.sh