6 messages in com.perforce.jammingrule question
FromSent OnAttachments
Dave...@vignette.com24 Feb 1999 10:35 
Laur...@perforce.com24 Feb 1999 23:00 
Dave...@vignette.com25 Feb 1999 08:43 
Laur...@perforce.com25 Feb 1999 10:18 
Dave...@vignette.com25 Feb 1999 10:47 
Laur...@perforce.com25 Feb 1999 21:38 
Subject:rule question
From:Dave...@vignette.com (Dave@vignette.com)
Date:02/25/1999 08:43:17 AM
List:com.perforce.jamming

From: Laura Wingerd <lau@perforce.com>

> Date: Wed, 24 Feb 1999 23:01:02 -0800 (PST) > Cc: jamm@perforce.com > X-Mailer: ELM [version 2.4ME+ PL31 (25)] > MIME-Version: 1.0 > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: 7bit > Precedence: list > Errors-To: list@perforce.com > X-Sequence: 652 > > 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 ;

I was simplifying, it looks like:

MakeLocate $(v) : $(SEARCH_SOURCE) ;

dave

> > 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) ; >