[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 09/11] 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> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> --- ts-xen-build | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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.9.3 (Apple Git-50) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |