|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-10-23 08:57:02
David Abrahams wrote:
> Reece Dunn <msclrhd_at_[hidden]> writes:
>>David Abrahams wrote:
>>>Why would we want to keep the response files for failed targets? Oh,
>>>right, it's that whole mess with wanting to recreate the command
>>>manually :(
[1]
>>Would it be possible to do something like:
>> if (failed)
>> {
>> ECHO "== RESPONSE FILE ==" ;
>> ECHO $(rsp-contents) ;
>> ECHO "== END OF RESPONSE FILE ==" ;
>> RM $(rsp) ;
>> }
>>so we don't need to keep response files around, thus removing the
>>problem, but still allowing users to recreate the command manually.
>
> That would be a little nasty, but perhaps acceptable. What I really
> want more than anything is something that will preprocess a source
> file to the standard output. Actually, given a *source* file/target
> name on the command-line I'd like to be able to build all targets of
> which that file/target is an immediate dependency. I'd like to be
> able to optionally:
>
> - force only dependents to rebuild
> - force everything to rebuild (as with -a)
> - rebuild only on demand
[2]
>>Or, use a --show-response-files option that will do an
>> ECHO $(rsp-contents) ;
>>when the response file is created, removing the need for any spercial
>>failure detection. NOTE: This (or something similar) is what Matt's code
>>does.
>
> That's a little ugly. You get a compilation error; you want to
> diagnose it. Then you have to rebuild with --show-response-files,
> copy the response file contents and the rest of the command line,
> replace -c with -E, and invoke the compiler again to preprocess.
You only need to rebuild if we go for option [2]. Option [1] (see also
my [BBv2] response files - behaviour change (and solution!) thread for
details) will print the response file content along with the command
line on failure.
Alternatively, you can copy/rename the response file on failure to keep
it around, while allowing the response file target to be regenerated
properly and preventing problems with the above.
- Reece
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