> RCS
   >      Any file `N' is extracted if necessary from an RCS file named
   >      either `N,v' or `RCS/N,v'.  `N' will not be extracted from RCS if it
   >      already exists, even if the RCS file is newer.  

The above rule, where the RCS file is newer, does not seem to work if the
location of the RCS'd file is in a directory defined by VPATH.  Enclosed is
a tar file but I'll explain the test case.  The directory structure is:

    drwxrwx--- alt      0 2000-03-17 17:01 make-bug2/
    -rw-rw---- alt     79 2000-03-17 17:01 make-bug2/Makefile
    drwxrwx--- alt      0 2000-03-17 17:00 make-bug2/foo/
    drwxrwx--- alt      0 2000-03-17 17:00 make-bug2/foo/RCS/
    -r--r----- alt    184 2000-03-17 16:40 make-bug2/foo/RCS/bar.old,v
    -r--r----- alt      8 1999-06-07 14:29 make-bug2/foo/bar.old

The makefile is:

    VPATH := foo

    foo: bar.new

    %.new:      %.old
        cp $^ $@ 

    clean:
        $(RM) *.new *.old

Typing "make" will "co" a copy of bar.old into the directory, which it
shouldn't.

    $ make
    co  foo/RCS/bar.old,v bar.old
    foo/RCS/bar.old,v  -->  bar.old
    revision 1.1
    done
    cp bar.old bar.new 

But if bar.old has a later timestamp than RCS/bar.old,v, "make" will not do
a "co".  

    $ touch foo/bar.old
    $ make clean
    rm -f *.old *.new
    $ make
    cp foo/bar.old bar.new 

This is with makefile 3.78.1.


bug.tgz

Reply via email to