Xref: utzoo comp.databases:10756 comp.unix.questions:32441 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!murphy!dwrsun2!perl From: perl@dwrsun2.UUCP (Robert Perlberg) Newsgroups: comp.databases,comp.unix.questions Subject: SUMMARY: Preprocessor dependencies in MAKE Message-ID: <2343@grand.dwrsun2.UUCP> Date: 25 Jun 91 18:43:38 GMT Organization: Dean Witter Reynolds Inc., New York Lines: 28 Thanks to all who submitted replys. The answer which best satisfies my needs was submitted by Tun-Lian ("Tony") Chang (toncha@auto-trol.com). This is the format that I am now using: RUNME = runme.o runme: $(RUNME) $(CC) $(CFLAGS) -o $@ $(RUNME) -lingres -lm %.c: %.sc esqlc $< %.o: %.c $(CC) $(CFLAGS) -c $< The thing I like about this method is that it is strictly hierarchical, i.e., the .o depends on the .c and the .c depends on the .sc, rather than the usual short-circuit approach of making the .o depend on the .sc. It also provides for having to specify the commands only once no matter how many modules are in the makefile. It also gracefully handles the intermixing of non-preprocessed C source files (make won't complain if it can't find a .sc for a .c). Robert Perlberg Dean Witter Reynolds Inc., New York murphy!dwrsun2!perl -- "I am not a language ... I am a free man!"