From: David Abrahams (dave_at_[hidden])
Date: 2002-12-22 08:24:40
Rene Rivera <grafik666_at_[hidden]> writes:
> [2002-12-20] David Abrahams wrote:
>>"Felix E. Klee <felix.klee_at_[hidden]>" <felix.klee_at_[hidden]> writes:
>>> I'm a jam newbie and, therefore, started reading the "Getting Started
>>> with Jam/MR" tutorial available from Perforce's web site. However, I
>>> found that some examples work with Perforce's original jam but not
>>> with the jam as part of Boost 1.29.0. The source code of a file called
>>> test reads
>>> rule MyRule
>>> TouchFile $(1) ;
>>> actions TouchFile
>>> touch $(1)
>>> MyRule test.output1 ;
>>> MyRule test.output2 ;
>>> MyRule test.output3 ;
>>> When I run "jam -ftest test.output2" with Boost's jam (or bjam) I get
>>> the error messages
>>> don't know how to make all
>>> ...found 1 target...
>>> ...can't find 1 target...
>>> whereas I get the expected messages
>>> ...found 1 target(s)...
>>> ...updating 1 target(s)...
>>> TouchFile test.output2
>>> ...updated 1 target(s)...
>>> when using Perforce's jam. Am I doing something wrong or is this a
>>> bug/feature in Boost's Jam?
>>The problem is this:
>>Perforce Jam automatically updates everything that doesn't look like
>>an option on the command line. We wanted to be able to control what
>>gets updated, so we turned that off in core jam and wrote this little
>>thing in Jambase which does it programmatically:
>> for local e in $(ARGV[2-])
>> if ! [ MATCH "^(-).*" : $(e) ]
>> # This is not an option, so it is a target name.
>> UPDATE $(e) ;
>>Unfortunately, that broke compatibility with Perforce Jam for cases
>>where the users adds -f to the command-line. I don't think that was
>>intentional, so I guess I'd call it a bug. You can add the code above
>>to any file foo you use with -ffoo to get it to work like Perforce Jam
>>while we figure out what to do about it.
> I think I wrote that bit of code already at the bottom of build.jam. As in I
> copied the code and then noticed the bug in it, but hadn't changed Jambase
> version also.
One of us is confused. Please re-read the foregoing messages, Rene. I
didn't notice that there's any bug in the code above. Is there one?
The problem I noticed is that this behavior must be built into the Jam
core instead of the Jambase, or Jambase replacement with -fxxx will
not be transparent.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
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