Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Robert Serr 507-0429, 312
Thu, 23 Jul 1992 00:18
GNU make version 3.62: VPATH
Author: Robert Serr 507-0429, 312
Date: Thu, 23 Jul 1992 00:18
Date: Thu, 23 Jul 1992 00:18
32 lines
2619 bytes
2619 bytes
To the bug fixer, I have found what I think is a bug in the vpath command in version 3.62 of GNU MAKE. It doesn't work the way I would think it would after reading the documentation, but please inform me if it is supposed to work this way. I have two directories, one containing source (/work) and one containing binaries (/bin). They are on the same level (from work I do cd ../bin to get to /bin). I have prog1.c in /work which is more recent than the copy of prog1.o in /bin. My make file is also in /work. I set the vpath using both of the commands listed in the make file below, and it behaves the same way. When I run GNU MAKE, it will NOT recompile prog1.c like it should (since it is more recent than ../bin/prog1.o). It will instead li nk prog1.o. I would think that since vpath is supposed to make files seem as thought they are in the same directory, that the time stamps of these files should be compared, and that the more recent file should be used. I ran GNU MAKE -d to see what the thinking was. It looks like once a dependent (.o file) has been found in the alternative directory (../bin), that GNU MAKE will only search for implicit dependencies starting from the alternative directory (../bin/prog1..c, ../bin/prog1.p etc.). If the dependent (.o file) is in the current directory (.), then GNU MAKE will search for implicit dependencies in the alternative directory, as well as the current directory (prog1.c, prog1.p, ../bin/prog1.c, etc.). I would th ink that it should go both ways. Here is the Makefile: ############################################################################ # I tried both of the following ways: VPATH = ../bin #vpath %.o ../bin CFLAGS = -g objects = main.o prog1.o prog2.o prog3.o prog4.o dum: $(objects) cc -o dum $(CFLAGS) $^ main.o: main.h # end of Makefile ############################################################################# Would you please have a look at this and let me know as soon as possible if this is a bug, or if for some reason that it is supposed to be this way? If it is supposed to be this way, is there a way around it? Thank you very much. Bob Serr - bserr@andersen.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads