1 message in com.perforce.jammingOverriding CC Rule| From | Sent On | Attachments |
|---|---|---|
| lind...@liebert.com linda_farrenkopf@liebert.com | 27 Jul 1999 05:24 |
| Subject: | Overriding CC Rule![]() |
|---|---|
| From: | lind...@liebert.com linda_farrenkopf@liebert.com (lind...@liebert.com linda_farrenkopf@liebert.com) |
| Date: | 07/27/1999 05:24:30 AM |
| List: | com.perforce.jamming |
Thanks to everyone who replied on this. Yes, Dave's answer about overriding the actions instead of the rule was the key. Here was the final answer that worked in my case. In my Jamrules file, I placed the following lines,
actions Cc { $(CC) $(>) $(CCFLAGS) }
and it is working now.
------Original Message----- From: Dave Lewis <dle...@vignette.com> Sent: Friday, July 16, 1999 6:07 PM To: Linda Farrenkopf Cc: jamm...@perforce.com Subject: Re: Overriding CC Rule
> From: lind...@liebert.com > X-Mailer: ccMail Link to SMTP R8.31.00.5 > Date: Fri, 16 Jul 1999 17:36:04 -0400 > > I am a JAM newbie. I figured out how to do a UserObject in my jamrules to > specifiy my platform specific assembly language file extension. Now I have > another question. How do I override the JAM rule for c compilation and > assembling files? It is sticking stuff into the command line which is causing > my compiler not to work. For example, I want it to look like > > CC <filename> $(CCFLAGS) $(INCLUDEDIRS) > > and it comes out looking like > > CC /c $CFLAGS /Fo<outputfilename> /I<includedir> /I<includedir> <filename> > > I tried putting my own rule for Cc at the end of my Jamrules, but I may be > messing it up. Here is what I entered. > > rule Cc > { > CC $(<) $(CCFLAGS) ; > } > > Even with this in there, it still stuck in the /c,/F, and /I stuff which my > compiler can't understand. Any suggestions?
The rule part does not affect what shows up on the command line, that is the actions part. the rule section sets up dependencies and macros etc. So, in your rule above, you are invoking rule "CC" with $(<) and $(CCFLAGS) which are probably not the right sorts of arguments for the CC rule - it probably wants a list of source files...
You should look in the jambase or your jamrules for the Cc actions, and there you will see the application of the various macros, etc.
typically, macro values are set on specific targets with something like the ObjectCCFlags rule.
It takes a while to get used to the way this works. The rule definitions look as if they are procedural, but they are not strictly procedural, and they don't actually cause actions to happen unless targets need to be updated based on the dependencies.
Well, that's the general "feel" of it anyway!
dave
<< File: RFC822.TXT >>




