GNU bug report logs - #34201
Make @setfilename optional in Texinfo files

Previous Next

Package: automake;

Reported by: Gavin Smith <gavinsmith0123 <at> gmail.com>

Date: Fri, 25 Jan 2019 21:22:01 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Karl Berry <karl <at> freefriends.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34201: closed (Make @setfilename optional in Texinfo files)
Date: Mon, 15 Feb 2021 02:25:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 14 Feb 2021 19:24:02 -0700
with message-id <202102150224.11F2O2e1003541 <at> freefriends.org>
and subject line 
has caused the debbugs.gnu.org bug report #34201,
regarding Make @setfilename optional in Texinfo files
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
34201: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34201
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Gavin Smith <gavinsmith0123 <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: Make @setfilename optional in Texinfo files
Date: Fri, 25 Jan 2019 21:22:33 +0000
@setfilename should not be required to occur inside Texinfo files, as it 
makes it harder to get them working.

Earlier on this:
https://lists.gnu.org/archive/html/automake/2015-09/msg00000.html

Here is a patch.  I added a test which is passing now, but it wasn't 
passing when I first added the test, so am not sure if it is written 
correctly.  I based it on the existing test 
t/txinfo-setfilename-repeated.sh.

It says GPL version 2 in the licence because that's what was in the 
existing tests, although they should probably all be version 3.

ChangeLog entry:

Do not require @setfilename in Texinfo files.

* bin/automake.in (scan_texinfo_file): Derive name of info file from 
name of input file if no @setfilename line occurs in the file.
* t/texinfo-no-setfilename.sh: New test.

diff --git a/bin/automake.in b/bin/automake.in
index b4ae8f4..01e6a58 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3083,8 +3083,10 @@ sub scan_texinfo_file
 
   if (! $outfile)
     {
-      err_am "'$filename' missing \@setfilename";
-      return;
+      # Replace a .texi extension with .info
+      $outfile = basename($filename);
+      $outfile =~ s/\.[^.]+$//;
+      $outfile .= '.info';
     }
 
   return ($outfile, $vfile);
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 84dd29a..32fca84 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1214,6 +1214,7 @@ t/txinfo-no-clutter.sh \
 t/txinfo-no-extra-dist.sh \
 t/txinfo-no-installinfo.sh \
 t/txinfo-no-repeated-targets.sh \
+t/txinfo-no-setfilename.sh \
 t/txinfo-other-suffixes.sh \
 t/txinfo-override-infodeps.sh \
 t/txinfo-override-texinfo-tex.sh \
diff --git a/t/txinfo-no-setfilename.sh b/t/txinfo-no-setfilename.sh
new file mode 100644
index 0000000..3ef1730
--- /dev/null
+++ b/t/txinfo-no-setfilename.sh
@@ -0,0 +1,35 @@
+#! /bin/sh
+# Copyright (C) 2019 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 <https://www.gnu.org/licenses/>.
+
+# Check Texinfo files work without a @setfilename line
+
+. test-init.sh
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = file.texi
+END
+
+cat > file.texi << 'END'
+contents
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+
+
+grep 'file.info:' Makefile.in
+
+:


[Message part 3 (message/rfc822, inline)]
From: Karl Berry <karl <at> freefriends.org>
To: 34201-done <at> debbugs.gnu.org
Date: Sun, 14 Feb 2021 19:24:02 -0700


This bug report was last modified 4 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.