3 messages in com.perforce.jamming[jamming] Single Pseudo-Target| From | Sent On | Attachments |
|---|---|---|
| Markus Scherschanski | 07 Feb 2002 04:32 | |
| Jack...@NAI.com | 07 Feb 2002 05:10 | |
| Diane Holt | 07 Feb 2002 12:40 |
| Subject: | [jamming] Single Pseudo-Target![]() |
|---|---|
| From: | Jack...@NAI.com (Jack...@NAI.com) |
| Date: | 02/07/2002 05:10:05 AM |
| List: | com.perforce.jamming |
I think you can take the idea from my code below:
rule Msdev # projectname { local _t = $(1:S=.dsp) ; # make it : projectname.dsp local _wt = \"$(1) - Win32 $(BUILD)\" ; local _clean = [ FGristFiles clean ] ; # # find the .dsp file # SEARCH on $(_t) = $(SEARCH_SOURCE) ; #LOCATE on $(_t) = $(SEARCH_SOURCE) ; # # make all depend on the target (.dsp) # DEPENDS build : $(_t) ; DEPENDS all : build ; DEPENDS clean : $(_clean) ; # # always remake the target so 'msdev' decides what to rebuild # ALWAYS $(_t) ; # # msdev build target, for example: "NGExpertSvr - Win32 Debug" # if $(SUB_BUILD) { _wt = \"$(1) - Win32 $(SUB_BUILD) $(BUILD)\" ; } MSDEV_BUILD_TARGET on $(_t) = $(_wt) ; MSDEV_BUILD_TARGET on $(_clean) = $(_wt) ; # # run the 'msdev' project build # RunMsdev $(_t) ; # # use 'msdev' when target is 'clean' # RunMsdevClean $(_clean) : $(_t) ; }
-----Original Message----- From: Markus Scherschanski [mailto:MSch...@dspace.de] Sent: Thursday, February 07, 2002 6:33 AM To: 'jamm...@perforce.com' Subject: [jamming] Single Pseudo-Target
Hello folks,
I got a bit of a problem, I'm trying do create a target that is only called if the command line says it, I mean something like:
jam -f myjamfile cclean
It should be a substitution for the normal clean.
I tried several ways, look what I mean:
rule CClean
{ local _i ;
if $(UNLOCK_ONLY) != TRUE { ECHO removing object files and lib ; }
for _i in [ FGristFiles $(>) ] { UnlockIt $(_i) ; if $(UNLOCK_ONLY) != TRUE { CleanIt $(_i) ; } } }
actions existing CleanIt { echo deleting $(<) del $(<) }
actions existing UnlockIt { echo unlocking $(<) attrib -r $(<) }
CClean cclean : $(OBJ_FILES) $(LIB) ;
I also tried: NOTFILE cclean ; ALWAYS cclean ; DEPENDS ...
The phenomenon is that he calls the rule everytime and never executes the actions commands!!!
What can I do? What the rule does, should be clear, if not: I'll explain.
Many thanks. Hopefully, Markus
_______________________________________________ jamming mailing list - jamm...@perforce.com http://maillist.perforce.com/mailman/listinfo/jamming




