Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!nosc!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.unix.programmer Subject: Re: Make doesn't understand .SUFFIXES: .b .c .s .i .o Message-ID: <13951@dog.ee.lbl.gov> Date: 5 Jun 91 16:25:02 GMT References: <23182@shlump.lkg.dec.com> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 21 X-Local-Date: Wed, 5 Jun 91 09:25:02 PDT In article <23182@shlump.lkg.dec.com> jc@netrix.nac.dec.com writes: >If I tell [make] to make foo.c, it works, and then it knows how to make >foo.o from foo.c; the problem is that it doesn't seem to understand >the .b -> .c -> .o sequence ... This kind of thing---taking the b->c and c->o sequence and deriving the b->o sequence from that---is called `transitive closure'. Most `make' programs do not do transitive closure. What you must do, then, is define not only a b->c rule and a c->o rule but also a b->o rule. >What I've been doing is adding lines to the makefile like: > foo.c: foo.b >and then it works fine. Right: because this adds an implicit rule via an explicit dependency. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov