texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Wed, 25 Dec 2024 12:42:16 -0500 (EST)

branch: master
commit 792e20363055244bf91c15ad0292b393bedc3a34
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Dec 25 14:15:13 2024 +0100

    * tp/maintain/change_perl_modules_version.sh,
    tp/Texinfo/XS/configure.ac (TEXINFO_DTD_VERSION)
    (TEXINFO_DTD_VERSION_CONFIG): add TEXINFO_DTD_VERSION to
    tp/Texinfo/XS/configure.ac.  Synchronize with top-level configure.ac
    value in change_perl_modules_version.sh, set as
    TEXINFO_DTD_VERSION_CONFIG in AC_DEFINE_UNQUOTED.
    
    * tp/Texinfo/XS/convert/texinfo.c (txi_set_base_default_options):
    set TEXINFO_DTD_VERSION based on TEXINFO_DTD_VERSION_CONFIG.
---
 ChangeLog                                  | 12 ++++++++++++
 tp/Texinfo/XS/configure.ac                 |  7 +++++++
 tp/Texinfo/XS/convert/texinfo.c            |  3 +++
 tp/Texinfo/XS/texi2any.c                   |  2 +-
 tp/maintain/change_perl_modules_version.sh |  8 ++++++++
 5 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 28c85be707..b494bb185f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-12-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/maintain/change_perl_modules_version.sh,
+       tp/Texinfo/XS/configure.ac (TEXINFO_DTD_VERSION)
+       (TEXINFO_DTD_VERSION_CONFIG): add TEXINFO_DTD_VERSION to
+       tp/Texinfo/XS/configure.ac.  Synchronize with top-level configure.ac
+       value in change_perl_modules_version.sh, set as
+       TEXINFO_DTD_VERSION_CONFIG in AC_DEFINE_UNQUOTED.
+
+       * tp/Texinfo/XS/convert/texinfo.c (txi_set_base_default_options):
+       set TEXINFO_DTD_VERSION based on TEXINFO_DTD_VERSION_CONFIG.
+
 2024-12-25  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/texi2any.c (main): load HTML Perl module based on init
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index eeb8733cde..5aa46dbfd6 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -15,6 +15,9 @@ AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE
 AC_CONFIG_MACRO_DIRS([build-aux/m4 gnulib/m4])
 
+TEXINFO_DTD_VERSION=7.2
+AC_SUBST([TEXINFO_DTD_VERSION])
+
 CONVERTER=texi2any
 AC_SUBST([CONVERTER])
 
@@ -269,5 +272,9 @@ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_CONFIG], 
["$PACKAGE_VERSION"],
 AC_DEFINE_UNQUOTED([CONVERTER_CONFIG], ["$CONVERTER"],
                    [configure CONVERTER value])
 
+# Output with the _CONFIG suffix as the original is a type name
+AC_DEFINE_UNQUOTED([TEXINFO_DTD_VERSION_CONFIG], ["$TEXINFO_DTD_VERSION"],
+                   [configure TEXINFO_DTD_VERSION value])
+
 AC_CONFIG_FILES([Makefile gnulib/lib/Makefile])
 AC_OUTPUT
diff --git a/tp/Texinfo/XS/convert/texinfo.c b/tp/Texinfo/XS/convert/texinfo.c
index b8108c5aa0..14dbc050d0 100644
--- a/tp/Texinfo/XS/convert/texinfo.c
+++ b/tp/Texinfo/XS/convert/texinfo.c
@@ -109,6 +109,7 @@ txi_set_base_default_options (OPTIONS_LIST 
*main_program_set_options,
   const char *configured_url = PACKAGE_URL_CONFIG;
   const char *configured_name_version
     = PACKAGE_NAME_CONFIG " " PACKAGE_VERSION_CONFIG;
+  const char *configured_texinfo_dtd_version = TEXINFO_DTD_VERSION_CONFIG;
 
   initialize_options_list (main_program_set_options);
 
@@ -121,6 +122,8 @@ txi_set_base_default_options (OPTIONS_LIST 
*main_program_set_options,
   set_configured_information(PACKAGE_NAME, configured_name)
   set_configured_information(PACKAGE_AND_VERSION, configured_name_version)
   set_configured_information(PACKAGE_URL, configured_url)
+  set_configured_information(TEXINFO_DTD_VERSION,
+                             configured_texinfo_dtd_version);
 #undef set_configured_information
 
   err_add_option_value (main_program_set_options, "COMMAND_LINE_ENCODING", 0,
diff --git a/tp/Texinfo/XS/texi2any.c b/tp/Texinfo/XS/texi2any.c
index da3ddb3fc2..b069246ba7 100644
--- a/tp/Texinfo/XS/texi2any.c
+++ b/tp/Texinfo/XS/texi2any.c
@@ -1687,7 +1687,7 @@ main (int argc, char *argv[], char *env[])
   if (debug_option && debug_option->o.integer > 0)
     debug = 1;
 
-  if(test_mode_set)
+  if (test_mode_set)
     {
       add_option_value (&program_options, "PACKAGE_VERSION", 0, "");
       add_option_value (&program_options, "PACKAGE", 0, "texinfo");
diff --git a/tp/maintain/change_perl_modules_version.sh 
b/tp/maintain/change_perl_modules_version.sh
index 815f640e71..8a64924937 100755
--- a/tp/maintain/change_perl_modules_version.sh
+++ b/tp/maintain/change_perl_modules_version.sh
@@ -25,3 +25,11 @@ find Texinfo/ -name '*.pm' -o -name '*.pm.in' | xargs \
 # by XSLoader.pm init through DynaLoader to check that the XS modules
 # versions are the same than the XSLoader.pm Perl module $VERSION.
 perl -pi -e "s/^(AC_INIT\(\[[^\]]+\], *)\[([0-9.]+)\]/\$1\[$VERS\]/" 
Texinfo/XS/configure.ac
+
+# do the same for TEXINFO_DTD_VERSION.  It is not easy to pass information
+# from the top configure to the subdirectory configure.
+
+TEXINFO_DTD_VERS=`grep '^TEXINFO_DTD_VERSION' ../configure.ac | sed -e 
's/^[^0-9]*//' -e 's/ *$//'`
+echo TEXINFO_DTD_VERSION is $TEXINFO_DTD_VERS
+perl -pi -e "s/^(TEXINFO_DTD_VERSION *= *)([0-9.]+).*/\${1}$TEXINFO_DTD_VERS/" 
Texinfo/XS/configure.ac
+



reply via email to

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