[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Misleading RCS behaviour

From: Ben Elliston
Subject: Misleading RCS behaviour
Date: Thu, 7 Jun 2001 12:35:10 +1000 (EST)

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).


          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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]