Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-10-31 12:16:14


Reece Dunn wrote:
> Rene Rivera wrote:
>
>>The "@()" is ultimately a "here document" functionality. With that in
>>mind I'd rather have it be as flexible as possible. My suggestion is to
>>use the standard variable expansion syntax to manage control of where
>>and how the document is put together. Like so:
>>
>>1) For a temporary file:
>>
>> @($(TMPFILE):S=.txt:E="This is some content.")
>>
>>And like your changes the @() would evaluate to the name of the
>>temporary file.
>
> I suggest that we also have the ability to control the lifetime of the
> file. Note that your syntax will complicate parsing and processing:
>
> @($(<[1]:W):F=.rsp:E=""$(>)" "-I$(INCLUDES)" -D$(DEFINES)")

What's ":W" and ":F"?

> vs.
>
> @("$(>)" "-I$(INCLUDES)" -D$(DEFINES))

Yes it will complicate it but not by much. The value would still be the
last item, by fiat, so that parsing is the same. For clarity here's the
ebnf of what I'm suggesting (all literals quoted):

"@("
( "$(TMPFILE)" | "$(STDOUT)" | "$(STDERR)" )
( ( ":B=" | ":S=" ) /value/ )*
( ":E=" /value/ )?
")"

> How about:
>
> @("$(>)" "-I$(INCLUDES)" -D$(DEFINES))="$(<[1]:W).rsp"

That's decidedly non-jam like. Specifically having the "outside" control
the "inside" of the expansion complicates understanding for the user,
and I think it will complicate the parsing even more than my suggestion.

> How about:
>
> @("$(>)" "-I$(INCLUDES)" -D$(DEFINES))=$(STDOUT)
> @("$(>)" "-I$(INCLUDES)" -D$(DEFINES))=$(STDERR)

Ditto ;-)

> That would be really neat. Note that in my code (with var_string_file),
> each string is separated by a newline character, not a space. Otherwise,
> you get a long like that is not too readable in the response file. If
> this is an issue, we sould pass the separator in the @(...) syntax, e.g.:
>
> @("$(>)" "-I$(INCLUDES)" -D$(DEFINES)|$(nl))="$(<[1]:W).rsp"
> ^^^^^^

Or we can leave that type of formatting to the variable value itself as
current jam variable values do (with my syntax):

@($(TMPFILE):S=.rsp:E=
"$(>)"
"-I$(INCLUDES)"
-D$(DEFINES)
)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
 

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