WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] tools/check: check for headers and libraries in

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tools/check: check for headers and libraries in EXTRA_INCLUDES and EXTRA_LIB
From: Roger Pau Monné <roger.pau@xxxxxxxxxxxxx>
Date: Wed, 19 Oct 2011 10:10:45 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 19 Oct 2011 01:12:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wKvRDVtpZmOnsVKiN/OgDM3U4Y2m93aIvagVkCjszDc=; b=cNywOeqk8VR/q+a7x9Tz1J+wCAH02ThEH40K0kxCsa7bkgQwIL+ZaNU4bHUDG9FpDP kCjAneo4iC39qsFMvHuFJukagXyjnpxAYP8UISJvmIHO/UkcN05F1YoJaKdmIvlkYnU7 5Qp+MIRkDrJAmJeXH+3cWjkDOVr15eCI1y2zU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20125.32034.710835.32455@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8fe2ca552de44aa679be.1318512275@loki> <20124.19527.706498.819017@xxxxxxxxxxxxxxxxxxxxxxxx> <CAPLaKK6=nU4R62KvxK++XGNx0zff89TNYZkTFizZ1wDbMqUBNg@xxxxxxxxxxxxxx> <20125.32034.710835.32455@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
2011/10/18 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
> Roger Pau Monné writes ("Re: [Xen-devel] [PATCH] tools/check: check for 
> headers and libraries in EXTRA_INCLUDES and EXTRA_LIB"):
>> 2011/10/17 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
>> > Perhaps this would be more easily achieved with "export" ?
>>
>> Exported variables are not passed to the called program (chk in this case).
>
> Are you sure ?  One purpose of "export" is to put the variable in the
> environment of commands make runs.

I'm not an expert on Makefiles, but from what I've found on the
internet, export is used to pass variables to sub-makefiles:
http://www.gnu.org/s/hello/manual/make/Variables_002fRecursion.html
but I couldn't find any reference about using export to pass variables
to executed commands. I've tried:

export PYTHON
export LIBXENAPI_BINDINGS
....
./chk build

And variables where not passed to executed script. At the end I think
the most suitable solution is to use:

PYTHON=$(PYTHON) \
LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) \
....
./chk build

To avoid having long lines. This way works fine, variables are passed
to the called script.

>> > The check_sys_root stuff seems unrelated ?  Or at least, it's not
>> > mentioned in your commit message.  I'm not sure if it should be
>> > disentangled but it should definitely be mentioned.  (I'm not much of
>> > an expert on tools/check.)
>>
>> The check_sys_root call was already there, just moved it to the top,
>> but I don't know if it's really necessary.
>
> Why do you move it ?

Because if I found the requested headers in one of the folders while
doing the for loop I perform a return 0, I could also perform a break
and left the check_sys_root at the end, but does it really matter that
much to check_sys_root at the start or at the end of has_header?
Looking at the code of the function it doesn't seem to matter when it
is performed.

> Ian.
>

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel