home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!sun-barr!decwrl!mips!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!drt
- From: drt@brolga.cc.uq.oz.au (David Taylor)
- Subject: Re: MAKE Question - am I asking too much?
- Message-ID: <drt.711759988@brolga>
- Keywords: MAKE HELP
- Sender: news@bunyip.cc.uq.oz.au (USENET News System)
- Organization: Prentice Centre, University of Queensland
- References: <drt.711704826@brolga> <Brr54t.DzE@scd.hp.com>
- Date: Tue, 21 Jul 1992 23:06:28 GMT
- Lines: 35
-
-
- mun@corp.hp.com (Duane T. Mun) writes:
-
- >> - checkout any files that are needed to satisfy the make.
- >$(HDRS) $(SRCS): # Check out sources and headers as needed
- > co $@
- Thank you for this one...works well.
-
- >> - pre-compile the C/SQL files.
- >> - compile the C files
- >test.o: dclgen.h # set up dependancies
- Shouldn't this also be dependant on test.c (or test.sc) ?
-
- >.c.o: # how to make .o from .c
- > $(CC) $(CFLAGS) -c $< $(INCDIRS)
- >
- >.sc.o: # how to make .o from .sc
- > $(CPP) -C -P $< > $*.cpp # get dclgen stuff
- > $(ESQLC) $*.cpp
- > $(CC) $(CFLAGS) -c $*.c $(INCDIRS)
- > rm -f $*.cpp $*.c
- I have almost exactly this but it fails under one circumstance:
- - If the .c file is still around from the last compile, it will not
- prep the .sc. This happens if the $(CC) fails because it will then
- miss the rm -f $*.c. It is a pain to remove these by hand every time
- the compile fails.
-
- I'm not sure why it does this, but it looks to me like it hits the
- .c.o target instead of the .sc.o target. I think I'm wrong here
- because swapping there order in the makefile makes no difference.
- I have a suspicion that the problem lies with the program targets.
-
- Any more ideas?
- --
- D.T
-