WAF quoting
Sam Liddicott
sam at liddicott.com
Wed Jan 19 03:36:15 MST 2011
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.
Sam
More information about the samba-technical
mailing list