]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] texi: drop support for suffix-less info files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 15 Jun 2012 20:52:36 +0000 (22:52 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 17 Jun 2012 07:57:34 +0000 (09:57 +0200)
Such support is seldom used, and will get in the way of future, useful
refactorings.  We can still re-introduce it at a later time, after the
dust is settled, if there are users' requests in this direction.

* automake.in (scan_texinfo_file): Error out if a input '.texi' file
specifies an output (in the '@setfilename' directive) that doesn't have
a '.info' extension.
(output_texinfo_build_rules): Simplify, by assuming generated info
files ought to have the '.info' extension.
* lib/am/texibuild.am: Likewise.
* NG-NEWS: Update
* t/txinfo3.sh: Remove as obsolete.
* t/txinfo-unrecognized-extension-2.sh: New test.
* t/primary-prefix-valid-couples.sh: Adjust to avoid spurious failures.
* t/txinfo17.sh: Likewise.
* t/txinfo20.sh: Likewise.
* t/vtexi2.sh: Likewise.
* t/mdate2.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
automake.in
lib/am/texibuild.am
t/mdate2.sh
t/primary-prefix-valid-couples.sh
t/txinfo-unrecognized-extension-2.sh [new file with mode: 0755]
t/txinfo17.sh
t/txinfo20.sh
t/txinfo3.sh [deleted file]
t/vtexi2.sh

diff --git a/NG-NEWS b/NG-NEWS
index 16d0074882dd491ba45b3f837d4da1f973b818b0..91ccbdea73f9e769f50b19bbdf7e66e09013c529 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -222,6 +222,8 @@ Distribution
 Obsolete Features Removed
 =========================
 
+* Extension-less info files are not supported anymore.
+
 * Support for the long-deprecated name 'configure.in' for the Autoconf
   input file (instead of the modern 'configure.ac') has been deprecated.
 
index 45f70ebcc8856a1a8939df67647f3f824b7f67f7..dbff5a8eb5b2e4030b412d7ec1a3496ca08e1a47 100644 (file)
@@ -2796,7 +2796,7 @@ sub scan_texinfo_file ($)
          next if $outfile;
 
          $outfile = $1;
-         if ($outfile =~ /\.([^.]+)$/ && $1 ne 'info')
+         if ($outfile !~ /\.info$/)
            {
              error ("$filename:$.",
                     "output '$outfile' has unrecognized extension");
index 349ef7ad5327b0081c052d9a5c0b8440dc26560b..dad84f367752d4e6369cc51ad27f68edee92a48d 100644 (file)
@@ -14,7 +14,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
+%.info: %%SOURCE_SUFFIX%
        $(if $(am__info_insrc),,@$(am__ensure_target_dir_exists))
 ## Back up the info files before running makeinfo. This is the cheapest
 ## way to ensure that
@@ -48,7 +48,7 @@
        fi; \
        rm -rf $$backupdir; exit $$rc
 
-INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
+INFO_DEPS += %DEST_INFO_PREFIX%.info
 
 %.dvi: %%SOURCE_SUFFIX%
        %AM_V_TEXI2DVI%$(am__ensure_target_dir_exists) && \
@@ -100,14 +100,14 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
          exit 1; \
        fi
 
-%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
-?INSRC?%DEST_INFO_PREFIX%%DEST_SUFFIX%: am__info_insrc=yes
+%DEST_INFO_PREFIX%.info: %SOURCE_REAL% %DEPS%
+?INSRC?%DEST_INFO_PREFIX%.info: am__info_insrc=yes
 
 %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
 %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
 %DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%
 
-%DEST_INFO_PREFIX%%DEST_SUFFIX% \
+%DEST_INFO_PREFIX%.info \
 %DEST_PREFIX%.dvi \
 %DEST_PREFIX%.pdf \
 %DEST_PREFIX%.html \
index 093de5ea973dca4f1e5b07fded365fdcf8294129..ef08121d330f608c89759f7cc40438420de44e59 100755 (executable)
@@ -29,7 +29,7 @@ END
 # Required when using Texinfo.
 : > texinfo.tex
 : > mdate-sh
-echo '@setfilename textutils' > textutils.texi
+echo '@setfilename textutils.info' > textutils.texi
 
 # Use "././" to confuse Automake into thinking this is a subdir build.
 $ACLOCAL
index 989ca4bad39cbd16bda5ace3a56339c4b50ca389..df21c6ba105211c633d8ff3a97e8b1db5d84b3c7 100755 (executable)
@@ -38,7 +38,7 @@ AC_DEFUN([AC_PROG_LIBTOOL],
 END
 
 # Other required files.
-echo '@setfilename foo' > foo.texi
+echo '@setfilename foo.info' > foo.texi
 : > texinfo.tex
 : > py-compile
 : > elisp-comp
diff --git a/t/txinfo-unrecognized-extension-2.sh b/t/txinfo-unrecognized-extension-2.sh
new file mode 100755 (executable)
index 0000000..aef97a9
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program 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.
+#
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that automake complains properly when texinfo input files
+# specify output info files with an invalid extension.
+
+. ./defs || Exit 1
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.texi bar.texi baz.texi
+END
+
+echo '@setfilename foo.inf'     > foo.texi
+echo '@setfilename bar'         > bar.texi
+echo '@setfilename baz.texi'    > baz.texi
+: > texinfo.tex
+
+$ACLOCAL
+AUTOMAKE_fails
+
+grep "foo\.texi:.* 'foo.inf'.*unrecognized extension" stderr
+grep "bar\.texi:.* 'bar'.*unrecognized extension" stderr
+grep "baz\.texi:.* 'baz.texi'.*unrecognized extension" stderr
+
+:
index a1fc0ec999e4958691a7a62d35ce91b8072630e9..f7438531b83eda45800db7f6134520ff54fcc2d6 100755 (executable)
@@ -24,7 +24,7 @@ info_TEXINFOS = texinfo.texi
 END
 
 cat > texinfo.texi << 'END'
-@setfilename texinfo
+@setfilename texinfo.info
 ...
 @verbatim
 @setfilename foobar.info
@@ -36,6 +36,6 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 
 grep 'foobar' Makefile.in && Exit 1
-grep 'texinfo:' Makefile.in
+grep 'texinfo\.info:' Makefile.in
 
 :
index 5c07880c13855fc3aeb5172ff7daf871f9eedfef..98c044ee4a9c5a243e52aeb07f4c6c7d52d61429 100755 (executable)
@@ -29,7 +29,7 @@ mkdir sub
 
 cat > main.texi << 'END'
 \input texinfo
-@setfilename main
+@setfilename main.info
 @settitle main
 @node Top
 Hello walls.
@@ -46,15 +46,15 @@ $AUTOCONF
 $MAKE
 
 # Feign more info files.
-: > main-1
-: > sub/main-1
+: > main.info-1
+: > sub/main.info-1
 
 # Break main.texi.
 $sleep
 cp main.texi main.old
 cat > main.texi << 'END'
 \input texinfo
-@setfilename main
+@setfilename main.info
 @settitle main
 @node Top
 @unknown_macro{Hello walls.}
@@ -63,14 +63,16 @@ END
 
 # makeinfo will bail out, but we should conserve the old info files.
 $MAKE && Exit 1
-test -f main
-test -f main-1
+test -f main.info
+test -f main.info-1
 
 # Restore main.texi, and break sub/main.texi.
 cp main.texi sub/main.texi
 mv main.old main.texi
 $MAKE && Exit 1
-test -f main
-test ! -f main-1
-test -f sub/main
-test -f sub/main-1
+test -f main.info
+test ! -f main.info-1
+test -f sub/main.info
+test -f sub/main.info-1
+
+:
diff --git a/t/txinfo3.sh b/t/txinfo3.sh
deleted file mode 100755 (executable)
index 7363c39..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
-#
-# This program 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.
-#
-# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure .info-less @setfilename works.
-
-required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = textutils.texi doc/automake-ng.texi
-.PHONY: echo-info-deps
-echo-info-deps:
-       echo ' ' $(INFO_DEPS) ' '
-END
-
-cat > textutils.texi <<EOF
-\input texinfo
-@setfilename textutils
-@settitle main
-@node Top
-Hello walls.
-@bye
-EOF
-
-mkdir doc
-cat > doc/automake-ng.texi <<EOF
-\input texinfo
-@setfilename automake-ng
-@settitle automake-ng
-@node Top
-Blurb.
-@bye
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE distcheck
-
-$MAKE
-test -f textutils
-test -f doc/automake-ng
-test ! -f textutils.info
-test ! -f doc/automake-ng.info
-
-$MAKE distdir
-test -f $distdir/textutils
-test -f $distdir/doc/automake-ng
-
-$MAKE echo-info-deps | grep '[ /]textutils '
-$MAKE echo-info-deps | grep '[ /]doc/automake-ng '
-
-:
index 18f1e9ed10854791922b46c7683538be93b380f9..8cde8c47f2f308fd2e35361cb9fd8eb9d410ca88 100755 (executable)
@@ -26,7 +26,7 @@ info_TEXINFOS = zardoz.texi
 END
 
 cat > zardoz.texi << 'END'
-@setfilename zardoz
+@setfilename zardoz.info
 @include version.texi
 END