automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: honor only the first @setfilename


From: Alexandre Duret-Lutz
Subject: FYI: honor only the first @setfilename
Date: Sat, 30 Nov 2002 17:50:15 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu)

>>> "Karl" == Karl Berry <address@hidden> writes:

[...]

 Karl> BTW, as long as we're discussing this, I think automake takes the last
 Karl> @setfilename it sees, and it would be better to take the first.  I once
 Karl> had this in the Texinfo manual:

 Karl> ...
 Karl> @setfilename texinfo
 Karl> ...
 Karl> @verbatim
 Karl> @setfilename example.info
 Karl> @end verbatim
 Karl> ...

 Karl> and Automake thought the whole manual was being output to example.info.
 Karl> (I worked around this by not using @verbatim.)

Thanks.  I'm checking this in (HEAD & branch-1-7).

2002-11-30  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (scan_texinfo_file): Honor only the first @setfilename.
        * tests/texinfo17.test: New file.
        * tests/Makefile.am (TESTS): Add texinfo17.test.
        Reported by Karl Berry.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1365.2.16
diff -u -r1.1365.2.16 automake.in
--- automake.in 30 Nov 2002 15:35:41 -0000      1.1365.2.16
+++ automake.in 30 Nov 2002 16:49:11 -0000
@@ -3637,6 +3637,11 @@
     {
       if (/address@hidden +(\S+)/)
       {
+       # Honor only the first @setfilename.  (It's possible to have
+       # more occurences later if the manual shows examples of how
+       # to use @setfilename...)
+       next if $outfile;
+
         $outfile = $1;
         if ($outfile =~ /\.(.+)$/ && $1 ne 'info')
           {
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.443.2.8
diff -u -r1.443.2.8 Makefile.am
--- tests/Makefile.am   29 Nov 2002 21:53:55 -0000      1.443.2.8
+++ tests/Makefile.am   30 Nov 2002 16:49:13 -0000
@@ -411,6 +411,7 @@
 texinfo10.test \
 texinfo13.test \
 texinfo16.test \
+texinfo17.test \
 transform.test \
 unused.test \
 vars.test \
Index: tests/texinfo17.test
===================================================================
RCS file: tests/texinfo17.test
diff -N tests/texinfo17.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/texinfo17.test        30 Nov 2002 16:49:14 -0000
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2002  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 autoconf; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure Automake uses the _first_ @setfilname it sees.
+# Report from Karl Berry.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = texinfo.texi
+END
+
+cat > texinfo.texi << 'END'
address@hidden texinfo
+...
address@hidden
address@hidden example.info
address@hidden verbatim
+...
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+grep 'example' Makefile.in && exit 1
+grep 'texinfo:' Makefile.in
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]