|
Boost-Build : |
From: Jorge Suit Perez Ronda (josp.jorge_at_[hidden])
Date: 2007-04-23 05:37:58
There was a discussion about that in this forum, but I can not find de
thread. The work around is to remove the newline after getting the
output from the SHELL command:
rule trim-nl ( str )
{
return [ MATCH "([^
]*)" : $(str) ] ;
}
local incldir = [ trim-nl [ SHELL "apxs2 -q INCLUDEDIR" ] ] ;
note that MATCH receive a regular expression with the newline inside it,
you should not write "([^\n]*)"
hope it helps,
Andrej van der Zee wrote:
> Hi,
>
> I was wondering why the shell-command adds newlines to
> the output. This makes this feature rather useless.
> For example:
>
> local incldir = [ SHELL "apxs2 -q INCLUDEDIR" ] ;
>
> lib name
> : [ glob *.cpp ]
> : <include>$(incldir)
> ;
>
> Produces the following two (!) commands:
>
> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g
> -fPIC -I"../../src/cgi" -I"/usr/include/apache2
> " -I"/usr/local/ss50/include" -c -o
> "bin/gcc/debug/mod_authen.o" "mod_authen.cpp"
>
> If you look closely there is a newline in the include
> for apache2.
>
> I cannot think of any reason why the newline is added.
> Moreover, how can I make this to work?
>
> Thanks,
>
> Andrej
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
> your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
>
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