Christoph Egger
2006-Dec-14 15:47 UTC
[Xen-devel] [PATCH] Portability patch for tools/check
Hi! I did a little off-list discussion with Jan. Attached is a patch, which makes the non-portable scripts in tools/check portable. Christoph _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Guillaume Rousse
2006-Dec-14 16:03 UTC
Re: [Xen-devel] [PATCH] Portability patch for tools/check
Christoph Egger wrote:> Hi! > > I did a little off-list discussion with Jan. > > Attached is a patch, which makes the non-portable scripts in tools/check > portable.I know I''m risking a flame war here, but why reinvent the wheel instead of using a dedicated build system (autotools, scons, cmake, whatever) ? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Dec-14 17:16 UTC
Re: [Xen-devel] [PATCH] Portability patch for tools/check
On Thu, Dec 14, 2006 at 04:47:19PM +0100, Christoph Egger wrote:> > Hi! > > I did a little off-list discussion with Jan. > > Attached is a patch, which makes the non-portable scripts in tools/check > portable. > > Christoph > > [Snip] > > diff -r 360eb996fa38 tools/check/check_python_devel > --- a/tools/check/check_python_devel Wed Dec 13 16:13:26 2006 +0000 > +++ b/tools/check/check_python_devel Thu Dec 14 15:46:50 2006 +0100 > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/bin/sh > # CHECK-BUILD > > function error { > @@ -7,10 +7,19 @@ function error { > exit 1 > } > > +RC=0 > + > python -c '' > import os.path, sys > for p in sys.path: > if os.path.exists(p + "/config/Makefile"): > sys.exit(0) > sys.exit(1) > -'' || error > +'' || RC=1 > + > +if test ${RC} -ne 0; then > + echo > + echo " *** Check for python development environment FAILED" > +fi > + > +exit ${RC}So we now have an uncalled error function at the top of the script. Is this intentional? What''s non-portable about functions anyway? POSIX.1 defines a function definition syntax (http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html). Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel