]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_OUTPUT): Remove $(srcdir), ${srcdir} and
authorPavel Roskin <proski@gnu.org>
Wed, 7 Feb 2001 15:04:52 +0000 (15:04 +0000)
committerPavel Roskin <proski@gnu.org>
Wed, 7 Feb 2001 15:04:52 +0000 (15:04 +0000)
@srcdir@ from VPATH if srcdir is "." and replace blank VPATH
lines with empty lines to preserve line numbers.
Original version by Derek Price.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index b5b2df08df0d1674a379133bea1bc73d6d259542..aeeffe2d08d883e5acfc3e2644d2f8e29f0f0417 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-07  Pavel Roskin  <proski@gnu.org>
+
+       * acgeneral.m4 (AC_OUTPUT): Remove $(srcdir), ${srcdir} and
+       @srcdir@ from VPATH if srcdir is "." and replace blank VPATH
+       lines with empty lines to preserve line numbers.
+       Original version by Derek Price.
+
 2001-02-07  +2001-02-06  Derek Price  <derek.price@openavenue.com>
 
        * acgeneral.m4 (_AC_LIBOBJ): Call AC_LIBSOURCE with '.c' extension
index 763beac0dc7cc802a245c96fed98b521930bbfb9..e278628e52ea46432fb04ef99776fafd502a9595 100644 (file)
@@ -3525,10 +3525,19 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH is dangerous, but if there is a colon in the path, we need to
-# keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub=['/^[       ]*VPATH[        ]*=[^:]*$/d']
+  ac_vpsub=['/^[       ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[   ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[     ]*$//;
+}']
 fi
 
 m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
index 763beac0dc7cc802a245c96fed98b521930bbfb9..e278628e52ea46432fb04ef99776fafd502a9595 100644 (file)
@@ -3525,10 +3525,19 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH is dangerous, but if there is a colon in the path, we need to
-# keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub=['/^[       ]*VPATH[        ]*=[^:]*$/d']
+  ac_vpsub=['/^[       ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[   ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[     ]*$//;
+}']
 fi
 
 m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])