[Top][All Lists]

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

Re: Misleading RCS behaviour

From: tom_honermann
Subject: Re: Misleading RCS behaviour
Date: Thu, 7 Jun 2001 10:59:59 -0700

I don't agree that "zog.c" below should end up in the source tree (foo).
The reason that configure was designed to be able to generate a separate
"build tree" (bar)  was to support the idea of a read-only source tree.  If
"zog.c" were generated into foo, then a read-only source tree would not be

You can, of course, override the definition of CHECKOUT, CO, or COFLAGS in
your makefiles to change how 'co' is invoked and force it to create it in
your source tree (foo).


                    Elliston"            To:     address@hidden                 
                    <address@hidden        cc:                                  
                    om>                  Subject:     Misleading RCS behaviour  
                    Sent by:                                                    
                    07:35 PM                                                    

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

Bug-make mailing list

reply via email to

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