6 messages in com.perforce.jammingrule question| From | Sent On | Attachments |
|---|---|---|
| Dave...@vignette.com | 24 Feb 1999 10:35 | |
| Laur...@perforce.com | 24 Feb 1999 23:00 | |
| Dave...@vignette.com | 25 Feb 1999 08:43 | |
| Laur...@perforce.com | 25 Feb 1999 10:18 | |
| Dave...@vignette.com | 25 Feb 1999 10:47 | |
| Laur...@perforce.com | 25 Feb 1999 21:38 |
| Subject: | rule question![]() |
|---|---|
| From: | Laur...@perforce.com (Laur...@perforce.com) |
| Date: | 02/24/1999 11:00:40 PM |
| List: | com.perforce.jamming |
How is it that you end up giving an unrooted path name to a MakeLocate? A MakeLocate like:
MakeLocate <axe!bin>version.java : axe/bin ;
sets the effective output directory to './axe/bin', where '.' is the directory from which you invoke jam. That is, your output will end up in different locations every time you run jam from a different directory.
I think if you attach a root to that directory name your target id problems will clear up. E.g.:
MakeLocate <axe!bin>version.java : $(MY_OUTPUT)/axe/bin ;
(My guess is that your actual rule invocation *intends* to give a rooted directory name to MakeLocate, but some variable is not getting set right.)
---Laura
------------------------------------------------------------------------- Laura Wingerd lau...@perforce.com Voice: 1-510-864-7400 Perforce Software, Inc. www.perforce.com Fax: 1-510-864-5340
-------------------------------------------------------------------------
Dave Lewis writes:
I have a question about the following stuff
a typical rule invocation:
Main axe : axe.c ;
Which calls MainFromObjects, MainFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
which has the following stuff in it: (full rule at bottom)
rule MainFromObjects { local s t ;
# Add grist to file names
makeGristedName s : $(>) ;
makeSuffixed t $(SUFEXE) : $(<) ;
if $(t) != $(<) { DEPENDS $(<) : $(t) ; NOTFILE $(<) ; }
On nt systems, the exe will have a suffix, so I am wondering about the necessity of this code. It seems to me that the DEPENDS axe : axe.exe is unnecessary since nothing depends upon axe, and the exe target depends on axe.exe anyway.
The reason is that in other code, i say: MakeLocate <axe!bin>version.java : axe/bin ; and it tries to create directory axe, because the NOTFILE keeps it from checking its existence.
Do yall have any hints on this? I am inclined to either remove the
if $(t) != $(<) { DEPENDS $(<) : $(t) ; NOTFILE $(<) ; }
part, or perhaps grist the $(<), which might work too.
Thanks for any help.
dave
rule MainFromObjects { local s t ;
# Add grist to file names
makeGristedName s : $(>) ;
makeSuffixed t $(SUFEXE) : $(<) ;
if $(t) != $(<) { DEPENDS $(<) : $(t) ; NOTFILE $(<) ; }
# make compiled sources a dependency of target
DEPENDS exe : $(t) ; DEPENDS $(t) : $(s) ; MakeLocate $(t) : $(LOCATE_TARGET) ;
Clean clean : $(t) ;
Link $(t) : $(s) ;




