summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/kernel/linux.in211
-rw-r--r--config/kernel/linux_headers_install.in211
-rw-r--r--scripts/build/kernel/linux.sh13
-rwxr-xr-xtools/addToolVersion.sh105
4 files changed, 232 insertions, 308 deletions
diff --git a/config/kernel/linux.in b/config/kernel/linux.in
index c25d19f..18881d7 100644
--- a/config/kernel/linux.in
+++ b/config/kernel/linux.in
@@ -4,39 +4,197 @@ choice
bool
prompt "Get kernel headers from:"
-config KERNEL_LINUX_HEADERS_INSTALL
+config KERNEL_LINUX_INSTALL
bool
prompt "kernel's 'headers_install'"
help
This will make use of the new headers_install rule in recent kernels.
This is most probably what you want to use.
-config KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR
+if KERNEL_LINUX_INSTALL
+
+config KERNEL_LINUX_INSTALL_CHECK
bool
- prompt "Use custom directory"
+ prompt "Check installed headers"
+ default y
help
- If you have some kernel headers lying around, you can enter the path
- below.
+ If you are in doubt that installed headers are buggy, say 'Y'
+ here to have an extra check passed onto the headers.
-endchoice
+choice
+ bool
+ prompt "Linux kernel version"
-if KERNEL_LINUX_HEADERS_INSTALL
+config KERNEL_V_2_6_18_8
+ bool
+ prompt "2.6.18.8 (OBSOLETE)"
+ depends on OBSOLETE
-config KERNEL_VERSION_SEE_EXTRAVERSION
+config KERNEL_V_2_6_19_7
bool
- prompt "See extra versions"
- default n
- depends on KERNEL_LINUX_HEADERS_COPY || KERNEL_LINUX_HEADERS_INSTALL
- help
- See extra versions (kernel with 4 numbers, eg 2.6.19.1).
-
- If you say 'no', you'll only see sub-level, 3-digit versions.
- If you say 'yes', you'll see far more versions!
-
- It is recommended that you say 'no', unless you _*know*_
- that an extra version fixes a headers bug.
+ prompt "2.6.19.7 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_20_21
+ bool
+ prompt "2.6.20.21 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_21_7
+ bool
+ prompt "2.6.21.7 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_22_19
+ bool
+ prompt "2.6.22.19 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_23_17
+ bool
+ prompt "2.6.23.17 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_24_7
+ bool
+ prompt "2.6.24.7 (OBSOLETE)"
+ depends on OBSOLETE
+
+config KERNEL_V_2_6_25
+ bool
+ prompt "2.6.25"
+
+config KERNEL_V_2_6_25_1
+ bool
+ prompt "2.6.25.1"
+
+config KERNEL_V_2_6_25_2
+ bool
+ prompt "2.6.25.2"
+
+config KERNEL_V_2_6_25_3
+ bool
+ prompt "2.6.25.3"
+
+config KERNEL_V_2_6_25_4
+ bool
+ prompt "2.6.25.4"
+
+config KERNEL_V_2_6_25_5
+ bool
+ prompt "2.6.25.5"
+
+config KERNEL_V_2_6_25_6
+ bool
+ prompt "2.6.25.6"
+
+config KERNEL_V_2_6_25_7
+ bool
+ prompt "2.6.25.7"
+
+config KERNEL_V_2_6_25_8
+ bool
+ prompt "2.6.25.8"
+
+config KERNEL_V_2_6_25_9
+ bool
+ prompt "2.6.25.9"
-source config/kernel/linux_headers_install.in
+config KERNEL_V_2_6_25_10
+ bool
+ prompt "2.6.25.10"
+
+config KERNEL_V_2_6_25_11
+ bool
+ prompt "2.6.25.11"
+
+config KERNEL_V_2_6_25_12
+ bool
+ prompt "2.6.25.12"
+
+config KERNEL_V_2_6_25_13
+ bool
+ prompt "2.6.25.13"
+
+config KERNEL_V_2_6_25_14
+ bool
+ prompt "2.6.25.14"
+
+config KERNEL_V_2_6_25_15
+ bool
+ prompt "2.6.25.15"
+
+config KERNEL_V_2_6_25_16
+ bool
+ prompt "2.6.25.16"
+
+config KERNEL_V_2_6_25_17
+ bool
+ prompt "2.6.25.17"
+
+config KERNEL_V_2_6_26
+ bool
+ prompt "2.6.26"
+
+config KERNEL_V_2_6_26_1
+ bool
+ prompt "2.6.26.1"
+
+config KERNEL_V_2_6_26_2
+ bool
+ prompt "2.6.26.2"
+
+config KERNEL_V_2_6_26_3
+ bool
+ prompt "2.6.26.3"
+
+config KERNEL_V_2_6_26_4
+ bool
+ prompt "2.6.26.4"
+
+config KERNEL_V_2_6_26_5
+ bool
+ prompt "2.6.26.5"
+
+# CT_INSERT_VERSION_ABOVE
+# Don't remove above line!
+endchoice
+
+config KERNEL_VERSION
+ string
+ default "2.6.18.8" if KERNEL_V_2_6_18_8
+ default "2.6.19.7" if KERNEL_V_2_6_19_7
+ default "2.6.20.21" if KERNEL_V_2_6_20_21
+ default "2.6.21.7" if KERNEL_V_2_6_21_7
+ default "2.6.22.19" if KERNEL_V_2_6_22_19
+ default "2.6.23.17" if KERNEL_V_2_6_23_17
+ default "2.6.24.7" if KERNEL_V_2_6_24_7
+ default "2.6.25" if KERNEL_V_2_6_25
+ default "2.6.25.1" if KERNEL_V_2_6_25_1
+ default "2.6.25.2" if KERNEL_V_2_6_25_2
+ default "2.6.25.3" if KERNEL_V_2_6_25_3
+ default "2.6.25.4" if KERNEL_V_2_6_25_4
+ default "2.6.25.5" if KERNEL_V_2_6_25_5
+ default "2.6.25.6" if KERNEL_V_2_6_25_6
+ default "2.6.25.7" if KERNEL_V_2_6_25_7
+ default "2.6.25.8" if KERNEL_V_2_6_25_8
+ default "2.6.25.9" if KERNEL_V_2_6_25_9
+ default "2.6.25.10" if KERNEL_V_2_6_25_10
+ default "2.6.25.11" if KERNEL_V_2_6_25_11
+ default "2.6.25.12" if KERNEL_V_2_6_25_12
+ default "2.6.25.13" if KERNEL_V_2_6_25_13
+ default "2.6.25.14" if KERNEL_V_2_6_25_14
+ default "2.6.25.14" if KERNEL_V_2_6_25_15
+ default "2.6.25.15" if KERNEL_V_2_6_25_16
+ default "2.6.25.15" if KERNEL_V_2_6_25_17
+ default "2.6.26" if KERNEL_V_2_6_26
+ default "2.6.26.1" if KERNEL_V_2_6_26_1
+ default "2.6.26.2" if KERNEL_V_2_6_26_2
+ default "2.6.26.3" if KERNEL_V_2_6_26_3
+ default "2.6.26.4" if KERNEL_V_2_6_26_4
+ default "2.6.26.5" if KERNEL_V_2_6_26_5
+# CT_INSERT_VERSION_STRING_ABOVE
+# Don't remove above line!
choice
bool
@@ -71,13 +229,22 @@ config KERNEL_LINUX_VERBOSE_LEVEL
endif
-config KERNEL_LINUX_HEADERS_CUSTOM_DIR
+config KERNEL_LINUX_USE_CUSTOM_DIR
+ bool
+ prompt "Use custom directory"
+ help
+ If you have some kernel headers lying around, you can enter the path
+ below.
+
+config KERNEL_LINUX_CUSTOM_DIR
string
prompt "Where are those custom headers?"
- depends on KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR
+ depends on KERNEL_LINUX_USE_CUSTOM_DIR
help
Enter the base directory where the headers are to be found.
Eg. if the headers are in /some/place/include, then enter /some/place.
This is the same path you entered when you typed:
make INSTALL_HDR_PATH=/some/place headers_install
+
+endchoice
diff --git a/config/kernel/linux_headers_install.in b/config/kernel/linux_headers_install.in
deleted file mode 100644
index fc3df3f..0000000
--- a/config/kernel/linux_headers_install.in
+++ /dev/null
@@ -1,211 +0,0 @@
-choice
- bool
- prompt "Linux kernel version"
-
-config KERNEL_INSTALL_V_2_6_18_8
- bool
- prompt "2.6.18.8 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_19_7
- bool
- prompt "2.6.19.7 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_20_21
- bool
- prompt "2.6.20.21 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_21_7
- bool
- prompt "2.6.21.7 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_22_19
- bool
- prompt "2.6.22.19 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_23_17
- bool
- prompt "2.6.23.17 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_24_7
- bool
- prompt "2.6.24.7 (OBSOLETE)"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION && OBSOLETE
-
-config KERNEL_INSTALL_V_2_6_25
- bool
- prompt "2.6.25"
-
-config KERNEL_INSTALL_V_2_6_25_1
- bool
- prompt "2.6.25.1"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_2
- bool
- prompt "2.6.25.2"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_3
- bool
- prompt "2.6.25.3"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_4
- bool
- prompt "2.6.25.4"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_5
- bool
- prompt "2.6.25.5"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_6
- bool
- prompt "2.6.25.6"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_7
- bool
- prompt "2.6.25.7"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_8
- bool
- prompt "2.6.25.8"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_9
- bool
- prompt "2.6.25.9"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_10
- bool
- prompt "2.6.25.10"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_11
- bool
- prompt "2.6.25.11"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_12
- bool
- prompt "2.6.25.12"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_13
- bool
- prompt "2.6.25.13"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_14
- bool
- prompt "2.6.25.14"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_15
- bool
- prompt "2.6.25.15"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_16
- bool
- prompt "2.6.25.16"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_25_17
- bool
- prompt "2.6.25.17"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_26
- bool
- prompt "2.6.26"
-
-config KERNEL_INSTALL_V_2_6_26_1
- bool
- prompt "2.6.26.1"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_26_2
- bool
- prompt "2.6.26.2"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_26_3
- bool
- prompt "2.6.26.3"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_26_4
- bool
- prompt "2.6.26.4"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-config KERNEL_INSTALL_V_2_6_26_5
- bool
- prompt "2.6.26.5"
- depends on KERNEL_VERSION_SEE_EXTRAVERSION
-
-# CT_INSERT_VERSION_ABOVE
-# Don't remove above line!
-endchoice
-
-config KERNEL_VERSION
- string
- default "2.6.18.8" if KERNEL_INSTALL_V_2_6_18_8
- default "2.6.19.7" if KERNEL_INSTALL_V_2_6_19_7
- default "2.6.20.21" if KERNEL_INSTALL_V_2_6_20_21
- default "2.6.21.7" if KERNEL_INSTALL_V_2_6_21_7
- default "2.6.22.19" if KERNEL_INSTALL_V_2_6_22_19
- default "2.6.23.17" if KERNEL_INSTALL_V_2_6_23_17
- default "2.6.24" if KERNEL_INSTALL_V_2_6_24
- default "2.6.24.1" if KERNEL_INSTALL_V_2_6_24_1
- default "2.6.24.2" if KERNEL_INSTALL_V_2_6_24_2
- default "2.6.24.3" if KERNEL_INSTALL_V_2_6_24_3
- default "2.6.24.4" if KERNEL_INSTALL_V_2_6_24_4
- default "2.6.24.5" if KERNEL_INSTALL_V_2_6_24_5
- default "2.6.24.6" if KERNEL_INSTALL_V_2_6_24_6
- default "2.6.24.7" if KERNEL_INSTALL_V_2_6_24_7
- default "2.6.25" if KERNEL_INSTALL_V_2_6_25
- default "2.6.25.1" if KERNEL_INSTALL_V_2_6_25_1
- default "2.6.25.2" if KERNEL_INSTALL_V_2_6_25_2
- default "2.6.25.3" if KERNEL_INSTALL_V_2_6_25_3
- default "2.6.25.4" if KERNEL_INSTALL_V_2_6_25_4
- default "2.6.25.5" if KERNEL_INSTALL_V_2_6_25_5
- default "2.6.25.6" if KERNEL_INSTALL_V_2_6_25_6
- default "2.6.25.7" if KERNEL_INSTALL_V_2_6_25_7
- default "2.6.25.8" if KERNEL_INSTALL_V_2_6_25_8
- default "2.6.25.9" if KERNEL_INSTALL_V_2_6_25_9
- default "2.6.25.10" if KERNEL_INSTALL_V_2_6_25_10
- default "2.6.25.11" if KERNEL_INSTALL_V_2_6_25_11
- default "2.6.25.12" if KERNEL_INSTALL_V_2_6_25_12
- default "2.6.25.13" if KERNEL_INSTALL_V_2_6_25_13
- default "2.6.25.14" if KERNEL_INSTALL_V_2_6_25_14
- default "2.6.25.14" if KERNEL_INSTALL_V_2_6_25_15
- default "2.6.25.15" if KERNEL_INSTALL_V_2_6_25_16
- default "2.6.25.15" if KERNEL_INSTALL_V_2_6_25_17
- default "2.6.26" if KERNEL_INSTALL_V_2_6_26
- default "2.6.26.1" if KERNEL_INSTALL_V_2_6_26_1
- default "2.6.26.2" if KERNEL_INSTALL_V_2_6_26_2
- default "2.6.26.3" if KERNEL_INSTALL_V_2_6_26_3
- default "2.6.26.4" if KERNEL_INSTALL_V_2_6_26_4
- default "2.6.26.5" if KERNEL_INSTALL_V_2_6_26_5
-# CT_INSERT_VERSION_STRING_ABOVE
-# Don't remove above line!
-
-config KERNEL_LINUX_HEADERS_INSTALL_CHECK
- bool
- prompt "Check installed headers"
- default y
- help
- If you are in doubt that installed headers are buggy, say 'Y'
- here to have an extra check passed onto the headers.
diff --git a/scripts/build/kernel/linux.sh b/scripts/build/kernel/linux.sh
index 8cf8737..27749e2 100644
--- a/scripts/build/kernel/linux.sh
+++ b/scripts/build/kernel/linux.sh
@@ -3,13 +3,12 @@
# Licensed under the GPL v2. See COPYING in the root of this package
do_print_filename() {
- [ "${CT_KERNEL}" = "linux" ] || return 0
echo "linux-${CT_KERNEL_VERSION}"
}
# Download the kernel
do_kernel_get() {
- if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" ]; then
+ if [ "${CT_KERNEL_LINUX_USE_CUSTOM_DIR}" != "y" ]; then
CT_GetFile "${CT_KERNEL_FILE}" {ftp,http}://ftp.kernel.org/pub/linux/kernel/v2.{6{,/testing},4,2}
fi
return 0
@@ -17,7 +16,7 @@ do_kernel_get() {
# Extract kernel
do_kernel_extract() {
- if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" ]; then
+ if [ "${CT_KERNEL_LINUX_USE_CUSTOM_DIR}" != "y" ]; then
CT_ExtractAndPatch "${CT_KERNEL_FILE}"
fi
return 0
@@ -27,7 +26,7 @@ do_kernel_extract() {
do_kernel_headers() {
CT_DoStep INFO "Installing kernel headers"
- if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
+ if [ "${CT_KERNEL_LINUX_USE_CUSTOM_DIR}" = "y" ]; then
do_kernel_preinstalled
else
do_kernel_install
@@ -59,7 +58,7 @@ do_kernel_install() {
${V_OPT} \
headers_install
- if [ "${CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK}" = "y" ]; then
+ if [ "${CT_KERNEL_LINUX_INSTALL_CHECK}" = "y" ]; then
CT_DoLog EXTRA "Checking installed headers"
CT_DoExecLog ALL \
make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
@@ -79,6 +78,6 @@ do_kernel_preinstalled() {
CT_DoLog EXTRA "Copying preinstalled kernel headers"
mkdir -p "${CT_SYSROOT_DIR}/usr"
- cd "${CT_KERNEL_LINUX_HEADERS_CUSTOM_DIR}"
- cp -rv include "${CT_SYSROOT_DIR}/usr" 2>&1 |CT_DoLog ALL
+ cd "${CT_KERNEL_LINUX_CUSTOM_DIR}"
+ CT_DoExecLog ALL cp -rv include "${CT_SYSROOT_DIR}/usr"
}
diff --git a/tools/addToolVersion.sh b/tools/addToolVersion.sh
index 138986e..7190291 100755
--- a/tools/addToolVersion.sh
+++ b/tools/addToolVersion.sh
@@ -7,7 +7,7 @@ doHelp() {
cat <<-EOF
Usage: ${myname} <tool> [option] <version>
'tool' in one of:
- --gcc, --binutils, --glibc, --uClibc, --linux,
+ --gcc, --binutils, --glibc, --eglibc, --uClibc, --linux,
--gdb, --dmalloc, --duma, --strace, --ltrace, --libelf
--gmp, --mpfr
@@ -18,24 +18,20 @@ Usage: ${myname} <tool> [option] <version>
--obsolete, -o
mark the version as being obsolete
- Valid mandatory 'option' for tool==linux is one and only one of:
- --install, --sanitised, --copy
-
'version' is a valid version for the specified tool.
Examples:
- add version 2.6.19.2 to linux kernel install method:
- ${myname} --linux --install 2.6.19.2
+ add version 2.6.19.2 to linux kernel:
+ ${myname} --linux 2.6.19.2
- add versions 2.3.5 and 2.3.6 to glibc:
- ${myname} --glibc 2.3.5 2.3.6
+ add experimental versions 2.3.5 and 2.3.6 to glibc:
+ ${myname} --glibc -x 2.3.5 2.3.6
EOF
}
cat=
tool=
tool_prefix=
-tool_suffix=
VERSION=
EXP=
OBS=
@@ -45,25 +41,23 @@ i=1
while [ $i -le $# ]; do
case "${!i}" in
# Tools:
- --gcc) cat=CC; tool=gcc; tool_prefix=cc; tool_suffix=;;
- --binutils) cat=BINUTILS; tool=binutils; tool_prefix=; tool_suffix=;;
- --glibc) cat=LIBC; tool=glibc; tool_prefix=libc; tool_suffix=;;
- --uClibc) cat=LIBC; tool=uClibc; tool_prefix=libc; tool_suffix=;;
- --linux) cat=KERNEL; tool=linux; tool_prefix=kernel; tool_suffix=;;
- --gdb) cat=GDB; tool=gdb; tool_prefix=debug tool_suffix=;;
- --dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug tool_suffix=;;
- --duma) cat=DUMA; tool=duma; tool_prefix=debug tool_suffix=;;
- --strace) cat=STRACE; tool=strace; tool_prefix=debug tool_suffix=;;
- --ltrace) cat=LTRACE; tool=ltrace; tool_prefix=debug tool_suffix=;;
- --libelf) cat=LIBELF; tool=libelf; tool_prefix=tools tool_suffix=;;
- --gmp) cat=GMP; tool=gmp; tool_prefix=cc; tool_suffix=;;
- --mpfr) cat=MPFR; tool=mpfr; tool_prefix=cc; tool_suffix=;;
+ --gcc) cat=CC; tool=gcc; tool_prefix=cc;;
+ --binutils) cat=BINUTILS; tool=binutils; tool_prefix=;;
+ --glibc) cat=LIBC; tool=glibc; tool_prefix=libc;;
+ --eglibc) cat=LIBC; tool=eglibc; tool_prefix=libc;;
+ --uClibc) cat=LIBC; tool=uClibc; tool_prefix=libc;;
+ --linux) cat=KERNEL; tool=linux; tool_prefix=kernel;;
+ --gdb) cat=GDB; tool=gdb; tool_prefix=debug;;
+ --dmalloc) cat=DMALLOC; tool=dmalloc; tool_prefix=debug;;
+ --duma) cat=DUMA; tool=duma; tool_prefix=debug;;
+ --strace) cat=STRACE; tool=strace; tool_prefix=debug;;
+ --ltrace) cat=LTRACE; tool=ltrace; tool_prefix=debug;;
+ --libelf) cat=LIBELF; tool=libelf; tool_prefix=tools;;
+ --gmp) cat=GMP; tool=gmp; tool_prefix=gmp_mpfr;;
+ --mpfr) cat=MPFR; tool=mpfr; tool_prefix=gmp_mpfr;;
# Tools options:
-x|--experimental) EXP=1; OBS=; prompt_suffix=" (EXPERIMENTAL)";;
-o|--obsolete) OBS=1; EXP=; prompt_suffix=" (OBSOLETE)";;
- --install) tool_suffix=install;;
- --sanitised) tool_suffix=sanitised;;
- --copy) tool_suffix=copy;;
# Misc:
-h|--help) doHelp; exit 0;;
-*) echo "Unknown option: '${!i}' (use -h/--help for help)."; exit 1;;
@@ -74,51 +68,26 @@ done
[ -n "${tool}" -o -n "${VERSION}" ] || { doHelp; exit 1; }
-case "${cat}" in
- KERNEL) [ -z "${tool_suffix}" ] && { doHelp; exit 1; } ;;
- *) ;;
-esac
-
for ver in ${VERSION}; do
- # Split VERSION into MAJOR MINOR PATCHLEVEL EXTRAVERSION
- ver_M=$(echo "${ver}...." |cut -d . -f 1)
- ver_m=$(echo "${ver}...." |cut -d . -f 2)
- ver_P=$(echo "${ver}...." |cut -d . -f 3)
- ver_E=$(echo "${ver}...." |cut -d . -f 4)
- unset DEP L1 L2 L3 L4 L5 L6 FILE
+ unset DEP L1 L2 L3 L4 L5 L6 FILE v ver_M ver_m
+ FILE="config/${tool_prefix}/${tool}.in"
v=$(echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;')
- if [ "${cat}" = "KERNEL" ]; then
- TOOL_SUFFIX=$(echo "${tool_suffix}" |tr [[:lower:]] [[:upper:]])
- L1="config ${cat}_${TOOL_SUFFIX}_V_${v}\n"
- L2=" bool\n"
- L3=" prompt \"${ver}${prompt_suffix}\"\n"
- # Extra versions are not necessary visible:
- case "${tool_suffix},${ver}" in
- sanitised,*) ;; # Sanitised headers always have an extra version
- *,*.*.*.*) DEP="${DEP} && KERNEL_VERSION_SEE_EXTRAVERSION";;
- esac
- L6=" default \"${ver}\" if ${cat}_${TOOL_SUFFIX}_V_${v}"
- FILE="config/${tool_prefix}/${tool}_headers_${tool_suffix}.in"
- else
- L1="config ${cat}_V_${v}\n"
- L2=" bool\n"
- L3=" prompt \"${ver}${prompt_suffix}\"\n"
- L6=" default \"${ver}\" if ${cat}_V_${v}"
- case "${tool}" in
- gcc)
- if [ ${ver_M} -gt 4 -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \) ]; then
- L5=" select CC_GCC_4_3_or_later\n"
- fi
- ;;
- esac
- FILE="config/${tool_prefix}/${tool}.in"
- fi
+ L1="config ${cat}_V_${v}\n"
+ L2=" bool\n"
+ L3=" prompt \"${ver}${prompt_suffix}\"\n"
[ -n "${EXP}" ] && DEP="${DEP} && EXPERIMENTAL"
[ -n "${OBS}" ] && DEP="${DEP} && OBSOLETE"
- case "${DEP}" in
- "") ;;
- *) L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \&\& //; s/\&/\\&/g;')"\n"
- esac
- sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}${L5}"'\n\1/;
- s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L6}"'\n\1/;' "${FILE}"
+ [ -n "${DEP}" ] && L4=" depends on "$(echo "${DEP}" |sed -r -e 's/^ \&\& //; s/\&/\\&/g;')"\n"
+ if [ "${tool}" = "gcc" ]; then
+ # Extract 'M'ajor and 'm'inor from version string
+ ver_M=$(echo "${ver}...." |cut -d . -f 1)
+ ver_m=$(echo "${ver}...." |cut -d . -f 2)
+ if [ ${ver_M} -gt 4 -o \( ${ver_M} -eq 4 -a ${ver_m} -ge 3 \) ]; then
+ L5=" select CC_GCC_4_3_or_later\n"
+ fi
+ fi
+ L6=" default \"${ver}\" if ${cat}_V_${v}"
+ sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}${L5}"'\n\1/;' \
+ -e 's/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L6}"'\n\1/;' \
+ "${FILE}"
done