The warning being in the 'obsolete' category. This is mostly to ease transition to Automake-NG (see commit v1.12.1-392-ga0c7b6a), and to discourage use of seldom-tested setups.
* automake.in (scan_texinfo_file): Warn against '@setfilename' directives that specify suffix-less output info files. * t/txinfo-without-info-suffix.sh: Adjust and enhance. * t/txinfo-makeinfo-error-no-clobber.sh: No longer use suffix-less info files in '@setfilename' directives. * t/primary-prefix-valid-couples.sh: Likewise. * t/txinfo-setfilename-repeated.sh: Likewise. * t/txinfo-vtexi2.sh : Likewise. * t/mdate2.sh: Likewise. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com> --- NEWS | 6 ++++++ automake.in | 9 ++++++--- t/mdate2.sh | 2 +- t/primary-prefix-valid-couples.sh | 2 +- t/txinfo-makeinfo-error-no-clobber.sh | 20 ++++++++++---------- t/txinfo-setfilename-repeated.sh | 6 ++++-- t/txinfo-vtexi2.sh | 2 +- t/txinfo-without-info-suffix.sh | 6 +++++- 8 files changed, 34 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index c5b6514..0e5455b 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,12 @@ New in 1.13.2: should take precedence over the same-named automake-provided macro (defined in '/usr/local/share/aclocal-1.14/vala.m4'). +* Obsolescent features: + + - Use of suffix-less info files (that can be specified through the + '@setfilename' macro in Texinfo input files) is discouraged, and + its use will raise warnings in the 'obsolete' category. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.13.1: diff --git a/automake.in b/automake.in index 0764258..2f60c18 100644 --- a/automake.in +++ b/automake.in @@ -2993,9 +2993,12 @@ sub scan_texinfo_file ($) next if $outfile; $outfile = $1; - # TODO: In Automake 1.14 (or even 1.13.2), start warning against - # TODO: suffixes != ".info", to ease transition to Automake-NG. - if ($outfile =~ /\.([^.]+)$/ && $1 ne 'info') + if (index ($outfile, '.') < 0) + { + msg 'obsolete', "$filename:$.", + "use of suffix-less info files is discouraged" + } + elsif ($outfile !~ /\.info$/) { error ("$filename:$.", "output '$outfile' has unrecognized extension"); diff --git a/t/mdate2.sh b/t/mdate2.sh index 79e414b..fa41864 100755 --- a/t/mdate2.sh +++ b/t/mdate2.sh @@ -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 diff --git a/t/primary-prefix-valid-couples.sh b/t/primary-prefix-valid-couples.sh index 502967f..17a2a9b 100755 --- a/t/primary-prefix-valid-couples.sh +++ b/t/primary-prefix-valid-couples.sh @@ -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 : > ar-lib diff --git a/t/txinfo-makeinfo-error-no-clobber.sh b/t/txinfo-makeinfo-error-no-clobber.sh index cddbc13..f4b7d01 100755 --- a/t/txinfo-makeinfo-error-no-clobber.sh +++ b/t/txinfo-makeinfo-error-no-clobber.sh @@ -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,16 +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 ! -e main-1 -test -f sub/main -test -f sub/main-1 +test -f main.info +test ! -e main.info-1 +test -f sub/main.info +test -f sub/main.info-1 : diff --git a/t/txinfo-setfilename-repeated.sh b/t/txinfo-setfilename-repeated.sh index 1731dff..d06b9b9 100755 --- a/t/txinfo-setfilename-repeated.sh +++ b/t/txinfo-setfilename-repeated.sh @@ -24,7 +24,7 @@ info_TEXINFOS = texinfo.texi END cat > texinfo.texi << 'END' -@setfilename texinfo +@setfilename texinfo.info ... @verbatim @setfilename example.info @@ -36,4 +36,6 @@ $ACLOCAL $AUTOMAKE --add-missing grep 'example' Makefile.in && exit 1 -grep 'texinfo:' Makefile.in +grep 'texinfo\.info:' Makefile.in + +: diff --git a/t/txinfo-vtexi2.sh b/t/txinfo-vtexi2.sh index 0d12cc3..72bad5d 100755 --- a/t/txinfo-vtexi2.sh +++ b/t/txinfo-vtexi2.sh @@ -26,7 +26,7 @@ info_TEXINFOS = zardoz.texi END cat > zardoz.texi << 'END' -@setfilename zardoz +@setfilename zardoz.info @include version.texi END diff --git a/t/txinfo-without-info-suffix.sh b/t/txinfo-without-info-suffix.sh index b87ceb8..29bfbc9 100755 --- a/t/txinfo-without-info-suffix.sh +++ b/t/txinfo-without-info-suffix.sh @@ -29,6 +29,7 @@ END cat > textutils.texi <<EOF \input texinfo +@c dummy comment @setfilename textutils @settitle main @node Top @@ -38,7 +39,10 @@ EOF $ACLOCAL $AUTOCONF -$AUTOMAKE --add-missing +AUTOMAKE_fails -a +$EGREP '^(\./)?textutils\.texi:3:.*suffix-less info file' stderr + +$AUTOMAKE -a -Wno-obsolete grep '^INFO_DEPS.*textutils$' Makefile.in -- 1.8.1.rc3.27.g3b73c7d