Make doesn't understand .SUFFIXES: .b .c .s .i .o

Chris Torek torek at elf.ee.lbl.gov
Thu Jun 6 02:25:02 AEST 1991


In article <23182 at shlump.lkg.dec.com> jc at 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 at ee.lbl.gov



More information about the Comp.unix.programmer mailing list