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

Re: [Xen-devel] [PATCH v4 09/16] osstest: introduce a FreeBSD build script



On Thu, Jul 06, 2017 at 06:31:02PM +0100, Ian Jackson wrote:
> Roger Pau Monne writes ("Re: [PATCH v4 09/16] osstest: introduce a FreeBSD 
> build script"):
> > On Thu, Jul 06, 2017 at 04:25:24PM +0100, Ian Jackson wrote:
> > > Roger Pau Monne writes ("[PATCH v4 09/16] osstest: introduce a FreeBSD 
> > > build script"):
> >     my $srcversion = target_cmd_output_root($ho, <<END, 30);
> > set -e
> > cd $builddir/freebsd
> > eval `make buildenvvars`
> > test -n "\$SRCRELDATE"
> > echo "\$SRCRELDATE" | cut -c1-2
> > END
> > 
> > Which I think it's more bullet-proof.
> 
> LGTM.
> 
> Although I have to say, evaling the output of make seems brave.
> Does BSD make only ever print blather to stderr, then ?

That's a special target that's designed to work like this, I assume
this one is guaranteed to print everything else to stderr (and exit
with != 0).

I've changed the last line to:

expr "\$SRCRELDATE" / 100000

So that when FreeBSD reaches version 100 (in about ~200years), this
will still work.

Roger.

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

 


Rackspace

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