From 51554bf237037946b12f7aea97708f1a64c091a6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 1 Jun 2007 16:55:33 +0000 Subject: Introduce the notion of tols facilities (none so far, sstrip coming right away...). diff --git a/Makefile.steps b/Makefile.steps index 4b18165..e09c3c7 100644 --- a/Makefile.steps +++ b/Makefile.steps @@ -13,6 +13,7 @@ libfloat \ libc \ cc \ libc_finish \ +tools \ debug \ : @make -C "$(CT_TOP_DIR)" RESTART=$@ STOP=$@ @@ -29,6 +30,7 @@ debug \ -libc \ -cc \ -libc_finish \ +-tools \ -debug \ : @make -C "$(CT_TOP_DIR)" STOP=$(patsubst -%,%,$@) @@ -45,6 +47,7 @@ libfloat- \ libc- \ cc- \ libc_finish- \ +tools- \ debug- \ : @make -C "$(CT_TOP_DIR)" RESTART=$(patsubst %-,%,$@) diff --git a/config/config.in b/config/config.in index a467af5..d573ce7 100644 --- a/config/config.in +++ b/config/config.in @@ -5,4 +5,5 @@ source config/kernel.in source config/binutils.in source config/cc.in source config/libc.in +source config/tools.in source config/debug.in diff --git a/docs/overview.txt b/docs/overview.txt index 7bc9f61..27c97a3 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -135,6 +135,7 @@ The list of steps is, in order of appearence in the build process: - 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 @@ is equivalent to: 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 --git a/kconfig/Makefile b/kconfig/Makefile index 71737f7..0603b74 100644 --- a/kconfig/Makefile +++ b/kconfig/Makefile @@ -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 @@ endif # 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 @@ $(CT_TOP_DIR)/config/debug.in: $(CONFIG_FILES) 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 @@ kconfig/conf: $(SHIPPED) kconfig/conf.c 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 --git a/scripts/build/tools.sh b/scripts/build/tools.sh new file mode 100644 index 0000000..ebc8131 --- /dev/null +++ b/scripts/build/tools.sh @@ -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 --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 7ceea6a..4021f91 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -363,6 +363,7 @@ fi . "${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 @@ if [ -z "${CT_RESTART}" ]; then do_libfloat_get do_libc_get do_cc_get + do_tools_get do_debug_get CT_EndStep @@ -387,6 +389,7 @@ if [ -z "${CT_RESTART}" ]; then do_libfloat_extract do_libc_extract do_cc_extract + do_tools_extract do_debug_extract CT_EndStep fi @@ -410,6 +413,7 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then libc \ cc \ libc_finish \ + tools \ debug \ ; do if [ ${do_it} -eq 0 ]; then -- cgit v0.10.2-6-g49f6