From e75e5d8b72a0757b3a3074652e34166b4482b562 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 26 Mar 2006 07:52:08 +0000 Subject: [PATCH] * aclocal.in ($m4_include_rx): Do not recognize `include', and adjust scan_configure_dep and scan_file accordingly. (scan_configure_dep): Do not search white lines. (scan_file): Strip comments from current line after checking for serial, so that aclocal does not trip on `m4_include' macros in comments. Report from Mike Frysinger. * tests/acloca21.test: New file. * tests/Makefile.am (TESTS): Add it. --- ChangeLog | 14 ++++++++++++-- THANKS | 1 + aclocal.in | 17 ++++++++++++----- doc/stamp-vti | 2 +- doc/version.texi | 2 +- tests/Makefile.am | 1 + tests/Makefile.in | 53 +++++++++++++++++++++++++++-------------------------- tests/acloca21.test | 36 ++++++++++++++++++++++++++++++++++++ 8 files changed, 91 insertions(+), 35 deletions(-) create mode 100755 tests/acloca21.test diff --git a/ChangeLog b/ChangeLog index cdc5176..ffe24c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-03-25 Mike Frysinger (tiny change) + Alexandre Duret-Lutz + + * aclocal.in ($m4_include_rx): Do not recognize `include', and + adjust scan_configure_dep and scan_file accordingly. + (scan_configure_dep): Do not search white lines. + (scan_file): Strip comments from current line after checking + for serial, so that aclocal does not trip on `m4_include' macros + in comments. Report from Mike Frysinger. + * tests/acloca21.test: New file. + * tests/Makefile.am (TESTS): Add it. + 2006-03-24 Stepan Kasal * tests/mmodely.test: Fix the test on systems with no lex. @@ -25,7 +37,6 @@ * doc/automake.texi (Macro search path): Document it. * tests/dirlist2.test: New test. * m4/dirlist, tests/Makefile.am: Adjust. - * NEWS, THANKS: Update. 2006-03-20 Ralf Wildenhues @@ -39,7 +50,6 @@ * tests/Makefile.am: Adjust. * doc/automake.texi (Objective C Support): New node. (Support for Other Languages): Adjust. - * NEWS: Update. 2006-03-19 Ralf Wildenhues diff --git a/THANKS b/THANKS index 9eb0db3..2692551 100644 --- a/THANKS +++ b/THANKS @@ -174,6 +174,7 @@ Merijn de Jonge M.de.Jonge@cwi.nl Michael Brantley Michael-Brantley@deshaw.com Michel de Ruiter mdruiter@cs.vu.nl Mike Castle dalgoda@ix.netcom.com +Mike Frysinger vapier@gentoo.org Mike Nolta mrnolta@princeton.edu Miles Bader miles@ccs.mt.nec.co.jp Miloslav Trmac trmac@popelka.ms.mff.cuni.cz diff --git a/aclocal.in b/aclocal.in index 2e9bb84..b2738e4 100644 --- a/aclocal.in +++ b/aclocal.in @@ -134,10 +134,10 @@ my $ac_defun_rx = # Matches an AC_REQUIRE line. my $ac_require_rx = "AC_REQUIRE\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)"; -# Matches an m4_include line -my $m4_include_rx = "(?:m4_)?(s?)include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)"; +# Matches an m4_include line. +my $m4_include_rx = "(m4_|m4_s|s)include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)"; -# Match a serial number +# Match a serial number. my $serial_line_rx = '^#\s*serial\s+(\S*)'; my $serial_number_rx = '^\d+(?:\.\d+)*$'; @@ -348,12 +348,14 @@ sub scan_configure_dep ($) # Remove comments from current line. s/\bdnl\b.*$//; s/\#.*$//; + # Avoid running all the following regexes on white lines. + next if /^\s*$/; while (/$m4_include_rx/go) { my $ifile = $2 || $3; # Skip missing `sinclude'd files. - next if $1 eq 's' && ! -f $ifile; + next if $1 ne 'm4_' && ! -f $ifile; push @ilist, $ifile; } @@ -486,6 +488,11 @@ sub scan_file ($$$) } } + # Remove comments from current line. + # Do not do it earlier, because the serial line is a comment. + $line =~ s/\bdnl\b.*$//; + $line =~ s/\#.*$//; + while ($line =~ /$ac_defun_rx/go) { $defun_seen = 1; @@ -528,7 +535,7 @@ sub scan_file ($$$) { my $ifile = $2 || $3; # Skip missing `sinclude'd files. - next if $1 eq 's' && ! -f $ifile; + next if $1 ne 'm4_' && ! -f $ifile; push (@inc_files, $ifile); $inc_lines{$ifile} = $.; } diff --git a/doc/stamp-vti b/doc/stamp-vti index 172868c..c147971 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 21 March 2006 +@set UPDATED 25 March 2006 @set UPDATED-MONTH March 2006 @set EDITION 1.9a @set VERSION 1.9a diff --git a/doc/version.texi b/doc/version.texi index 172868c..c147971 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 21 March 2006 +@set UPDATED 25 March 2006 @set UPDATED-MONTH March 2006 @set EDITION 1.9a @set VERSION 1.9a diff --git a/tests/Makefile.am b/tests/Makefile.am index 55c4e68..847ff8a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -23,6 +23,7 @@ acloca17.test \ acloca18.test \ acloca19.test \ acloca20.test \ +acloca21.test \ acoutnoq.test \ acoutpt.test \ acoutpt2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 78cf559..16fdbf8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -35,32 +35,33 @@ TESTS = aclibobj.test aclocal.test aclocal3.test aclocal4.test \ aclocal9.test acloca10.test acloca11.test acloca12.test \ acloca13.test acloca14.test acloca15.test acloca16.test \ acloca17.test acloca18.test acloca19.test acloca20.test \ - acoutnoq.test acoutpt.test acoutpt2.test acoutqnl.test \ - acoutbs.test acsilent.test acsubst.test acsubst2.test all.test \ - alloca.test alloca2.test alpha.test alpha2.test amassign.test \ - ammissing.test ansi.test ansi2.test ansi3.test ansi3b.test \ - ansi4.test ansi5.test ansi6.test ansi7.test ansi8.test \ - ansi9.test ansi10.test ar.test ar2.test asm.test autohdr.test \ - autohdr2.test autohdr3.test autohdr4.test automake.test \ - auxdir.test auxdir2.test auxdir3.test auxdir4.test backsl.test \ - backsl2.test backsl3.test backsl4.test badline.test \ - badprog.test block.test bsource.test canon.test canon2.test \ - canon3.test canon4.test canon5.test ccnoco.test ccnoco2.test \ - check.test check2.test check3.test check4.test check5.test \ - checkall.test clean.test clean2.test colneq.test colneq2.test \ - colon.test colon2.test colon3.test colon4.test colon5.test \ - colon6.test colon7.test comment.test comment2.test \ - comment3.test comment4.test comment5.test comment6.test \ - comment7.test comment8.test comment9.test commen10.test \ - compile.test compile_f90_c_cxx.test compile_f_c_cxx.test \ - cond.test cond2.test cond3.test cond4.test cond5.test \ - cond6.test cond7.test cond8.test cond9.test cond10.test \ - cond11.test cond13.test cond14.test cond15.test cond16.test \ - cond17.test cond18.test cond19.test cond20.test cond21.test \ - cond22.test cond23.test cond24.test cond25.test cond26.test \ - cond27.test cond28.test cond29.test cond30.test cond31.test \ - cond32.test cond33.test cond34.test cond35.test cond36.test \ - cond37.test cond38.test condd.test condhook.test condinc.test \ + acloca21.test acoutnoq.test acoutpt.test acoutpt2.test \ + acoutqnl.test acoutbs.test acsilent.test acsubst.test \ + acsubst2.test all.test alloca.test alloca2.test alpha.test \ + alpha2.test amassign.test ammissing.test ansi.test ansi2.test \ + ansi3.test ansi3b.test ansi4.test ansi5.test ansi6.test \ + ansi7.test ansi8.test ansi9.test ansi10.test ar.test ar2.test \ + asm.test autohdr.test autohdr2.test autohdr3.test \ + autohdr4.test automake.test auxdir.test auxdir2.test \ + auxdir3.test auxdir4.test backsl.test backsl2.test \ + backsl3.test backsl4.test badline.test badprog.test block.test \ + bsource.test canon.test canon2.test canon3.test canon4.test \ + canon5.test ccnoco.test ccnoco2.test check.test check2.test \ + check3.test check4.test check5.test checkall.test clean.test \ + clean2.test colneq.test colneq2.test colon.test colon2.test \ + colon3.test colon4.test colon5.test colon6.test colon7.test \ + comment.test comment2.test comment3.test comment4.test \ + comment5.test comment6.test comment7.test comment8.test \ + comment9.test commen10.test compile.test \ + compile_f90_c_cxx.test compile_f_c_cxx.test cond.test \ + cond2.test cond3.test cond4.test cond5.test cond6.test \ + cond7.test cond8.test cond9.test cond10.test cond11.test \ + cond13.test cond14.test cond15.test cond16.test cond17.test \ + cond18.test cond19.test cond20.test cond21.test cond22.test \ + cond23.test cond24.test cond25.test cond26.test cond27.test \ + cond28.test cond29.test cond30.test cond31.test cond32.test \ + cond33.test cond34.test cond35.test cond36.test cond37.test \ + cond38.test condd.test condhook.test condinc.test \ condinc2.test condlib.test condman.test condman2.test \ conf2.test confdeps.test conff.test conff2.test confh.test \ confh4.test confh5.test config.test confincl.test conflnk.test \ diff --git a/tests/acloca21.test b/tests/acloca21.test new file mode 100755 index 0000000..6e4171f --- /dev/null +++ b/tests/acloca21.test @@ -0,0 +1,36 @@ +#! /bin/sh +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Make sure aclocal ignores include() commands in comments. +# Report from Mike Frysinger. +# Also make sure aclocal does not think 'include' is +# an Autoconf macro. + +. ./defs || exit 1 + +set -e + +cat >>configure.in <