Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: Make dependencies and nested include files Message-ID: <20148@mimsy.UUCP> Date: 13 Oct 89 01:50:32 GMT References: <10115@encore.Encore.COM> <20139@mimsy.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <20139@mimsy.UUCP> I wrote: >Now, if test.c included `tconc.h', and tconc.h were to be built by >concatenating test.h and t12conc.h, and t12conc.h were to be built by >concatenating test1.h and test2.h, you could correctly write: > > test.c: tconc.h > tconc.h: test.h t12conc.h > cat test.h t12conc.h > $@ > t12conc.h: test1.h test2.h > cat test1.h test2.h > $@ Oops, I completely missed the fact that it is not test.c, but rather test.o, which depends on (is built from the changed version of) tconc.h, so the first line should read test.o: tconc.h Implicit rules add implicit dependencies, so that test.o: test.c is not actually required, unless there is an explicit action below, such as cc -DFOO ${CFLAGS} -c $@.c -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris