From: David Abrahams (dave_at_[hidden])
Date: 2002-12-20 19:33:12
"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.
-- 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