|
Boost-Build : |
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-10-04 15:08:56
Vladimir Prus wrote:
> Hi,
> at the moment it's not easy to use SHELL with pkg-config, like this:
>
> LIBXML_INCLUDES = [ SHELL "pkg-config --cflags libxml-2.0" ] ;
>
> because pkg-config outputs a trailing newline, and then
>
> <cflags>$(LIBXML_INCLUDES)
>
> apparently does not work. Unix shell, when it process command substitution,
> e.g.
>
> `pkg-config --cflags libxml-2.0`
>
> removes trailing newline. I wonder if we should do the same in SHELL?
Actually it doesn't have to do with specifically with the trailing
newline. In Unix shells, bash, sh, ksh, etc. it will filter the output
of command output as arguments (``) such that it replaces all new-lines
with a space. For example try doing "echo `ls -1`". Since we have to
handle the case where want to see the new-lines, i.e. the complete raw
output I'd suggest adding another output processing option to
SHELL/COMMAND to act as the CLI shell do. Perhaps an "eol-delimited-output":
LIBXML_INCLUDES = [ SHELL "pkg-config --cflags libxml-2.0" :
eol-delimited-output ] ;
One might want to implement a 'ws-delimited-output' at the same time :-)
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk