Introduce the notion of tols facilities (none so far, sstrip coming right away...).
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Jun 01 16:55:33 2007 +0000 (2007-06-01)
changeset 148567f1673d59d
parent 147 39e4ef7d6d8d
child 149 39d8baac9c69
Introduce the notion of tols facilities (none so far, sstrip coming right away...).
Makefile.steps
config/config.in
docs/overview.txt
kconfig/Makefile
scripts/build/tools.sh
scripts/crosstool.sh
     1.1 --- a/Makefile.steps	Fri Jun 01 16:50:29 2007 +0000
     1.2 +++ b/Makefile.steps	Fri Jun 01 16:55:33 2007 +0000
     1.3 @@ -13,6 +13,7 @@
     1.4  libc                    \
     1.5  cc                      \
     1.6  libc_finish             \
     1.7 +tools                   \
     1.8  debug                   \
     1.9  :
    1.10  	@make -C "$(CT_TOP_DIR)" RESTART=$@ STOP=$@
    1.11 @@ -29,6 +30,7 @@
    1.12  -libc                   \
    1.13  -cc                     \
    1.14  -libc_finish            \
    1.15 +-tools                  \
    1.16  -debug                  \
    1.17  :
    1.18  	@make -C "$(CT_TOP_DIR)" STOP=$(patsubst -%,%,$@)
    1.19 @@ -45,6 +47,7 @@
    1.20  libc-                   \
    1.21  cc-                     \
    1.22  libc_finish-            \
    1.23 +tools-                  \
    1.24  debug-                  \
    1.25  :
    1.26  	@make -C "$(CT_TOP_DIR)" RESTART=$(patsubst %-,%,$@)
     2.1 --- a/config/config.in	Fri Jun 01 16:50:29 2007 +0000
     2.2 +++ b/config/config.in	Fri Jun 01 16:55:33 2007 +0000
     2.3 @@ -5,4 +5,5 @@
     2.4  source config/binutils.in
     2.5  source config/cc.in
     2.6  source config/libc.in
     2.7 +source config/tools.in
     2.8  source config/debug.in
     3.1 --- a/docs/overview.txt	Fri Jun 01 16:50:29 2007 +0000
     3.2 +++ b/docs/overview.txt	Fri Jun 01 16:55:33 2007 +0000
     3.3 @@ -135,6 +135,7 @@
     3.4    - libc
     3.5    - cc
     3.6    - libc_finish
     3.7 +  - tools
     3.8    - debug
     3.9  
    3.10  Alternatively, you can call make with the name of a step to just do that step:
    3.11 @@ -144,9 +145,9 @@
    3.12  
    3.13  The shortcuts -step_name and step_name- allow to respectively stop or restart
    3.14  at that step. Thus:
    3.15 -  make -libc_headers         make libc_headers-
    3.16 +  make -libc_headers        and:    make libc_headers-
    3.17  are equivalent to:
    3.18 -  make STOP=libc_headers     make RESTART=libc_headers
    3.19 +  make STOP=libc_headers    and:    make RESTART=libc_headers
    3.20  
    3.21  ____________________________
    3.22                             /
     4.1 --- a/kconfig/Makefile	Fri Jun 01 16:50:29 2007 +0000
     4.2 +++ b/kconfig/Makefile	Fri Jun 01 16:55:33 2007 +0000
     4.3 @@ -2,6 +2,9 @@
     4.4  # crosstool-ng configuration targets
     4.5  # These targets are used from top-level makefile
     4.6  
     4.7 +# Derive the project version from, well, the project version:
     4.8 +export PROJECTVERSION=$(CT_VERSION)
     4.9 +
    4.10  KCONFIG_TOP = config/config.in
    4.11  obj = ./kconfig
    4.12  PHONY += clean help oldconfig menuconfig config silentoldconfig \
    4.13 @@ -18,11 +21,14 @@
    4.14  
    4.15  # Build a list of all config files
    4.16  CONFIG_FILES = $(filter-out %debug.in,$(shell find $(CT_TOP_DIR)/config -type f -name '*.in'))
    4.17 +DEBUG_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/debug -type f -name '*.in')
    4.18 +TOOLS_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/tools -type f -name '*.in')
    4.19  
    4.20 -# Derive the project version from, well, the project version:
    4.21 -export PROJECTVERSION=$(CT_VERSION)
    4.22 +.PHONY: generated_config_files
    4.23 +generated_config_files: $(CT_TOP_DIR)/config/debug.in	\
    4.24 +						$(CT_TOP_DIR)/config/tools.in
    4.25  
    4.26 -$(CT_TOP_DIR)/config/debug.in: $(CONFIG_FILES)
    4.27 +$(CT_TOP_DIR)/config/debug.in: $(DEBUG_CONFIG_FILES)
    4.28  	@echo "# Debug facilities menu" >$@
    4.29  	@echo "# Generated file, do not edit!!!" >>$@
    4.30  	@echo "menu \"Debug facilities\"" >>$@
    4.31 @@ -31,13 +37,22 @@
    4.32  	 done >>$@
    4.33  	@echo "endmenu" >>$@
    4.34  
    4.35 -menuconfig: $(obj)/mconf $(CT_TOP_DIR)/config/debug.in
    4.36 +$(CT_TOP_DIR)/config/tools.in: $(TOOLS_CONFIG_FILES)
    4.37 +	@echo "# Tools facilities menu" >$@
    4.38 +	@echo "# Generated file, do not edit!!!" >>$@
    4.39 +	@echo "menu \"Tools facilities\"" >>$@
    4.40 +	@for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/tools/*.in)); do \
    4.41 +	     echo "source $${f}";                                                               \
    4.42 +	 done >>$@
    4.43 +	@echo "endmenu" >>$@
    4.44 +
    4.45 +menuconfig: $(obj)/mconf generated_config_files
    4.46  	@$< $(KCONFIG_TOP)
    4.47  
    4.48 -config: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
    4.49 +config: $(obj)/conf generated_config_files
    4.50  	@$< $(KCONFIG_TOP)
    4.51  
    4.52 -oldconfig: $(obj)/conf $(CT_TOP_DIR)/config/debug.in
    4.53 +oldconfig: $(obj)/conf generated_config_files
    4.54  	@$< -s $(KCONFIG_TOP)
    4.55  
    4.56  # Help text used by make help
    4.57 @@ -66,4 +81,4 @@
    4.58  
    4.59  clean::
    4.60  	@rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}
    4.61 -	@rm -f "$(CT_TOP_DIR)/config/debug.in"
    4.62 +	@rm -f "$(CT_TOP_DIR)/config/debug.in" "$(CT_TOP_DIR)/config/tools.in"
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/scripts/build/tools.sh	Fri Jun 01 16:55:33 2007 +0000
     5.3 @@ -0,0 +1,34 @@
     5.4 +# Wrapper to build the tools facilities
     5.5 +
     5.6 +# List all tools facilities, and parse their scripts
     5.7 +CT_TOOLS_FACILITY_LIST=
     5.8 +for f in "${CT_TOP_DIR}/scripts/build/tools/"*.sh; do
     5.9 +    is_enabled=
    5.10 +    . "${f}"
    5.11 +    f=`basename "${f}" .sh`
    5.12 +    if [ "${is_enabled}" = "y" ]; then
    5.13 +        CT_TOOLS_FACILITY_LIST="${CT_TOOLS_FACILITY_LIST} ${f}"
    5.14 +    fi
    5.15 +done
    5.16 +
    5.17 +# Download the tools facilities
    5.18 +do_tools_get() {
    5.19 +    for f in ${CT_TOOLS_FACILITY_LIST}; do
    5.20 +        do_tools_${f}_get
    5.21 +    done
    5.22 +}
    5.23 +
    5.24 +# Extract and patch the tools facilities
    5.25 +do_tools_extract() {
    5.26 +    for f in ${CT_TOOLS_FACILITY_LIST}; do
    5.27 +        do_tools_${f}_extract
    5.28 +    done
    5.29 +}
    5.30 +
    5.31 +# Build the tools facilities
    5.32 +do_tools() {
    5.33 +    for f in ${CT_TOOLS_FACILITY_LIST}; do
    5.34 +        do_tools_${f}_build
    5.35 +    done
    5.36 +}
    5.37 +
     6.1 --- a/scripts/crosstool.sh	Fri Jun 01 16:50:29 2007 +0000
     6.2 +++ b/scripts/crosstool.sh	Fri Jun 01 16:55:33 2007 +0000
     6.3 @@ -363,6 +363,7 @@
     6.4  . "${CT_TOP_DIR}/scripts/build/cc_core_${CT_CC_CORE}.sh"
     6.5  . "${CT_TOP_DIR}/scripts/build/cc_${CT_CC}.sh"
     6.6  . "${CT_TOP_DIR}/scripts/build/debug.sh"
     6.7 +. "${CT_TOP_DIR}/scripts/build/tools.sh"
     6.8  
     6.9  if [ -z "${CT_RESTART}" ]; then
    6.10      CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
    6.11 @@ -372,6 +373,7 @@
    6.12      do_libfloat_get
    6.13      do_libc_get
    6.14      do_cc_get
    6.15 +    do_tools_get
    6.16      do_debug_get
    6.17      CT_EndStep
    6.18  
    6.19 @@ -387,6 +389,7 @@
    6.20          do_libfloat_extract
    6.21          do_libc_extract
    6.22          do_cc_extract
    6.23 +        do_tools_extract
    6.24          do_debug_extract
    6.25          CT_EndStep
    6.26      fi
    6.27 @@ -410,6 +413,7 @@
    6.28                  libc                    \
    6.29                  cc                      \
    6.30                  libc_finish             \
    6.31 +                tools                   \
    6.32                  debug                   \
    6.33                  ; do
    6.34          if [ ${do_it} -eq 0 ]; then