[bug #67195] surprising behavior with prerequisite search via vpath

Dmitry Goncharov <[email protected]>
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <[email protected]>
Follow-up Comment #1, bug #67195 (group make):

'all' depends on prerequisite '../include/file.x'.
Make performs directory search for prerequisite '../include/file.x'.
Prerequisite '../include/file.x' matches directory search pattern '%.x'.
Make discovers that there is '../include/file.x' in directory
'../lib/include'.
Make discovers that the timestamp of '../lib/include/../include/file.x'
matches the timestamp of '../lib/include/file.x'.

You can do one of the following
1.

vpath %.x lib/include
all: include/file.x
include/%.x: %.x
    mkdir include
    cp $< $@


2.

vpath %.x ../lib/include
all: ../dstinclude/file.x
../dstinclude/%.x: %.x
    mkdir ../dstinclude
    cp $< $@


3.

vpath %.x ../lib/include
all: ../include/file.y
../include/%.y: %.x
    mkdir ../include
    cp $< $@




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67195>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaENJxgAKCRCqLAuaBUf3
TiHJAQDdB16tabSEvy5YbZvDhnJaarsqSL5sitzy7FslP0owngD9FSlsrJGHE61A
KmhJAG+ZAPcQO46s8Ex9+kmbi0y4AQU=
=hrVJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.