texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Makefile.am, maintain/regenerate_commands_pe


From: Patrice Dumas
Subject: branch master updated: * tp/Makefile.am, maintain/regenerate_commands_perl_info.pl: hardcode output file name in regenerate_commands_perl_info.pl, to avoid emptying the result file because of the redirection if the command failed completely.
Date: Sun, 02 Oct 2022 11:59:25 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 06287ae8e0 * tp/Makefile.am, 
maintain/regenerate_commands_perl_info.pl: hardcode output file name in 
regenerate_commands_perl_info.pl, to avoid emptying the result file because of 
the redirection if the command failed completely.
06287ae8e0 is described below

commit 06287ae8e0a9d9373bc7f86ee4bfdbcf50eb11aa
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Oct 2 17:59:11 2022 +0200

    * tp/Makefile.am, maintain/regenerate_commands_perl_info.pl:
    hardcode output file name in regenerate_commands_perl_info.pl, to
    avoid emptying the result file because of the redirection if the
    command failed completely.
---
 ChangeLog                                    |  9 ++++++++-
 tp/Makefile.am                               |  2 +-
 tp/maintain/regenerate_commands_perl_info.pl | 24 ++++++++++++------------
 3 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e420db310c..626dd6b6f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-10-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.am, maintain/regenerate_commands_perl_info.pl:
+       hardcode output file name in regenerate_commands_perl_info.pl, to
+       avoid emptying the result file because of the redirection if the
+       command failed completely.
+
 2022-10-02  Patrice Dumas  <pertusus@free.fr>
 
        * NEWS, tp/Texinfo/ParserNonXS.pm,
@@ -10394,7 +10401,7 @@
        tp/Texinfo/Convert/HTML.pm, tp/Texinfo/Convert/LaTeX.pm,
        tp/Texinfo/Convert/TexinfoXML.pm, tp/Texinfo/Convert/Text.pm,
        tp/init/chm.pm, tp/texi2any.pl:
-       move the opened output file registration API completly to
+       move the opened output file registration API completely to
        Texinfo::Common, renaming open_out() as output_files_open_out()
        and moving converter_unclosed_files(), register_close_file()
        converter_opened_files() from Convert::Converter to 
diff --git a/tp/Makefile.am b/tp/Makefile.am
index 9f7cd54a82..527e70a472 100644
--- a/tp/Makefile.am
+++ b/tp/Makefile.am
@@ -323,7 +323,7 @@ Texinfo/ModulePath.pm: Texinfo/ModulePath.pm.in Makefile
 
 Texinfo/Commands.pm: Texinfo/XS/parsetexi/command_data.txt
        $(MKDIR_P) Texinfo
-       $(srcdir)/maintain/regenerate_commands_perl_info.pl < $< > $@
+       $(srcdir)/maintain/regenerate_commands_perl_info.pl < $<
 
 libsrcdir = $(srcdir)/maintain/lib
 
diff --git a/tp/maintain/regenerate_commands_perl_info.pl 
b/tp/maintain/regenerate_commands_perl_info.pl
index 4a2d44e06e..05fd832f0a 100755
--- a/tp/maintain/regenerate_commands_perl_info.pl
+++ b/tp/maintain/regenerate_commands_perl_info.pl
@@ -76,33 +76,33 @@ while (<>) {
   }
 }
 
-#open (OUT, ">Texinfo/Commands.pm") or die "Open Texinfo/Commands.pm: $!\n";
+open (OUT, ">Texinfo/Commands.pm") or die "Open Texinfo/Commands.pm: $!\n";
 
-print STDOUT "# Automatically generated from $0\n\n";
+print OUT "# Automatically generated from $0\n\n";
 
-print STDOUT "package Texinfo::Commands;\n\n";
+print OUT "package Texinfo::Commands;\n\n";
 
 foreach my $category (sort(keys(%command_categories))) {
-  print STDOUT "our %${category}_commands = (\n";
+  print OUT "our %${category}_commands = (\n";
   foreach my $type (sort(keys(%{$command_categories{$category}}))) {
     foreach my $command (sort(@{$command_categories{$category}->{$type}})) {
-      print STDOUT '  '.sprintf('%-25s', '"'.$command.'"')." => '$type',\n";
+      print OUT '  '.sprintf('%-25s', '"'.$command.'"')." => '$type',\n";
     }
   }
-  print STDOUT ");\n\n";
+  print OUT ");\n\n";
 }
 
-print STDOUT "\n";
-print STDOUT "# flag hashes\n";
+print OUT "\n";
+print OUT "# flag hashes\n";
 
 foreach my $hash_flag (sort(keys(%flags_hashes))) {
   # happens for 'txiinternalvalue' which is also brace
   next if ($command_categories{$hash_flag});
-  print STDOUT "our %${hash_flag}_commands = (\n";
+  print OUT "our %${hash_flag}_commands = (\n";
   foreach my $command (sort(@{$flags_hashes{$hash_flag}})) {
-    print STDOUT '  '.sprintf('%-25s', '"'.$command.'"')." => 1,\n";
+    print OUT '  '.sprintf('%-25s', '"'.$command.'"')." => 1,\n";
   }
-  print STDOUT ");\n\n";
+  print OUT ");\n\n";
 }
 
-print STDOUT "1;\n";
+print OUT "1;\n";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]