diff options
author | Alex Bennée | 2019-03-19 12:59:12 +0100 |
---|---|---|
committer | Alex Bennée | 2019-03-25 11:34:38 +0100 |
commit | 447e133f7a4d56e18967fb3c79b2ca2056ea6a78 (patch) | |
tree | 0afa1431613e1d4d453a775216f3366c01726957 | |
parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' in... (diff) | |
download | qemu-447e133f7a4d56e18967fb3c79b2ca2056ea6a78.tar.gz qemu-447e133f7a4d56e18967fb3c79b2ca2056ea6a78.tar.xz qemu-447e133f7a4d56e18967fb3c79b2ca2056ea6a78.zip |
configure: add --target-list-exclude
This is an inverse selection which excludes a selected set of targets
from the default target list. It will mostly be useful for CI
configurations but it might be useful for some users as well.
You cannot specify --target-list and --target-list-exclude at the same
time.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
-rwxr-xr-x | configure | 33 |
1 files changed, 30 insertions, 3 deletions
@@ -327,6 +327,7 @@ git="git" # Don't accept a target_list environment variable. unset target_list +unset target_list_exclude # Default value for a variable defining feature "foo". # * foo="no" feature will only be used if --enable-foo arg is given @@ -990,6 +991,14 @@ for opt do --cpu=*) ;; --target-list=*) target_list="$optarg" + if test "$target_list_exclude"; then + error_exit "Can't mix --target-list with --target-list-exclude" + fi + ;; + --target-list-exclude=*) target_list_exclude="$optarg" + if test "$target_list"; then + error_exit "Can't mix --target-list-exclude with --target-list" + fi ;; --enable-trace-backends=*) trace_backends="$optarg" ;; @@ -1601,9 +1610,26 @@ if [ "$bsd_user" = "yes" ]; then mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak" fi -for config in $mak_wilds; do - default_target_list="${default_target_list} $(basename "$config" .mak)" -done +if test -z "$target_list_exclude"; then + for config in $mak_wilds; do + default_target_list="${default_target_list} $(basename "$config" .mak)" + done +else + exclude_list=$(echo "$target_list_exclude" | sed -e 's/,/ /g') + for config in $mak_wilds; do + target="$(basename "$config" .mak)" + exclude="no" + for excl in $exclude_list; do + if test "$excl" = "$target"; then + exclude="yes" + break; + fi + done + if test "$exclude" = "no"; then + default_target_list="${default_target_list} $target" + fi + done +fi # Enumerate public trace backends for --help output trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' "$source_path"/scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/')) @@ -1622,6 +1648,7 @@ Standard options: --target-list=LIST set target list (default: build everything) $(echo Available targets: $default_target_list | \ fold -s -w 53 | sed -e 's/^/ /') + --target-list-exclude=LIST exclude a set of targets from the default target-list Advanced options (experts only): --source-path=PATH path of source code [$source_path] |