Introduce the notion of tols facilities (none so far, sstrip coming right away...).

This commit is contained in:
Yann E. MORIN" 2007-06-01 16:55:33 +00:00
parent e5f94e6037
commit 51554bf237
6 changed files with 67 additions and 9 deletions

View File

@ -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 %-,%,$@)

View File

@ -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

View File

@ -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
____________________________
/

View File

@ -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"

34
scripts/build/tools.sh Normal file
View File

@ -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
}

View File

@ -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