I have discovered some misleading behaviour in GNU Make. It pertains
to the combination of RCS files and VPATH. Here is a Makefile that I
have written to demonstrate the problem. Suppose this is a Makefile
generated by `configure' -- ie. it resides in the "build tree" (see
diagram below).
VPATH=../foo
zog.o: zog.c
$(CC) -c $< -o $@
In foo, I have a source file (zog.c) under RCS control. According to
the Make documentation, if the file does not exist, it is checked out
using `co'. Fine, but the file is checked out in bar!
Thus, I now have:
+-- foo
| +- RCS
| +- zog.c,v
|
+-- bar
| +- Makefile
. +- zog.c
.
Things get weird if I check out a copy of the file into the source
tree (foo) and start working on it. Since the head revision was
checked out into bar, Make will do nothing more.
I suspect that the default RCS rules might need to be changed to make
the behaviour more intuitive in the presence of VPATH. If an RCS/,v
file is detected on the VPATH, the file should be checked out into the
subtree was found in.
This trap for young players caused me to spend a *lot* of time trying
to work out why my changes to the source tree were not taking effect
in the build tree. Comments?
Cheers, Ben
_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make