WAF quoting

Stefan (metze) Metzmacher metze at samba.org
Wed Jan 19 08:56:06 MST 2011


Hi Sam,

> The WAF setup is also pretty rotten at quoting environment variables it
> repeats.
> 
> If I do:
> export CPP="gcc -E"
> so that CPP is (without quotes): gcc -E
> 
> then samba build fails because WAF invokes a line like this:
> 01:36:22 runner  cd .. && CPP=gcc -E ...  /usr/bin/perl
> ".../samba.git/pidl/pidl" ... -- ".../samba.git/librpc/idl/atsvc.idl"
> /bin/sh: -E: command not found
> 
> The expression of CPP=gcc -E on the command line should be quoted.
> 
> On the other hand, if I export:
> CPP="'gcc -E'"
> then it works fine - but fails with samba alpha11 that does things in a
> more normal way.
> 
> I've not managed to find any wscript file responsible for this so it may
> be a general WAF deficiency.
> 
> I've can't work round it by adding the -E to CPPFLAGS because that
> doesn't take effect.
> 
> I've worked around it in a way that works for me, but I thought this may
> be useful to whoever is looking at build-environment portability.

Does this work for you?
http://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=c9cee5ceddd0c9b2d33c8a1e2e7577afd33dc03a

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110119/5f3fa944/attachment.pgp>


More information about the samba-technical mailing list