diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-10-05 15:32:00 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-10-05 15:32:00 +0000 |
commit | b8d189b2967843015376d5696b244958cba44202 (patch) | |
tree | c6c6fc2e4d462f63f3268feefc3ed8d7c207f12f | |
parent | 689f4b103ce4e33f612e91ec83b40d19bc892d8d (diff) | |
download | crosstool-ng-b8d189b2967843015376d5696b244958cba44202.tar.gz crosstool-ng-b8d189b2967843015376d5696b244958cba44202.tar.bz2 crosstool-ng-b8d189b2967843015376d5696b244958cba44202.zip |
Separate the architecture config file and function script.
/trunk/kconfig/kconfig.mk | 46 23 23 0 +++++++++++++++++++++++-----------------------
/trunk/scripts/crosstool.sh | 2 1 1 0 +-
/trunk/docs/overview.txt | 28 11 17 0 +++++++++++-----------------
3 files changed, 35 insertions(+), 41 deletions(-)
-rw-r--r-- | config/arch/alpha.in (renamed from config/arch/alpha/config.in) | 0 | ||||
-rw-r--r-- | config/arch/arm.in (renamed from config/arch/arm/config.in) | 0 | ||||
-rw-r--r-- | config/arch/ia64.in (renamed from config/arch/ia64/config.in) | 0 | ||||
-rw-r--r-- | config/arch/mips.in (renamed from config/arch/mips/config.in) | 0 | ||||
-rw-r--r-- | config/arch/powerpc.in (renamed from config/arch/powerpc/config.in) | 0 | ||||
-rw-r--r-- | config/arch/sh.in (renamed from config/arch/sh/config.in) | 0 | ||||
-rw-r--r-- | config/arch/x86.in (renamed from config/arch/x86/config.in) | 0 | ||||
-rw-r--r-- | config/arch/x86_64.in (renamed from config/arch/x86_64/config.in) | 0 | ||||
-rw-r--r-- | docs/overview.txt | 30 | ||||
-rw-r--r-- | kconfig/kconfig.mk | 46 | ||||
-rw-r--r-- | scripts/build/arch/alpha.sh (renamed from config/arch/alpha/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/arm.sh (renamed from config/arch/arm/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/ia64.sh (renamed from config/arch/ia64/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/mips.sh (renamed from config/arch/mips/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/powerpc.sh (renamed from config/arch/powerpc/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/sh.sh (renamed from config/arch/sh/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/x86.sh (renamed from config/arch/x86/functions) | 0 | ||||
-rw-r--r-- | scripts/build/arch/x86_64.sh (renamed from config/arch/x86_64/functions) | 0 | ||||
-rwxr-xr-x | scripts/crosstool.sh | 2 |
19 files changed, 36 insertions, 42 deletions
diff --git a/config/arch/alpha/config.in b/config/arch/alpha.in index cf8157a2..cf8157a2 100644 --- a/config/arch/alpha/config.in +++ b/config/arch/alpha.in diff --git a/config/arch/arm/config.in b/config/arch/arm.in index a3c3d975..a3c3d975 100644 --- a/config/arch/arm/config.in +++ b/config/arch/arm.in diff --git a/config/arch/ia64/config.in b/config/arch/ia64.in index ad0d9fd3..ad0d9fd3 100644 --- a/config/arch/ia64/config.in +++ b/config/arch/ia64.in diff --git a/config/arch/mips/config.in b/config/arch/mips.in index 0f91e83c..0f91e83c 100644 --- a/config/arch/mips/config.in +++ b/config/arch/mips.in diff --git a/config/arch/powerpc/config.in b/config/arch/powerpc.in index 448065a5..448065a5 100644 --- a/config/arch/powerpc/config.in +++ b/config/arch/powerpc.in diff --git a/config/arch/sh/config.in b/config/arch/sh.in index b21ee1bb..b21ee1bb 100644 --- a/config/arch/sh/config.in +++ b/config/arch/sh.in diff --git a/config/arch/x86/config.in b/config/arch/x86.in index 4a5c2f85..4a5c2f85 100644 --- a/config/arch/x86/config.in +++ b/config/arch/x86.in diff --git a/config/arch/x86_64/config.in b/config/arch/x86_64.in index 83b6e83a..83b6e83a 100644 --- a/config/arch/x86_64/config.in +++ b/config/arch/x86_64.in diff --git a/docs/overview.txt b/docs/overview.txt index f7cf10a9..5ff9d617 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -541,20 +541,14 @@ An architecture is defined by: - a human-readable name, in lower case letters, with numbers as appropriate. The underscore is allowed; space and special characters are not. Eg.: arm, x86_64 - - a directory in "config/arch/" named after the architecture, with the same - letters as above. Eg.: arch/arm, arch/x86_64 - This directory contains the following files, and only those files: - - a configuration file in kconfig syntax, named "config.in", which shall - follow the API defined below. - Eg.: config/arch/arm/config.in - - a function script in bash-3.0 syntax, named "functions", which shall - follow the API defined below. - Eg.: config/arch/arm/functions - - an optional file, named "experimental" (in lower case!), which, if it - is present, means that support for this architecture is EXPERIMENTAL. - Eg.: config/arch/arm/experimental - -The "config.in" file API: + - a file in "config/arch/", named after the architecture's name, and suffixed + with ".in". + Eg.: config/arch/arm.in + - a file in "scripts/build/arch/", named after the architecture's name, and + suffixed with ".sh". + Eg.: scripts/build/arch/arm.sh + +The architecture's ".in" file API: > the config option "ARCH_%arch%" (where %arch% is to be replaced with the actual architecture name). That config option must have *neither* a type, *nor* a prompt! Also, it can @@ -584,7 +578,7 @@ The "config.in" file API: this, as the architecture name was written all upper case. However, the prefix is unique among architectures, and does not cause harm). -The "functions" file API: +The architecture's ".sh" file API: > the function "CT_DoArchValues" + parameters: none + environment: @@ -656,8 +650,8 @@ The "functions" file API: - default to: - all empty -You can have a look at "config/arch/arm/" for an quite complete example of -what an actual architecture description looks like. +You can have a look at "config/arch/arm.in" and "scripts/build/arch/arm.sh" for +a quite complete example of what an actual architecture description looks like. Kernel specific | ----------------+ @@ -760,7 +754,7 @@ The kernel's ".sh" file API: any name-clashing. You can have a look at "config/kernel/linux.in" and "scripts/build/kernel/linux.sh" -as an example of what a complex kernel description looks like, +as an example of what a complex kernel description looks like. Adding a new version of a component | ------------------------------------+ diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk index ab706609..38efb406 100644 --- a/kconfig/kconfig.mk +++ b/kconfig/kconfig.mk @@ -19,7 +19,7 @@ CFLAGS += -DKBUILD_NO_NLS endif # Build a list of all config files -ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*/config.in) +ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/arch/*.in) KERN_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/kernel/*.in) DEBUG_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/debug/*.in) TOOLS_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/tools/*.in) @@ -33,7 +33,7 @@ GEN_CONFIG_FILES=$(CT_TOP_DIR)/config.gen/arch.in \ CONFIG_FILES=$(STATIC_CONFIG_FILES) $(GEN_CONFIG_FILES) # Build list of items -ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%/config.in,%,$(ARCH_CONFIG_FILES)) +ARCHS = $(patsubst $(CT_LIB_DIR)/config/arch/%.in,%,$(ARCH_CONFIG_FILES)) KERNELS = $(patsubst $(CT_LIB_DIR)/config/kernel/%.in,%,$(KERN_CONFIG_FILES)) $(GEN_CONFIG_FILES): $(CT_TOP_DIR)/config.gen \ @@ -44,27 +44,27 @@ $(CT_TOP_DIR)/config.gen: $(KCONFIG_TOP) $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES) @echo ' IN config.gen/arch.in' - @(echo "# Architectures menu"; \ - echo "# Generated file, do not edit!!!"; \ - echo ""; \ - for arch in $(ARCHS); do \ - _arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \ - echo "config ARCH_$${_arch}"; \ - echo " bool"; \ - printf " prompt \"$${arch}"; \ - if grep -E '^# +EXPERIMENTAL$$' config/arch/$${arch}/config.in >/dev/null 2>&1; then \ - echo " (EXPERIMENTAL)\""; \ - echo " depends on EXPERIMENTAL"; \ - else \ - echo "\""; \ - fi; \ - echo "if ARCH_$${_arch}"; \ - echo "config ARCH"; \ - echo " default \"$${arch}\" if ARCH_$${_arch}"; \ - echo "source config/arch/$${arch}/config.in"; \ - echo "endif"; \ - echo ""; \ - done; \ + @(echo "# Architectures menu"; \ + echo "# Generated file, do not edit!!!"; \ + echo ""; \ + for arch in $(ARCHS); do \ + _arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \ + echo "config ARCH_$${_arch}"; \ + echo " bool"; \ + printf " prompt \"$${arch}"; \ + if grep -E '^# +EXPERIMENTAL$$' config/arch/$${arch}.in >/dev/null 2>&1; then \ + echo " (EXPERIMENTAL)\""; \ + echo " depends on EXPERIMENTAL"; \ + else \ + echo "\""; \ + fi; \ + echo "if ARCH_$${_arch}"; \ + echo "config ARCH"; \ + echo " default \"$${arch}\" if ARCH_$${_arch}"; \ + echo "source config/arch/$${arch}.in"; \ + echo "endif"; \ + echo ""; \ + done; \ ) >$@ $(CT_TOP_DIR)/config.gen/kernel.in: $(KERN_CONFIG_FILES) diff --git a/config/arch/alpha/functions b/scripts/build/arch/alpha.sh index ea8ef536..ea8ef536 100644 --- a/config/arch/alpha/functions +++ b/scripts/build/arch/alpha.sh diff --git a/config/arch/arm/functions b/scripts/build/arch/arm.sh index a1b8542c..a1b8542c 100644 --- a/config/arch/arm/functions +++ b/scripts/build/arch/arm.sh diff --git a/config/arch/ia64/functions b/scripts/build/arch/ia64.sh index 76f34ddb..76f34ddb 100644 --- a/config/arch/ia64/functions +++ b/scripts/build/arch/ia64.sh diff --git a/config/arch/mips/functions b/scripts/build/arch/mips.sh index 4bf0501d..4bf0501d 100644 --- a/config/arch/mips/functions +++ b/scripts/build/arch/mips.sh diff --git a/config/arch/powerpc/functions b/scripts/build/arch/powerpc.sh index 94ad11cd..94ad11cd 100644 --- a/config/arch/powerpc/functions +++ b/scripts/build/arch/powerpc.sh diff --git a/config/arch/sh/functions b/scripts/build/arch/sh.sh index b6dbc026..b6dbc026 100644 --- a/config/arch/sh/functions +++ b/scripts/build/arch/sh.sh diff --git a/config/arch/x86/functions b/scripts/build/arch/x86.sh index ae67692d..ae67692d 100644 --- a/config/arch/x86/functions +++ b/scripts/build/arch/x86.sh diff --git a/config/arch/x86_64/functions b/scripts/build/arch/x86_64.sh index 2626abf6..2626abf6 100644 --- a/config/arch/x86_64/functions +++ b/scripts/build/arch/x86_64.sh diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 4b0f524c..b0abbf37 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -57,7 +57,7 @@ GREP_OPTIONS= CT_DoLog INFO "Building environment variables" # Parse architecture-specific functions -. "${CT_LIB_DIR}/config/arch/${CT_ARCH}/functions" +. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh" # Target tuple: CT_TARGET needs a little love: CT_DoBuildTargetTuple |