diff mbox

[OSSTEST,1/3] ts-xen-build: Support passing arguments to configure

Message ID 1478701847-30651-2-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson Nov. 9, 2016, 2:30 p.m. UTC
No functional change with existing callers.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-xen-build | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/ts-xen-build b/ts-xen-build
index 3e53d74..7dfcda7 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -37,7 +37,15 @@  while (@ARGV && $ARGV[0] =~ m/^-/) {
 	die "$_ ?";
     }
 }
+
+my ($dashdashdash) = grep { $ARGV[$_] eq '---' } 0..$#ARGV;
+my (@configure_args, @make_args);
+$dashdashdash //= -1;
+@configure_args = @ARGV[0..$dashdashdash-1];
+@make_args      = @ARGV[$dashdashdash+1..$#ARGV];
+
 # remaining arguments are passed as targets to "make"
+# if there is a ---, those before that are arguments to "configure"
 
 builddirsprops();
 
@@ -126,7 +134,7 @@  sub build () {
                     ovmf=$ovmf_opt
                 fi
 END
-               $configure_prefix ./configure --sysconfdir=/etc \$xend \$ovmf $configure_suffix
+               $configure_prefix ./configure --sysconfdir=/etc \$xend \$ovmf $configure_suffix @configure_args
 END
             fi
 END
@@ -139,7 +147,7 @@  END
 END
 
     buildcmd_stamped_logged(9000, 'xen', 'build', '',<<END,'');
-            $make_prefix make $makeflags @ARGV
+            $make_prefix make $makeflags @make_args
 END
 
     if ($enable_xsm) {