[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 29/26] [ng] texi: drop support for '.txi' and '.tex
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 29/26] [ng] texi: drop support for '.txi' and '.texinfo' suffixes |
Date: |
Sun, 17 Jun 2012 13:02:56 +0200 |
The former was only needed to cater to 8+3 file systems (for which
we have dropped support anyway), and the latter was hardly used in
practice, it's extra "eye-candy" not worth complicating the code.
We now only accept and handle files with a '.texi' suffix.
* NG-NEWS: Update.
* automake.in (handle_texinfo_helper): Drop support for '.txi'
and '.texinfo' suffixes.
(scan_texinfo_files): Likewise.
* lib/am/texibuild.am: Simplify accordingly, assuming '.texi'
as the only valid suffix for Texinfo input files.
* t/txinfo-rules-once.sh: Resurrect this test, and enhance it
a little, also merging in the suitably adapted contents of ...
* t/txinfo9.sh: ... this test, now deleted.
* t/txinfo6.sh: Remove as obsolete.
Signed-off-by: Stefano Lattarini <address@hidden>
---
NG-NEWS | 7 ++++++
automake.in | 6 ++---
lib/am/texibuild.am | 22 ++++++----------
t/{txinfo9.sh => txinfo-rules-once.sh} | 32 +++++++++++++-----------
t/txinfo6.sh | 43 --------------------------------
5 files changed, 36 insertions(+), 74 deletions(-)
rename t/{txinfo9.sh => txinfo-rules-once.sh} (50%)
delete mode 100755 t/txinfo6.sh
diff --git a/NG-NEWS b/NG-NEWS
index 91ccbde..735dd50 100644
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -224,6 +224,13 @@ Obsolete Features Removed
* Extension-less info files are not supported anymore.
+* The only accepted suffix for input Texinfo files is now '.texi';
+ the once-accepted values '.txi' and '.texinfo' are not handled
+ anymore, and their use will trigger an error.
+
+Obsolete Features Removed
+=========================
+
* Support for the long-deprecated name 'configure.in' for the Autoconf
input file (instead of the modern 'configure.ac') has been deprecated.
diff --git a/automake.in b/automake.in
index 1b904a9..f940ed7 100644
--- a/automake.in
+++ b/automake.in
@@ -2835,7 +2835,7 @@ sub scan_texinfo_file ($)
}
my $infobase = basename ($filename);
- $infobase =~ s/\.te?xi(nfo)?$//;
+ $infobase =~ s/\.texi$//;
return ($outfile, $vfile,
map { "$infobase.$_" } (sort keys %clean_suffixes));
}
@@ -2865,7 +2865,7 @@ sub handle_texinfo_helper ($)
($info_texinfos->value_as_list_recursive (inner_expand => 1))
{
my $infobase = $texi;
- $infobase =~ s/\.(txi|texinfo|texi)$//;
+ $infobase =~ s/\.texi$//;
if ($infobase eq $texi)
{
@@ -2985,7 +2985,7 @@ sub handle_texinfo_helper ($)
# off for .info files that appear to be cleaned; this is
# for backward compatibility with package such as Texinfo,
# which do things like
- # info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+ # info_TEXINFOS = texinfo.texi info-stnd.texi info.texi
# DISTCLEANFILES = texinfo texinfo-* info*.info*
# # Do not create info files for distribution.
# dist-info:
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index bed4034..fd6a4b6 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -97,20 +97,14 @@ define am__texibuild_html
fi
endef
-define am__texi_rules_for_suffix
-%.info: %.$1
- $$(call am__texibuild_info,$$(am__info_insrc))
-%.dvi: %.$1
- $$(call am__texibuild_dvi_or_pdf,$$(AM_V_TEXI2DVI),$$(TEXI2DVI))
-%.pdf: %.$1
- $$(call am__texibuild_dvi_or_pdf,$$(AM_V_TEXI2PDF),$$(TEXI2PDF))
-%.html: %.$1
- $$(am__texibuild_html)
-endef
-
-## Keep the list of texi suffixes in sync with the '$infobase' transform
-## done 'automake:handle_texinfo_helper()'.
-$(foreach s,txi texi texinfo,$(eval $(call am__texi_rules_for_suffix,$s)))
+%.info: %.texi
+ $(call am__texibuild_info,$(am__info_insrc))
+%.dvi: %.texi
+ $(call am__texibuild_dvi_or_pdf,$(AM_V_TEXI2DVI),$(TEXI2DVI))
+%.pdf: %.texi
+ $(call am__texibuild_dvi_or_pdf,$(AM_V_TEXI2PDF),$(TEXI2PDF))
+%.html: %.texi
+ $(call am__texibuild_html)
## The way to make PostScript, for those who want it.
%.ps: %.dvi
diff --git a/t/txinfo9.sh b/t/txinfo-rules-once.sh
similarity index 50%
rename from t/txinfo9.sh
rename to t/txinfo-rules-once.sh
index eb2cbdc..c35ce9a 100755
--- a/t/txinfo9.sh
+++ b/t/txinfo-rules-once.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
@@ -14,28 +14,32 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure we only create texinfo-related targets once.
+# Some grepping checks on Texinfo support.
. ./defs || Exit 1
-cat > Makefile.am << 'END'
-info_TEXINFOS = maude.texi liver.txi heart.texinfo
-END
+echo AC_OUTPUT >> configure.ac
+
+$ACLOCAL
-echo '@setfilename maude.info' > maude.texi
-echo '@setfilename liver.info' > liver.txi
-echo '@setfilename heart.info' > heart.texinfo
: > texinfo.tex
-$ACLOCAL
+echo info_TEXINFOS = main.texi other.texi sub/x.texi > Makefile.am
+mkdir sub
+echo @setfilename main.info > main.texi
+echo @setfilename other.info > other.texi
+echo @setfilename sub/x.info > sub/x.texi
$AUTOMAKE
+$EGREP '\.(info|pdf|ps|dvi|html|texi)' Makefile.in # For debugging.
+test $(grep -c '^%\.info: %\.texi$' Makefile.in) -eq 1
+test $(grep -c '^%\.html: %\.texi$' Makefile.in) -eq 1
+test $(grep -c '^%\.dvi: %\.texi$' Makefile.in) -eq 1
+test $(grep -c '^%\.pdf: %\.texi$' Makefile.in) -eq 1
+test $(grep -c '^%\.ps: %\.dvi$' Makefile.in) -eq 1
-# These are just examples -- basically for many targets in texinfos.am
-# we only want them to appear once. But grepping them all would be
-# overkill.
for t in info dist-info dvi-am install-html uninstall-pdf-am; do
- $EGREP "(^| )$t*.:" Makefile.in # For debugging.
- test `$EGREP -c "(^| )$t(:| *.:)" Makefile.in` -eq 1
+ $FGREP $t Makefile.in # For debugging.
+ test $(grep -c "^$t *:" Makefile.in) -eq 1
done
:
diff --git a/t/txinfo6.sh b/t/txinfo6.sh
deleted file mode 100755
index 05997b1..0000000
--- a/t/txinfo6.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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/>.
-
-# Make sure '.txi' and '.texinfo' are accepted Texinfo extensions.
-
-. ./defs || Exit 1
-
-echo AC_OUTPUT >> configure.ac
-echo info_TEXINFOS = foo.txi doc/bar.texinfo > Makefile.am
-
-mkdir doc
-echo '@setfilename foo.info' > foo.txi
-echo '@setfilename bar.info' > doc/bar.texinfo
-: > texinfo.tex
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
-for fmt in info pdf dvi html; do
- $MAKE -n "$fmt" > stdout || { cat stdout; Exit 1; }
- cat stdout
- for basename in foo doc/bar; do
- grep "[/ $tab]$basename\\.$fmt[; $tab]" stdout
- done
-done
-
-:
--
1.7.9.5