Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Paul D. Smith
Mon, 13 Apr 1992 06:09
Bug in GNU make 3.62?
Author: Paul D. Smith
Date: Mon, 13 Apr 1992 06:09
Date: Mon, 13 Apr 1992 06:09
55 lines
2607 bytes
2607 bytes
I think I've found a bug in GNU make 3.62 (I'm running on a DG AViiON
running DG/UX 5.4.1).
Problem:
When using pattern rules with multiple targets, if the first
examined target is found via the VPATH variable then that target
name is modified to use VPATH but the other targets are not.
However, the other targets *are* marked as updated, so they aren't
looked for via VPATH and so they are not found and the make fails.
I.e., suppose you have something like:
VPATH mydir
%.c %.h : %.fo
$(FOO) $^
all: blah.o foo.o
blah.o: blah.c foo.h
foo.o: foo.c foo.h
and you have a blah.c in the cwd, and foo.{fo,c,h} in `mydir' (where
foo.{c,h} have already been successfully built by the above rule).
What happens in this case is that foo.h is looked for first and found
in `mydir'. The entry for foo.h is changed to be `mydir/foo.h' and is
set to be "updated". Then all the "also_make" file entries (in this
case, foo.c) are set to be "updated" as well (remake.c:207:), but
their names are not modified with VPATH, so when the compile line is
executed it turns out to be:
cc -I mydir -c foo.c -o foo.o
(which fails) instead of the correct line:
cc -I mydir -c mydir/foo.c -o foo.o
I hacked a quick fix by changing the "also_make" update loop (again,
remake.c:207) to call file_mtime() and set the filename accordingly.
Another possible solution might be to not store the "updated" status
into the "also_make" files so they will be updated themselves
seperately, but I'm not sure if that will cause multiple executions of
the multiple-target rule. I leave it for Roland to find the "right"
solution! :-)
paul
-----
------------------------------------------------------------------
| Paul D. Smith | paul_smith@dg.com |
| Data General Corp. | pds@lemming.webo.dg.com |
| Network Systems Development Division | |
| Open Network Systems Development | "Pretty Damn S..." |
------------------------------------------------------------------
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