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

Ben Franksen <[email protected]>
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/bugs/?67195>

                 Summary: surprising behavior with prerequisite search via
vpath
                   Group: make
               Submitter: bfrk
               Submitted: Fri 06 Jun 2025 01:10:18 PM GMT
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 06 Jun 2025 01:10:18 PM GMT By: Ben Franksen <bfrk>
A minimal example is attached, but it is so simple that I as well describe it
here completely. We have one Makefile and one prerequisite (file.x) in these
directories:

./lib/include/file.x
./src/Makefile

The Makefile is

vpath %.x ../lib/include

all: ../include/file.x

../include/%.x: %.x
	mkdir ../include
	cp $< $@

To reproduce, cd to "src", then run make. Expected behavior is for the recipe
to be run i.e.

	mkdir ../include
	cp ../lib/include/file.x ../include/file.x

What I get is

make: Nothing to be done for 'all'.

Note that the target file ../include/file.x does not exist. But it does exist
as a path relative to directory listed in the vpath and perhaps this is why
make (wrongly, IMO) thinks that there is nothing to be done?






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Name: make-bug.tar.gz  Size: 247B
<https://file.savannah.gnu.org/file/make-bug.tar.gz?file_id=57278>

    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-f813b1013199a1418f662e0b3e4d87aa8767f294.tar.gz

    _______________________________________________________

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

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaELowgAKCRCqLAuaBUf3
Tv4tAP9YulPBaC+kafx3IykA07xzotdRF1JUu+QvzEVkunf3AgEA0eqt5IoyOG9S
pzSh/ZLX1mrp/AxW59zZWtL5b4gzzQQ=
=jQ0V
-----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.