summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-01-01 20:59:53 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-01-02 13:09:36 +0100
commit2af418d1f8b9750f5395cfe897af4f726ad4667d (patch)
tree3c6b817a013d01985a57cda21d9cf40b458c0072
parent0a52679a428889c52166c4f6e493cec64fa917a4 (diff)
downloadautomake-2af418d1f8b9750f5395cfe897af4f726ad4667d.tar.gz
texi: warn against suffix-less info files
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.lattarini@gmail.com>
-rw-r--r--NEWS6
-rw-r--r--automake.in9
-rwxr-xr-xt/mdate2.sh2
-rwxr-xr-xt/primary-prefix-valid-couples.sh2
-rwxr-xr-xt/txinfo-makeinfo-error-no-clobber.sh20
-rwxr-xr-xt/txinfo-setfilename-repeated.sh6
-rwxr-xr-xt/txinfo-vtexi2.sh2
-rwxr-xr-xt/txinfo-without-info-suffix.sh6
8 files changed, 34 insertions, 19 deletions
diff --git a/NEWS b/NEWS
index c5b6514c0..0e5455b9b 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 076425869..2f60c1818 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 79e414b50..fa41864ed 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 502967f5e..17a2a9b03 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 cddbc1379..f4b7d01b1 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 1731dff96..d06b9b902 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 0d12cc3c0..72bad5d76 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 b87ceb8bd..29bfbc91d 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