diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2016-03-09 14:34:28 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2016-03-29 10:58:16 +0200 |
commit | 95be0056caede52359e11ef0a16b7ba72c3920dd (patch) | |
tree | 8aa308e701c7a03b51bd8925c93e34c6277ecbe1 | |
parent | e2996542c85140707bf5e0c97159d608ea6f21d9 (diff) |
Add support for --extraconfig <tool>=<path> option.
Change-Id: Iad2016cb3692c9320555a982311d5792b1a95ac0
-rwxr-xr-x | abe.sh | 13 | ||||
-rwxr-xr-x | jenkins.sh | 3 | ||||
-rwxr-xr-x | lib/configure.sh | 10 |
3 files changed, 25 insertions, 1 deletions
@@ -26,6 +26,7 @@ usage() [--disable {install|update|make_docs|building}] [--dryrun] [--dump] [--enable {bootstrap|gerrit}] [--excludecheck {all|glibc|gcc|gdb|binutils}] + [--extraconfig <tool>=<path>] [--fetch <url>] [--force] [--help] [--host <host_triple>] [--infrastructure] [--interactive] [--list] [--manifest <manifest_file>] @@ -194,6 +195,9 @@ OPTIONS --check gdb --excludecheck gdb --check gdb + --extraconfig <tool>=<path> + Use an additional configuration file for tool. + --fetch <url> Fetch the specified URL into the snapshots directory. @@ -765,6 +769,8 @@ do_excludecheck= do_build= do_build_stage=stage2 +declare -A extraconfig + # Process the multiple command line arguments while test $# -gt 0; do # Get a URL for the source code for this toolchain component. The @@ -832,6 +838,13 @@ while test $# -gt 0; do shift ;; + --extraconfig|-extraconfig) + check_directive $1 extraconfig extraconfig $2 + extraconfig_tool=`echo $2 | sed 's/\(.*\)=.*/\1/'` + extraconfig_val=`echo $2 | sed 's/.*=\(.*\)/\1/'` + extraconfig[${extraconfig_tool}]="${extraconfig_val}" + shift + ;; --host|-h*) host=$2 shift @@ -94,11 +94,12 @@ rebuild=true orig_parameters="$@" -OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild -- "$@"`" +OPTS="`getopt -o s:g:c:w:o:f:l:rt:b:h -l override:,gcc-branch:,snapshots:,gitrepo:,abe:,workspace:,options:,fileserver:,logserver:,logname:,languages:,runtests,target:,bootstrap,help,excludecheck:,norebuild,extraconfig: -- "$@"`" while test $# -gt 0; do case $1 in --gcc-branch) change="$change gcc=$2"; shift ;; --override) change="$change $2"; shift ;; + --extraconfig) change="${change} --extraconfig $2" ;; -s|--snapshots) user_snapshots=$2; shift ;; -g|--gitrepo) git_reference=$2; shift ;; -c|--abe) abe_dir=$2; shift ;; diff --git a/lib/configure.sh b/lib/configure.sh index 679444c2..73d6a5b4 100755 --- a/lib/configure.sh +++ b/lib/configure.sh @@ -133,6 +133,16 @@ configure_build() exit 1 fi + local this_extraconfig="${extraconfig[${toolname}]}" + if test -n "${this_extraconfig}"; then + if test -e "${this_extraconfig}"; then + notice "Sourcing extra config: ${this_extraconfig}" + . "${this_extraconfig}" + else + error "Warning: extraconfig file does not exist: ${this_extraconfig}" + exit 1 + fi + fi # See if this component depends on other components. They then need to be # built first. |