Makefile help needed
John Chambers
jc at trillian.mit.edu
Sat Jul 2 08:14:47 EDT 2005
David Kramer wrote:
|
| If I do:
| all: target1 target2 target3 ../otherdir/troubletarget.o
| I get "make: *** No rule to make target ../otherdir/troubletarget.o"
| which I can understand, because it doesn't know where the C file is.
|
| HOWEVER, if I do:
| all: target1 target2 target3 ../otherdir/troubletarget.o
| it simply does not try to build it at all.
So what's the difference between those two lines? I tried aligning
them:
| all: target1 target2 target3 ../otherdir/troubletarget.o
| all: target1 target2 target3 ../otherdir/troubletarget.o
They appear to be identical, and when I feed the two lines to uniq,
they reduce to a single line. So whatever difference there was in
your message seems to have disappeared somewhere in the email system.
I do find a few lines like this in my makefiles, where a target is
built in another directory. Aside from the bother of needing a full
description of how to build the file (since the defaults don't work
for this case), it works fine. Maybe the problem is unique to the
release of make that you're using, so you should tell us that.
More information about the Discuss
mailing list