[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {maint} texi: warn against '.txi' and '.texinfo' input suffixes
From: |
Stefano Lattarini |
Subject: |
[FYI] {maint} texi: warn against '.txi' and '.texinfo' input suffixes |
Date: |
Tue, 1 Jan 2013 23:27:20 +0100 |
The warning being in the 'obsolete' category. This is mostly to
ease transition to Automake-NG (see commit v1.12.1-416-gd5459b9),
and to discourage use of seldom-tested setups.
* automake.in (handle_texinfo_helper): Warn against Texinfo input
files with '.txi' or '.texinfo' suffixes.
* NEWS: Update.
* t/txinfo-other-suffixes.sh: Adjust and enhance.
* t/txinfo-no-repeated-targets.sh: No longer use '.txi' and
'.texinfo' extensions.
Signed-off-by: Stefano Lattarini <address@hidden>
---
NEWS | 5 +++++
automake.in | 16 +++++++++++-----
t/txinfo-no-repeated-targets.sh | 6 +++---
t/txinfo-other-suffixes.sh | 10 ++++++++--
4 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/NEWS b/NEWS
index 0e5455b..c9ad88a 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,11 @@ New in 1.13.2:
'@setfilename' macro in Texinfo input files) is discouraged, and
its use will raise warnings in the 'obsolete' category.
+ - Use of Texinfo input files with '.txi' or '.texinfo' extensions
+ is discouraged, and its use will raise warnings in the 'obsolete'
+ category. You are advised to simply use the '.texi' extension
+ instead.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.13.1:
diff --git a/automake.in b/automake.in
index 386bbf2..7a863cf 100644
--- a/automake.in
+++ b/automake.in
@@ -3146,11 +3146,17 @@ sub handle_texinfo_helper ($)
($info_texinfos->value_as_list_recursive (inner_expand => 1))
{
my $infobase = $texi;
- # TODO: In Automake 1.14 (or even 1.13.2), start warning against
- # TODO: suffixes != ".texi", to ease transition to Automake-NG.
- $infobase =~ s/\.(txi|texinfo|texi)$//;
-
- if ($infobase eq $texi)
+ if ($infobase =~ s/\.texi$//)
+ {
+ 1; # Nothing more to do.
+ }
+ elsif ($infobase =~ s/\.(txi|texinfo)$//)
+ {
+ msg_var 'obsolete', $info_texinfos,
+ "suffix '.$1' for Texinfo files is discouraged;" .
+ " use '.texi' instead";
+ }
+ else
{
# FIXME: report line number.
err_am "texinfo file '$texi' has unrecognized extension";
diff --git a/t/txinfo-no-repeated-targets.sh b/t/txinfo-no-repeated-targets.sh
index c9b977a..99894f5 100755
--- a/t/txinfo-no-repeated-targets.sh
+++ b/t/txinfo-no-repeated-targets.sh
@@ -19,12 +19,12 @@
. test-init.sh
cat > Makefile.am << 'END'
-info_TEXINFOS = maude.texi liver.txi heart.texinfo
+info_TEXINFOS = maude.texi liver.texi heart.texi
END
echo '@setfilename maude.info' > maude.texi
-echo '@setfilename liver.info' > liver.txi
-echo '@setfilename heart.info' > heart.texinfo
+echo '@setfilename liver.info' > liver.texi
+echo '@setfilename heart.info' > heart.texi
: > texinfo.tex
$ACLOCAL
diff --git a/t/txinfo-other-suffixes.sh b/t/txinfo-other-suffixes.sh
index 11f3a04..cbb3afa 100755
--- a/t/txinfo-other-suffixes.sh
+++ b/t/txinfo-other-suffixes.sh
@@ -14,7 +14,8 @@
# 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 '.txi' extension works.
+# Test to make sure '.txi' and '.texinfo' extensions are deprecated,
+# but still work.
. test-init.sh
@@ -27,7 +28,12 @@ echo '@setfilename bar.info' > bar.texinfo
: > texinfo.tex
$ACLOCAL
-$AUTOMAKE
+AUTOMAKE_fails
+grep "^Makefile\.am:.*suffix '.txi'.*Texinfo file.*discouraged" stderr
+grep "^Makefile\.am:.*suffix '.texinfo'.*Texinfo file.*discouraged" stderr
+grep "^Makefile\.am:.* use '.texi' instead" stderr
+
+$AUTOMAKE -Wno-obsolete
grep '^\.txi\.info: *$' Makefile.in
grep '^\.texinfo\.info: *$' Makefile.in
--
1.8.1.rc3.27.g3b73c7d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {maint} texi: warn against '.txi' and '.texinfo' input suffixes,
Stefano Lattarini <=