aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@free.fr>2012-12-27 12:45:22 +0100
committerYann E. MORIN" <yann.morin.1998@free.fr>2012-12-27 12:45:22 +0100
commitae91413aee0b6901ce5a08b86a9c2207217252eb (patch)
tree6e2a2ddb1b04497001bed3b47a8dacff61050f98
parentd565297b97ee51c8e25325c0a860e3744220c55e (diff)
downloadcrosstool-ng-ae91413aee0b6901ce5a08b86a9c2207217252eb.tar.gz
crosstool-ng-ae91413aee0b6901ce5a08b86a9c2207217252eb.tar.bz2
crosstool-ng-ae91413aee0b6901ce5a08b86a9c2207217252eb.zip
scripts/addToolsVersion: properly handle .in vs. .in.2
While most components have their version in the .in file, some have it in the .in.2 (eg. elf2flt). Currently, to handle this case, we indiscriminately munge both files, but this is wrong: in the elf2flt case, if we add a binutils version, we do not want it to be added to elf2flt, and conversely. So, for each tool, we need to explicitly know what file to munge. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-rwxr-xr-xscripts/addToolVersion.sh41
1 files changed, 19 insertions, 22 deletions
diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh
index 26fdfe43..e7d59bb5 100755
--- a/scripts/addToolVersion.sh
+++ b/scripts/addToolVersion.sh
@@ -187,24 +187,24 @@ fi
while [ $# -gt 0 ]; do
case "$1" in
# Tools:
- --gcc) EXP=; OBS=; cat=CC; tool=gcc; tool_prefix=cc;;
- --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils;;
- --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc;;
- --eglibc) EXP=; OBS=; cat=LIBC_EGLIBC; tool=eglibc; tool_prefix=libc;;
- --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc;;
- --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc;;
- --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel;;
- --gdb) EXP=; OBS=; cat=GDB; tool=gdb; tool_prefix=debug;;
- --dmalloc) EXP=; OBS=; cat=DMALLOC; tool=dmalloc; tool_prefix=debug;;
- --duma) EXP=; OBS=; cat=DUMA; tool=duma; tool_prefix=debug;;
- --strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug;;
- --ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug;;
- --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;;
- --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;;
- --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs;;
- --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs;;
- --mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs;;
- --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs;;
+ --gcc) EXP=; OBS=; cat=CC; tool=gcc; tool_prefix=cc; dot2suffix=;;
+ --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;;
+ --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;;
+ --eglibc) EXP=; OBS=; cat=LIBC_EGLIBC; tool=eglibc; tool_prefix=libc; dot2suffix=;;
+ --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;;
+ --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;;
+ --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;;
+ --gdb) EXP=; OBS=; cat=GDB; tool=gdb; tool_prefix=debug; dot2suffix=;;
+ --dmalloc) EXP=; OBS=; cat=DMALLOC; tool=dmalloc; tool_prefix=debug; dot2suffix=;;
+ --duma) EXP=; OBS=; cat=DUMA; tool=duma; tool_prefix=debug; dot2suffix=;;
+ --strace) EXP=; OBS=; cat=STRACE; tool=strace; tool_prefix=debug; dot2suffix=;;
+ --ltrace) EXP=; OBS=; cat=LTRACE; tool=ltrace; tool_prefix=debug; dot2suffix=;;
+ --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs; dot2suffix=;;
+ --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs; dot2suffix=;;
+ --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs; dot2suffix=;;
+ --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs; dot2suffix=;;
+ --mpc) EXP=; OBS=; cat=MPC; tool=mpc; tool_prefix=companion_libs; dot2suffix=;;
+ --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=companion_libs; dot2suffix=;;
# Tools options:
-x|--experimental|+s) EXP=1;;
@@ -219,10 +219,7 @@ while [ $# -gt 0 ]; do
# Version string:
*) [ -n "${tool}" ] || { doHelp; exit 1; }
file_base="config/${tool_prefix}/${tool}.in"
- # Components have their version selection either
- # in the .in or the .in.2 file. Handle both.
- addToolVersion "$1" "${file_base}"
- addToolVersion "$1" "${file_base}.2"
+ addToolVersion "$1" "${file_base}${dot2suffix}"
;;
esac
shift