# HG changeset patch # User "Yann E. MORIN" # Date 1180716933 0 # Node ID 567f1673d59dacb50d8a35c0ecaef4f668abb424 # Parent 39e4ef7d6d8d6718b8d376e912530527386bbe41 Introduce the notion of tols facilities (none so far, sstrip coming right away...). diff -r 39e4ef7d6d8d -r 567f1673d59d Makefile.steps --- a/Makefile.steps Fri Jun 01 16:50:29 2007 +0000 +++ b/Makefile.steps Fri Jun 01 16:55:33 2007 +0000 @@ -13,6 +13,7 @@ libc \ cc \ libc_finish \ +tools \ debug \ : @make -C "$(CT_TOP_DIR)" RESTART=$@ STOP=$@ @@ -29,6 +30,7 @@ -libc \ -cc \ -libc_finish \ +-tools \ -debug \ : @make -C "$(CT_TOP_DIR)" STOP=$(patsubst -%,%,$@) @@ -45,6 +47,7 @@ libc- \ cc- \ libc_finish- \ +tools- \ debug- \ : @make -C "$(CT_TOP_DIR)" RESTART=$(patsubst %-,%,$@) diff -r 39e4ef7d6d8d -r 567f1673d59d config/config.in --- a/config/config.in Fri Jun 01 16:50:29 2007 +0000 +++ b/config/config.in Fri Jun 01 16:55:33 2007 +0000 @@ -5,4 +5,5 @@ source config/binutils.in source config/cc.in source config/libc.in +source config/tools.in source config/debug.in diff -r 39e4ef7d6d8d -r 567f1673d59d docs/overview.txt --- a/docs/overview.txt Fri Jun 01 16:50:29 2007 +0000 +++ b/docs/overview.txt Fri Jun 01 16:55:33 2007 +0000 @@ -135,6 +135,7 @@ - libc - cc - libc_finish + - tools - debug Alternatively, you can call make with the name of a step to just do that step: @@ -144,9 +145,9 @@ The shortcuts -step_name and step_name- allow to respectively stop or restart at that step. Thus: - make -libc_headers make libc_headers- + make -libc_headers and: make libc_headers- are equivalent to: - make STOP=libc_headers make RESTART=libc_headers + make STOP=libc_headers and: make RESTART=libc_headers ____________________________ / diff -r 39e4ef7d6d8d -r 567f1673d59d kconfig/Makefile --- a/kconfig/Makefile Fri Jun 01 16:50:29 2007 +0000 +++ b/kconfig/Makefile Fri Jun 01 16:55:33 2007 +0000 @@ -2,6 +2,9 @@ # crosstool-ng configuration targets # These targets are used from top-level makefile +# Derive the project version from, well, the project version: +export PROJECTVERSION=$(CT_VERSION) + KCONFIG_TOP = config/config.in obj = ./kconfig PHONY += clean help oldconfig menuconfig config silentoldconfig \ @@ -18,11 +21,14 @@ # Build a list of all config files CONFIG_FILES = $(filter-out %debug.in,$(shell find $(CT_TOP_DIR)/config -type f -name '*.in')) +DEBUG_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/debug -type f -name '*.in') +TOOLS_CONFIG_FILES = $(shell find $(CT_TOP_DIR)/config/tools -type f -name '*.in') -# Derive the project version from, well, the project version: -export PROJECTVERSION=$(CT_VERSION) +.PHONY: generated_config_files +generated_config_files: $(CT_TOP_DIR)/config/debug.in \ + $(CT_TOP_DIR)/config/tools.in -$(CT_TOP_DIR)/config/debug.in: $(CONFIG_FILES) +$(CT_TOP_DIR)/config/debug.in: $(DEBUG_CONFIG_FILES) @echo "# Debug facilities menu" >$@ @echo "# Generated file, do not edit!!!" >>$@ @echo "menu \"Debug facilities\"" >>$@ @@ -31,13 +37,22 @@ done >>$@ @echo "endmenu" >>$@ -menuconfig: $(obj)/mconf $(CT_TOP_DIR)/config/debug.in +$(CT_TOP_DIR)/config/tools.in: $(TOOLS_CONFIG_FILES) + @echo "# Tools facilities menu" >$@ + @echo "# Generated file, do not edit!!!" >>$@ + @echo "menu \"Tools facilities\"" >>$@ + @for f in $(patsubst $(CT_TOP_DIR)/%,%,$(wildcard $(CT_TOP_DIR)/config/tools/*.in)); do \ + echo "source $${f}"; \ + done >>$@ + @echo "endmenu" >>$@ + +menuconfig: $(obj)/mconf generated_config_files @$< $(KCONFIG_TOP) -config: $(obj)/conf $(CT_TOP_DIR)/config/debug.in +config: $(obj)/conf generated_config_files @$< $(KCONFIG_TOP) -oldconfig: $(obj)/conf $(CT_TOP_DIR)/config/debug.in +oldconfig: $(obj)/conf generated_config_files @$< -s $(KCONFIG_TOP) # Help text used by make help @@ -66,4 +81,4 @@ clean:: @rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf} - @rm -f "$(CT_TOP_DIR)/config/debug.in" + @rm -f "$(CT_TOP_DIR)/config/debug.in" "$(CT_TOP_DIR)/config/tools.in" diff -r 39e4ef7d6d8d -r 567f1673d59d scripts/build/tools.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/build/tools.sh Fri Jun 01 16:55:33 2007 +0000 @@ -0,0 +1,34 @@ +# Wrapper to build the tools facilities + +# List all tools facilities, and parse their scripts +CT_TOOLS_FACILITY_LIST= +for f in "${CT_TOP_DIR}/scripts/build/tools/"*.sh; do + is_enabled= + . "${f}" + f=`basename "${f}" .sh` + if [ "${is_enabled}" = "y" ]; then + CT_TOOLS_FACILITY_LIST="${CT_TOOLS_FACILITY_LIST} ${f}" + fi +done + +# Download the tools facilities +do_tools_get() { + for f in ${CT_TOOLS_FACILITY_LIST}; do + do_tools_${f}_get + done +} + +# Extract and patch the tools facilities +do_tools_extract() { + for f in ${CT_TOOLS_FACILITY_LIST}; do + do_tools_${f}_extract + done +} + +# Build the tools facilities +do_tools() { + for f in ${CT_TOOLS_FACILITY_LIST}; do + do_tools_${f}_build + done +} + diff -r 39e4ef7d6d8d -r 567f1673d59d scripts/crosstool.sh --- a/scripts/crosstool.sh Fri Jun 01 16:50:29 2007 +0000 +++ b/scripts/crosstool.sh Fri Jun 01 16:55:33 2007 +0000 @@ -363,6 +363,7 @@ . "${CT_TOP_DIR}/scripts/build/cc_core_${CT_CC_CORE}.sh" . "${CT_TOP_DIR}/scripts/build/cc_${CT_CC}.sh" . "${CT_TOP_DIR}/scripts/build/debug.sh" +. "${CT_TOP_DIR}/scripts/build/tools.sh" if [ -z "${CT_RESTART}" ]; then CT_DoStep INFO "Retrieving needed toolchain components' tarballs" @@ -372,6 +373,7 @@ do_libfloat_get do_libc_get do_cc_get + do_tools_get do_debug_get CT_EndStep @@ -387,6 +389,7 @@ do_libfloat_extract do_libc_extract do_cc_extract + do_tools_extract do_debug_extract CT_EndStep fi @@ -410,6 +413,7 @@ libc \ cc \ libc_finish \ + tools \ debug \ ; do if [ ${do_it} -eq 0 ]; then