[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch to fix bug in VPATH in generated Makefile
From: |
Mo DeJong |
Subject: |
Patch to fix bug in VPATH in generated Makefile |
Date: |
Tue, 22 Apr 2003 16:55:06 -0700 |
This patch fixes the following problem that I ran into in a misc package:
% make
make: *** No rule to make target `threadCmd.o', needed by `libthread2.5g.so'.
Stop.
I found that this was being caused by the following in the generated Makefile:
@@ -258 +258 @@
-VPATH = $(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
+VPATH = /generic:$(srcdir)/unix:$(srcdir)/win
The bug is in autoconf 2.57, it hosed up the VPATH of a
perfectly good Makefile.in.
I found that I could work around it by passing --srcdir=`pwd` or
building outside the srcdir, but here is the real fix:
P.S.
It might be a good idea to not hose with the VPATH at all if
it is know that GNU make is being used.
2003-04-22 Mo DeJong <address@hidden>
* lib/autoconf/status.m4 (AC_OUTPUT): When srcdir is "."
and the VPATH in the Makefile is being modified, make
sure the trailing / is removed since the current
code will break perfectly good Makefiles. Also,
make the subst global so that multiple srcdir
values will get substituted.
A Makefile.in line like:
VPATH = $(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
Should produce a Makefile like:
VPATH = generic:unix:win
But the buggy code instead produced:
VPATH = /generic:$(srcdir)/unix:$(srcdir)/win
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvs/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.33
diff -u -r1.33 status.m4
--- lib/autoconf/status.m4 28 Feb 2003 10:11:12 -0000 1.33
+++ lib/autoconf/status.m4 22 Apr 2003 23:36:18 -0000
@@ -1218,9 +1218,9 @@
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
ac_vpsub=['/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:address@hidden@:*/:/;
+s/:*\$(srcdir)\/:*/:/g;
+s/:*\${srcdir}\/:*/:/g;
+s/:address@hidden@\/:*/:/g;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
- Patch to fix bug in VPATH in generated Makefile,
Mo DeJong <=