[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: ignore missing 'sinclude'd files (PR/450).
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: ignore missing 'sinclude'd files (PR/450). |
Date: |
Thu, 03 Mar 2005 22:35:29 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD and branch-1-9 and will close the PR.
2005-03-03 Alexandre Duret-Lutz <address@hidden>
For PR automake/450:
* aclocal.in (scan_file, scan_configure_dep): Skip missing sincluded
files.
* automake.in (scan_autoconf_traces): Likewise.
* tests/sinclude.test: Augment.
Report from Peter Breitenlohner.
Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.104.2.6
diff -u -r1.104.2.6 aclocal.in
--- aclocal.in 3 Mar 2005 21:00:30 -0000 1.104.2.6
+++ aclocal.in 3 Mar 2005 21:28:27 -0000
@@ -108,7 +108,7 @@
$ac_require_rx = "AC_REQUIRE\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
# Matches an m4_include line
-$m4_include_rx = "(?:m4_)?s?include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
+$m4_include_rx = "(?:m4_)?(s?)include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
################################################################
@@ -252,7 +252,10 @@
while (/$m4_include_rx/go)
{
- push (@ilist, $1 || $2);
+ my $ifile = $2 || $3;
+ # Skip missing `sinclude'd files.
+ next if $1 eq 's' && ! -f $ifile;
+ push @ilist, $ifile;
}
while (/$ac_require_rx/go)
@@ -361,7 +364,9 @@
while (/$m4_include_rx/go)
{
- my $ifile = $1 || $2;
+ my $ifile = $2 || $3;
+ # Skip missing `sinclude'd files.
+ next if $1 eq 's' && ! -f $ifile;
# m4_include is relative to the directory of the file which
# perform the include, but we want paths relative to the
# directory where aclocal is run. Do not use
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1569.2.13
diff -u -r1.1569.2.13 automake.in
--- automake.in 1 Mar 2005 23:04:53 -0000 1.1569.2.13
+++ automake.in 3 Mar 2005 21:28:29 -0000
@@ -4813,6 +4813,9 @@
|| $macro eq 'm4_sinclude'
|| $macro eq 'sinclude')
{
+ # Skip missing `sinclude'd files.
+ next if $macro ne 'm4_include' && ! -f $args[1];
+
# Some modified versions of Autoconf don't use
# forzen files. Consequently it's possible that we see all
# m4_include's performed during Autoconf's startup.
Index: tests/sinclude.test
===================================================================
RCS file: /cvs/automake/automake/tests/sinclude.test,v
retrieving revision 1.10
diff -u -r1.10 sinclude.test
--- tests/sinclude.test 14 Nov 2003 21:26:01 -0000 1.10
+++ tests/sinclude.test 3 Mar 2005 21:28:29 -0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
@@ -31,6 +31,7 @@
AC_INIT([amsinclude], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
+sinclude([doesntexist.m4])
EOF
mkdir sub
@@ -49,6 +50,7 @@
: > Makefile.am
echo 'sinclude(sub/g.m4)' >> acinclude.m4
+echo 'm4_sinclude(sub/doesntexist.m4)' >> acinclude.m4
$ACLOCAL
@@ -57,6 +59,7 @@
$AUTOMAKE
+grep doesntexist Makefile.in && exit 1
grep MAGICALPIG Makefile.in
grep MAGICALHOG Makefile.in
grep GREPME Makefile.in
--
Alexandre Duret-Lutz
- FYI: ignore missing 'sinclude'd files (PR/450).,
Alexandre Duret-Lutz <=