2 messages in com.perforce.jamming[jamming] Perplexing behaviour of TEM...| From | Sent On | Attachments |
|---|---|---|
| Michael Beach | 12 Aug 2003 23:08 | |
| Michael Beach | 12 Aug 2003 23:19 |
| Subject: | [jamming] Perplexing behaviour of TEMPORARY![]() |
|---|---|
| From: | Michael Beach (mich...@ieee.org) |
| Date: | 08/12/2003 11:08:49 PM |
| List: | com.perforce.jamming |
Hello all. In one of my Jamfiles I have a file target marked TEMPORARY. However if the target exists when jam is invoked, the rule to build it is invoked even if it is up to date with respect to its dependencies. Is this a bug, or is this behaviour deemed desirable for some reason which has not occurred to me?
After searching the jamming archive for similar problems, I turned up http://maillist.perforce.com/pipermail/jamming/2002-September/001743.html however there seemed to be no response to this email.
The following Jamfile illustrates the problem...
##---------------------------------- SubDir TOP ;
rule Foo { Depends $(1) : $(2) ; Temporary $(2) ; }
rule Bar { Depends $(1) : $(2) ; }
actions Foo { sleep 1 cp $(2) $(1) }
actions Bar { sleep 1 cp $(2) $(1) }
Foo x : y ; Bar y : z ; ##----------------------------------
Assuming x, y and z don't initially exist, saying "touch z" and then "jam x" results in rules "Bar y" and "Foo x" being invoked. However further "jam x" commands always result in "Foo x", which is not what I was expecting.
Commenting out "Temporary $(2) ; " in the Jamfile gets rid of the invocations of "Foo x" but has the (expected) consequence of causing "Bar y" and "Foo x" to be invoked if "y" is missing.
Can anybody shed any light on this? Thanks.
Regards M.Beach




