sco unix 3.2 make problem

Guy Harris guy at auspex.auspex.com
Tue Aug 7 04:46:54 AEST 1990


>I find it hard to believe that make is unable to process the dependacy
>just because it's in a non-current directory. After all, the token
>'../src/foo.c' could get passed to some open() or fopen() statement in C,
>and the open function can certainly find this file, can't it?

Yeah, but so what?  The problem isn't that "make" can't *find* the file,
it's that it doesn't know what to do with it once it's found it.  It
really *isn't* aware that, in order to make "foo.o", it should compile
"../src/foo.c"; it knows that "foo.o" *depends* on it, but it doesn't
understand what the dependency really is - the fact that its name ends
with ".c" and that the rest of the name matches what comes before ".o"
in the target nonwithstanding.

(This isn't specific to SCO UNIX 3.2, BTW.  SunOS 4.0.3's
"/usr/old/make", which is derived from the S5R2 "make", gave the same
behavior as SCO's S5R3.2-derived one; SunOS 4.0.3's "make", which is
mostly a Sun creation, does the same thing.)

Try giving it explicit rules to do that compilation, as in:

	foo.o: ../src/foo.c
		$(CC) $(CFLAGS) -c ../src/foo.c



More information about the Comp.unix.questions mailing list