CompuServe Thread

#Makefile rule

3 messages in this thread
#114186From: Tom EshelmanJul 23, 1990 7:55 PM
Mike: Can you tell me why this won't work. I have a file containing some #include files called commhdr.z, which looks like this: * commhdr.z */ #include <fcntl.h> #include <workbench/startup.h> #include <workbench/workbench.h> #include <workbench/icon.h> #include <functions.h> /* ADDITION */ #include "funclist.h" /* ADDITION */ #include "globals.h" Here is my makefile, but my rule is totally ignored. I can force it however, with a cc -ho commhdr.pre commhdr.z #makefile #compile any file with a .z extension to a file of the same name, but #with a .pre extension. Use the -ho switch for a precompiled header. z.pre: cc -ho $@ $*.z #compile your .c file with the precompiled file above. comm.o: cc -hi commhdr.pre comm.c What is wrong with my rule? Thanks and regards. Tom Regards
#114250From: Mike Spille/ManxJul 24, 1990 9:44 AM
It appears you're missing your initial '.' in the z->pre rule. It should be: .z.pre: cc -ho $@ $*.z If you don't have that leading '.', the compiler won't consider it as a rule. -Mike
#114344From: Tom EshelmanJul 24, 1990 10:29 PM
Mike: Thanks. I was not only too, d… dumb to see the missing period, but I also commented out my next statement: $(OBJECTS): header.pre Fantastic, Esh! I was about to tell you the "fix" didn't work, 8-( when suddenly it dawned…. we require TWO dependencies! I gotta refer to the manual to see if they bothered to emphasize that fact. If not, maybe someone can put a tickler on it for the next printing. The importance of the precompiled header file can't be overemphasized. I'm studying the code to Comm 1.34, and I would be in deep muck without it. With it, the Aztec really flies. It is no big deal to make a change and recompile. Regards Tom