[Coco] OT: Unix/Linux Makefile question
KnudsenMJ at aol.com
KnudsenMJ at aol.com
Sat Feb 5 22:59:56 EST 2005
In a message dated 2/3/05 9:49:37 AM Eastern Standard Time,
linville at tuxdriver.com writes:
You may want to investigate VPATH. I think it does the opposite of
what you want, but it may be workable for your purpose. It still
drops objects in the local dir, but pulls the sources from elsewhere.
You're right. I waded thru the info pages, and sure enough, VPATH is good
for finding sources elsewhere but insists that the "targets" (object files) be
in the current dir.
I found a related keyword, GPATH, that promised to do it right -- it can
look for *any* desired files in other listed dirs. But it just plain didn't
work -- no effect at all. I had moved my up-to-date *.o to a subdir, and
pointed GPATH at it, and nope -- Make insisted on remaking all my *.o right there
in pwd, cuz it didn't see nuthin', hear nuthin', etc.
I even upgraded my implicit rule
%.o: %.c
to allow for the moved *.o, but it wasn't needed, since the GPATH search
failed to engage.
Just love "features" that don't work. At least they didn't break anything.
But I've commented them back out of the Makefile for now.
Anyway, thanks to everyone for trying. There seems to be all kinds of
support for putting *sources* elsewhere -- many features to do that -- but not the
reverse. Oh well, been wading thru two dozen *.o for years, these good old
Bean Boots can take it a few more :-)
--Mike K.
More information about the Coco
mailing list