texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/maintain/regenerate_C_options_info.pl, tp/ma


From: Patrice Dumas
Subject: branch master updated: * tp/maintain/regenerate_C_options_info.pl, tp/maintain/regenerate_commands_perl_info.pl, tp/maintain/regenerate_documentlanguages-iana.pl, tp/maintain/regenerate_documentlanguages-loc.pl, tp/maintain/regenerate_perl_options_info.pl, tp/maintain/setup_accent_tables.pl, tp/maintain/setup_converters_code_tables.pl: add the information that a generated file is automatically generated if missing. Use the basename to name the script generating the code files such that the file content is the sa [...]
Date: Sat, 10 Aug 2024 09:09:00 -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 584a597ebb * tp/maintain/regenerate_C_options_info.pl, 
tp/maintain/regenerate_commands_perl_info.pl, 
tp/maintain/regenerate_documentlanguages-iana.pl, 
tp/maintain/regenerate_documentlanguages-loc.pl, 
tp/maintain/regenerate_perl_options_info.pl, 
tp/maintain/setup_accent_tables.pl, 
tp/maintain/setup_converters_code_tables.pl: add the information that a 
generated file is automatically generated if missing. Use the basename to name 
the script generating the code files such that the f [...]
584a597ebb is described below

commit 584a597ebba3d542dc3ca54c50f79f8fde995d7e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 10 15:08:57 2024 +0200

    * tp/maintain/regenerate_C_options_info.pl,
    tp/maintain/regenerate_commands_perl_info.pl,
    tp/maintain/regenerate_documentlanguages-iana.pl,
    tp/maintain/regenerate_documentlanguages-loc.pl,
    tp/maintain/regenerate_perl_options_info.pl,
    tp/maintain/setup_accent_tables.pl,
    tp/maintain/setup_converters_code_tables.pl: add the information that
    a generated file is automatically generated if missing.
    Use the basename to name the script generating the code files such
    that the file content is the same in in and out of source builds.
    
    * tp/Texinfo/XS/Makefile.am (Commands.pm, Options.pm): depend on the
    generating script.
---
 ChangeLog                                        | 16 ++++++++++++++++
 tp/Texinfo/XS/Makefile.am                        |  4 ++--
 tp/maintain/regenerate_C_options_info.pl         | 10 +++++++---
 tp/maintain/regenerate_commands_perl_info.pl     |  6 +++++-
 tp/maintain/regenerate_documentlanguages-iana.pl |  6 +++++-
 tp/maintain/regenerate_documentlanguages-loc.pl  |  6 +++++-
 tp/maintain/regenerate_file_lists.pl             |  2 +-
 tp/maintain/regenerate_perl_options_info.pl      |  6 +++++-
 tp/maintain/setup_accent_tables.pl               |  4 ++++
 tp/maintain/setup_converters_code_tables.pl      | 12 ++++++++++++
 10 files changed, 62 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a475594c1f..3da7bfde32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-08-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/maintain/regenerate_C_options_info.pl,
+       tp/maintain/regenerate_commands_perl_info.pl,
+       tp/maintain/regenerate_documentlanguages-iana.pl,
+       tp/maintain/regenerate_documentlanguages-loc.pl,
+       tp/maintain/regenerate_perl_options_info.pl,
+       tp/maintain/setup_accent_tables.pl,
+       tp/maintain/setup_converters_code_tables.pl: add the information that
+       a generated file is automatically generated if missing.
+       Use the basename to name the script generating the code files such
+       that the file content is the same in in and out of source builds.
+
+       * tp/Texinfo/XS/Makefile.am (Commands.pm, Options.pm): depend on the
+       generating script.
+
 2024-08-10  Gavin Smith <gavinsmith0123@gmail.com>
 
        * doc/tp_api/Makefile.am (texi2any_internals.texi):
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index fd9dd59444..d9a9537bda 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -255,11 +255,11 @@ MAINTAINERCLEANFILES += main/global_multi_commands_case.c 
\
 MAINTAINERCLEANFILES += main/global_commands_types.h
 
 # NOTE duplicate of a rule in ../../Makefile.am
-$(srcdir)/../Commands.pm: ../command_data.txt
+$(srcdir)/../Commands.pm: ../command_data.txt 
$(srcdir)/../../maintain/regenerate_commands_perl_info.pl
        $(PERL) $(srcdir)/../../maintain/regenerate_commands_perl_info.pl 
$(srcdir)/../Commands.pm < $(srcdir)/../command_data.txt
 
 # NOTE duplicate of a rule in ../../Makefile.am
-$(srcdir)/../Options.pm: $(srcdir)/../options_data.txt
+$(srcdir)/../Options.pm: $(srcdir)/../options_data.txt 
$(srcdir)/../../maintain/regenerate_perl_options_info.pl
        $(PERL) $(srcdir)/../../maintain/regenerate_perl_options_info.pl 
$(srcdir)/../Options.pm < $(srcdir)/../options_data.txt
 
 $(srcdir)/main/cmd_normalization.c $(srcdir)/main/cmd_unicode.c 
$(srcdir)/main/cmd_structuring.c $(srcdir)/main/cmd_symbol.c 
$(srcdir)/main/cmd_text.c: main/command_data.c ../Commands.pm ../Options.pm 
$(srcdir)/../../maintain/setup_converters_code_tables.pl
diff --git a/tp/maintain/regenerate_C_options_info.pl 
b/tp/maintain/regenerate_C_options_info.pl
index 72a7786bb9..350c77b759 100755
--- a/tp/maintain/regenerate_C_options_info.pl
+++ b/tp/maintain/regenerate_C_options_info.pl
@@ -22,6 +22,8 @@ use strict;
 
 use warnings;
 
+use File::Basename;
+
 my %option_categories;
 
 my %commands_options;
@@ -91,9 +93,11 @@ die "Need a header file\n" if (!defined($header_file));
 my $get_file = $ARGV[3];
 die "Need an XS code file\n" if (!defined($get_file));
 
+my $program_name = basename($0);
+
 open(HEADER, '>', $header_file)
       or die "Open $header_file: $!\n";
-print HEADER "/* Automatically generated from $0 */\n\n";
+print HEADER "/* Automatically generated from $program_name */\n\n";
 
 print HEADER "#ifndef OPTIONS_TYPES_H\n#define OPTIONS_TYPES_H\n\n";
 
@@ -126,7 +130,7 @@ close(HEADER);
 
 
 open(CODE, ">$code_file") or die "Open $code_file: $!\n";
-print CODE "/* Automatically generated from $0 */\n\n";
+print CODE "/* Automatically generated from $program_name */\n\n";
 
 print CODE '#include <config.h>'."\n\n";
 
@@ -256,7 +260,7 @@ close(CODE);
 
 
 open(GET, ">$get_file") or die "Open $get_file: $!\n";
-print GET "/* Automatically generated from $0 */\n\n";
+print GET "/* Automatically generated from $program_name */\n\n";
 
 print GET '
 /* Avoid namespace conflicts. */
diff --git a/tp/maintain/regenerate_commands_perl_info.pl 
b/tp/maintain/regenerate_commands_perl_info.pl
index 8558be63fa..49785ed8e4 100755
--- a/tp/maintain/regenerate_commands_perl_info.pl
+++ b/tp/maintain/regenerate_commands_perl_info.pl
@@ -22,6 +22,8 @@ use strict;
 
 use warnings;
 
+use File::Basename;
+
 # need this information to fill in automatically the index commands
 my %index_in_code = (
  'cp' => 0,
@@ -102,7 +104,9 @@ die "Need an output file\n" if (!defined($out_file));
 
 open(OUT, ">$out_file") or die "Open $out_file: $!\n";
 
-print OUT "# Automatically generated from $0\n\n";
+my $program_name = basename($0);
+
+print OUT "# Automatically generated from $program_name\n\n";
 
 print OUT "package Texinfo::Commands;\n\n";
 
diff --git a/tp/maintain/regenerate_documentlanguages-iana.pl 
b/tp/maintain/regenerate_documentlanguages-iana.pl
index f55bac8509..c924b92e08 100755
--- a/tp/maintain/regenerate_documentlanguages-iana.pl
+++ b/tp/maintain/regenerate_documentlanguages-iana.pl
@@ -18,6 +18,8 @@ use strict;
 
 use warnings;
 
+use File::Basename;
+
 my $dir = 'maintain';
 system ("cd $dir && wget -N 
http://www.iana.org/assignments/language-subtag-registry";);
 
@@ -40,9 +42,11 @@ if (!defined($entry->{'Type'})) {
   die "Type not defined for $entry ".join('|', keys(%$entry))."\n";
 }
 
+my $program_name = basename($0);
+
 open(OUT, ">Texinfo/Documentlanguages.pm") or die "Open 
Texinfo/Documentlanguages.pm: $!\n";
 
-print OUT "# This file was automatically generated from $0\n\n";
+print OUT "# This file was automatically generated from $program_name\n\n";
 
 print OUT "package Texinfo::Documentlanguages;\n\n";
 
diff --git a/tp/maintain/regenerate_documentlanguages-loc.pl 
b/tp/maintain/regenerate_documentlanguages-loc.pl
index 799d375cb1..9e4d0c4b51 100755
--- a/tp/maintain/regenerate_documentlanguages-loc.pl
+++ b/tp/maintain/regenerate_documentlanguages-loc.pl
@@ -19,6 +19,8 @@ use strict;
 
 use warnings;
 
+use File::Basename;
+
 use List::Util qw(first);
 # not in core perl
 use Text::CSV;
@@ -63,9 +65,11 @@ while (my $row = $csv->getline ($fh)) {
   }
 }
 
+my $program_name = basename($0);
+
 open(OUT, ">Texinfo/Documentlanguages.pm") or die "Open 
Texinfo/Documentlanguages.pm: $!\n";
 
-print OUT "# This file was automatically generated from $0\n\n";
+print OUT "# This file was automatically generated from $program_name\n\n";
 
 print OUT "package Texinfo::Documentlanguages;\n\n";
 
diff --git a/tp/maintain/regenerate_file_lists.pl 
b/tp/maintain/regenerate_file_lists.pl
index f829b71a0b..6200c2512e 100755
--- a/tp/maintain/regenerate_file_lists.pl
+++ b/tp/maintain/regenerate_file_lists.pl
@@ -19,7 +19,7 @@ use File::Find;
 use File::Basename;
 use File::Spec;
 
-my ($command, $mydir, $suffix) = fileparse($0);
+my ($program_name, $mydir, $suffix) = fileparse($0);
 my $parent = File::Spec->catdir($mydir, File::Spec->updir());
 chdir($parent) || die "chdir $parent: $!";
 -d "t" || (die "goodbye, no t directory in " . `pwd`);
diff --git a/tp/maintain/regenerate_perl_options_info.pl 
b/tp/maintain/regenerate_perl_options_info.pl
index e7fd1568be..399fef2489 100755
--- a/tp/maintain/regenerate_perl_options_info.pl
+++ b/tp/maintain/regenerate_perl_options_info.pl
@@ -22,6 +22,10 @@ use strict;
 
 use warnings;
 
+use File::Basename;
+
+my $program_name = basename($0);
+
 my %option_categories;
 
 while (<STDIN>) {
@@ -52,7 +56,7 @@ die "Need an output file\n" if (!defined($out_file));
 
 open (OUT, ">$out_file") or die "Open $out_file: $!\n";
 
-print OUT "# Automatically generated from $0\n\n";
+print OUT "# Automatically generated from $program_name\n\n";
 
 print OUT "package Texinfo::Options;\n\n";
 
diff --git a/tp/maintain/setup_accent_tables.pl 
b/tp/maintain/setup_accent_tables.pl
index ee426ace2b..3b4eb13525 100755
--- a/tp/maintain/setup_accent_tables.pl
+++ b/tp/maintain/setup_accent_tables.pl
@@ -24,6 +24,8 @@ use File::Spec;
 # for dirname and fileparse
 use File::Basename;
 
+my $program_name = basename($0);
+
 BEGIN
 {
   # NOTE we do not use Texinfo::ModulePath as it may not have been
@@ -57,6 +59,8 @@ die "Need a file\n"
 open (UEB, '>', $unicode_to_eight_bit_file_name)
    or die "Open $unicode_to_eight_bit_file_name: $!\n";
 
+print UEB "/* Automatically generated from $program_name */\n\n";
+
 print UEB "struct ENCODING_CODEPOINTS unicode_to_eight_bit[] = {\n";
 
 my %unicode_to_eight_bit = %Texinfo::Convert::Unicode::unicode_to_eight_bit;
diff --git a/tp/maintain/setup_converters_code_tables.pl 
b/tp/maintain/setup_converters_code_tables.pl
index 66a7845506..41b9876588 100755
--- a/tp/maintain/setup_converters_code_tables.pl
+++ b/tp/maintain/setup_converters_code_tables.pl
@@ -30,6 +30,8 @@ use File::Basename;
 
 use Encode;
 
+my $program_name = basename($0);
+
 BEGIN
 {
   # do not load XS code, to avoid both depending on and generating
@@ -143,6 +145,8 @@ my %extra_unicode_map = 
%Texinfo::Convert::Unicode::extra_unicode_map;
 
 open(UNIC, '>', $unicode_file) or die "Open $unicode_file: $!\n";
 
+print UNIC "/* Automatically generated from $program_name */\n\n";
+
 print UNIC '#include "unicode.h"'."\n\n";
 print UNIC "DIACRITIC_UNICODE unicode_diacritics[] = {\n";
 foreach my $command_name (@commands_order) {
@@ -203,6 +207,8 @@ my %level_to_structuring_command
 
 open(STRUC, '>', $structuring_file) or die "Open $structuring_file: $!\n";
 
+print STRUC "/* Automatically generated from $program_name */\n\n";
+
 print STRUC "#include \"command_ids.h\"\n\n";
 print STRUC "int command_structuring_level[] = {\n";
 foreach my $command_name (@commands_order) {
@@ -243,6 +249,8 @@ close (STRUC);
 
 open(SYMB, '>', $symbol_file) or die "Open $symbol_file: $!\n";
 
+print SYMB "/* Automatically generated from $program_name */\n\n";
+
 print SYMB "char *nobrace_symbol_text[] = {\n";
 foreach my $command_name (@commands_order) {
   my $command = $command_name;
@@ -263,6 +271,8 @@ close(SYMB);
 
 open(TEXT, '>', $text_file) or die "Open $text_file: $!\n";
 
+print TEXT "/* Automatically generated from $program_name */\n\n";
+
 print TEXT "char *text_brace_no_arg_commands[] = {\n";
 foreach my $command_name (@commands_order) {
   my $command = $command_name;
@@ -299,6 +309,8 @@ close(TEXT);
 
 open(NORM, '>', $normalization_file) or die "Open $normalization_file: $!\n";
 
+print NORM "/* Automatically generated from $program_name */\n\n";
+
 print NORM "char * command_normalization_text[] = {\n";
 foreach my $command_name (@commands_order) {
   my $command = $command_name;



reply via email to

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