[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 5/5] osstest: make ts-xen-build work on FreeBSD



This patch contains a new subroutine that guesses the right make
command to use (gmake on BSDs, make otherwise).

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-xen-build |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ts-xen-build b/ts-xen-build
index 661f186..d800396 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -28,6 +28,16 @@ selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
     
+sub get_make_cmd() {
+    my $uname = target_cmd_output_root($ho, 'uname -a', 200);
+
+    if ($uname =~ m/BSD/) {
+        return "gmake";
+    } else {
+        return "make";
+    }
+}
+
 sub checkout () {
     prepbuilddirs();
 
@@ -91,6 +101,7 @@ END
 }
 
 sub build () {
+    my $make_cmd = get_make_cmd();
     my $xend_opt= $r{enable_xend} =~ m/true/ ? "--enable-xend" : 
"--disable-xend";
     my $ovmf_opt= $r{enable_ovmf} =~ m/true/ ? "--enable-ovmf" : 
"--disable-ovmf";
 
@@ -112,7 +123,7 @@ END
 END
 #/;
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
-            $make_prefix make $makeflags @ARGV
+            $make_prefix $make_cmd $makeflags @ARGV
 END
 }
 
-- 
1.7.7.5 (Apple Git-26)


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.