... so that other build scripts can use it, too.

It now accepts one more parameter called "component" to be useful in
other build scripts.

No functional change.

Signed-off-by: Wei Liu <wei.l...@citrix.com>
Acked-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 Osstest/BuildSupport.pm | 15 +++++++++++++++
 ts-xen-build            | 20 +++-----------------
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index d59eace..d005ca9 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -36,6 +36,7 @@ BEGIN {
                       $whhost $ho
 
                       builddirsprops
+                      buildcmd_stamped_logged
                       $builddir $makeflags
 
                       prepbuilddirs
@@ -56,6 +57,20 @@ our ($whhost,$ho);
 our ($builddir,$makeflags);
 our ($xendist);
 
+sub buildcmd_stamped_logged ($$$$$$) {
+    my ($timeout, $component, $stampname, $prefix, $cmd, $suffix) = @_;
+    target_cmd_build($ho, $timeout, $builddir, <<END);
+        cd $component
+        $prefix
+        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
+        ) |tee ../$stampname-log
+        test -f ../$stampname-ok-stamp
+        $suffix
+        echo ok.
+END
+#/;
+}
+
 sub selectbuildhost {
     # pass \@ARGV
     my ($av) = @_;
diff --git a/ts-xen-build b/ts-xen-build
index d0b7612..07a69ec 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -108,20 +108,6 @@ END
                );
 }
 
-sub buildcmd_stamped_logged ($$$$$) {
-    my ($timeout, $stampname, $prefix, $cmd, $suffix) = @_;
-    target_cmd_build($ho, $timeout, $builddir, <<END);
-        cd xen
-        $prefix
-        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
-        ) |tee ../$stampname-log
-        test -f ../$stampname-ok-stamp
-        $suffix
-        echo ok.
-END
-#/;
-}
-
 sub build () {
     my $xend_opt= $r{enable_xend} =~ m/true/ ? "--enable-xend" : 
"--disable-xend";
     my $ovmf_opt= $r{enable_ovmf} =~ m/true/ ? "--enable-ovmf" : 
"--disable-ovmf";
@@ -130,7 +116,7 @@ sub build () {
     my $configure_suffix = $r{cmdsuffix_configure} // '';
     my $make_prefix =      $r{cmdprefix_make}      // '';
 
-    buildcmd_stamped_logged(600, 'configure', <<END,<<END,<<END);
+    buildcmd_stamped_logged(600, 'xen', 'configure', <<END,<<END,<<END);
             if test -f configure; then
                 if grep -q -- $xend_opt tools/configure ; then
                    xend=$xend_opt
@@ -145,13 +131,13 @@ END
 END
 #/;
 
-    buildcmd_stamped_logged(600, 'kconfig', '',<<END,'') if $dokconfig;
+    buildcmd_stamped_logged(600, 'xen', 'kconfig', '',<<END,'') if $dokconfig;
             if test -f xen/Kconfig; then
                 $make_prefix make -C xen olddefconfig
             fi
 END
 
-    buildcmd_stamped_logged(9000, 'build', '',<<END,'');
+    buildcmd_stamped_logged(9000, 'xen', 'build', '',<<END,'');
             $make_prefix make $makeflags @ARGV
 END
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to