Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-10-31 19:39:31


Reece Dunn wrote:

[snip... yep]

> Now, we have @(FILE:E="EXPR") as the syntax. The response file code can get
> the FILE section and expand it to produce the name of the file (with STDOUT
> and STDERR having predefined behaviours). It can then pass the EXPR string
> to var_string_file to expand the string content to the file we have
> retrieved from FILE.

Yea, that sounds like a reasonable way to implement it. If you don't
have the time you can postpone implementing the STDOUT and STDERR
special cases.

> We would need at least 4 predefined strings:
> $(STDOUT) = STDOUT
> $(STDERR) = STDERR
> $(TMPDIR) = path_tmpdir()
> $(TMPFILE) = path_tmpdir() + "/" + tmpnam()

Yes, I forgot that one might just want a specific file in the tempdir :-)

> That way, you could have:
>
> @("c:/myfile.txt":E="Hello") - write to a non-temporary file
> @($(TMPFILE):E="World") - write to a temporary file
> @($(STDOUT):E="Hi console") - write to the output stream (console)
> @($(STDERR):E="oops!") - write to the error output stream

And also:

@("$(TMPDIR)/myfile.txt":E="In the temp dir.") - write to a
specific file in the temp directory.

Right?

> NOTE: Jam.html says that the :E=value syntax assigns value to the variable
> if it's not been set. According to this:
>
> @($(STDOUT):E="Hi") @($(STDOUT):E=" There")
>
> would only output "Hi" according to this and we would have the same problem
> w.r.t. response files! The behaviour of :E= inside @() would be to always
> override (if a file) or append (if STDOUT/ERR).

Yea, that makes sense. And it's OK for the semantics to be slightly
different as it's intuitive why they are different in this case.

>>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)
>>)
>
> Ok. I understand now :). I will start work on implementing this logic.

Cool... Thanks for working on this :-)

-- 
-- 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