texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES)


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES) (XSParagraph_la_SOURCES, libxsparagraph_la_*, XSParagraph_la_CPPFLAGS) (XSParagraph_la_LIBADD), tp/Texinfo/XS/XSParagraph.xs: add libxsparagraph.la, a convenience library for XSParagraph with the C code that does not requires Perl and requires Gnulib, to be able to pass different flags than for XSParagraph.la. Do not include config.h anymore in XSParagraph.xs as there is no need for Gnulib nor autoconf defines in this file.
Date: Thu, 14 Nov 2024 15:47:11 -0500

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 cce00fb9a0 * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES) 
(XSParagraph_la_SOURCES, libxsparagraph_la_*, XSParagraph_la_CPPFLAGS) 
(XSParagraph_la_LIBADD), tp/Texinfo/XS/XSParagraph.xs: add libxsparagraph.la, a 
convenience library for XSParagraph with the C code that does not requires Perl 
and requires Gnulib, to be able to pass different flags than for 
XSParagraph.la.  Do not include config.h anymore in XSParagraph.xs as there is 
no need for Gnulib nor autoconf defines in this file.
cce00fb9a0 is described below

commit cce00fb9a015f9e251f7ee21f19bc4fee33da79d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Nov 14 21:47:06 2024 +0100

    * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES)
    (XSParagraph_la_SOURCES, libxsparagraph_la_*, XSParagraph_la_CPPFLAGS)
    (XSParagraph_la_LIBADD), tp/Texinfo/XS/XSParagraph.xs: add
    libxsparagraph.la, a convenience library for XSParagraph with the C
    code that does not requires Perl and requires Gnulib, to be able to
    pass different flags than for XSParagraph.la.  Do not include config.h
    anymore in XSParagraph.xs as there is no need for Gnulib nor autoconf
    defines in this file.
    
    * README-hacking: update list of files with Perl C code.
---
 ChangeLog                                             | 13 +++++++++++++
 README-hacking                                        |  2 +-
 tp/Texinfo/XS/Makefile.am                             | 19 ++++++++++++++-----
 tp/Texinfo/XS/XSParagraph.xs                          | 13 -------------
 tp/Texinfo/XS/convert/ConvertXS.xs                    |  2 +-
 tp/Texinfo/XS/convert/build_html_perl_state.c         |  2 +-
 tp/Texinfo/XS/convert/call_html_perl_function.c       |  2 +-
 tp/Texinfo/XS/convert/get_html_perl_info.c            |  2 +-
 tp/Texinfo/XS/main/api_to_perl.c                      |  2 +-
 tp/Texinfo/XS/parsetexi/Parsetexi.xs                  |  9 +++++++--
 .../XS/structuring_transfo/StructuringTransfoXS.xs    |  2 +-
 11 files changed, 41 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1e732cc6b2..737396b162 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-11-14  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/Makefile.am (noinst_LTLIBRARIES)
+       (XSParagraph_la_SOURCES, libxsparagraph_la_*, XSParagraph_la_CPPFLAGS)
+       (XSParagraph_la_LIBADD), tp/Texinfo/XS/XSParagraph.xs: add
+       libxsparagraph.la, a convenience library for XSParagraph with the C
+       code that does not requires Perl and requires Gnulib, to be able to
+       pass different flags than for XSParagraph.la.  Do not include config.h
+       anymore in XSParagraph.xs as there is no need for Gnulib nor autoconf
+       defines in this file.
+
+       * README-hacking: update list of files with Perl C code.
+
 2024-11-14  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/xspara.c (PARAGRAPH): rename french_spacing as
diff --git a/README-hacking b/README-hacking
index a1a0053193..f6b56e9c0f 100644
--- a/README-hacking
+++ b/README-hacking
@@ -395,7 +395,7 @@ available version, then run:
 Check that this results in a newer version.
 
 Check what changes ppport.h reports:
-  perl ppport.h --compat-version=5.8.1 *.xs misc.c xspara.c miscxs.h xspara.h 
*/*.xs main/get_perl_info.* main/build_perl_info.* main/api_to_perl.* 
main/call_perl_function.* convert/call_html_perl_function.* 
convert/build_html_perl_state.* convert/get_converter_perl_info.* 
convert/get_html_perl_info.*
+  perl ppport.h --compat-version=5.8.1 *.xs */*.xs main/get_perl_info.* 
main/build_perl_info.* main/api_to_perl.* main/call_perl_function.* 
convert/call_html_perl_function.* convert/build_html_perl_state.* 
convert/get_converter_perl_info.* convert/get_html_perl_info.*
 
 make po-check             # update po/POTFILES.in as needed
 make po_document-check    # update po_document/POTFILES.in as needed
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index b13985d93d..ac6a47a439 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -58,6 +58,7 @@ XSLIBS_LDFLAGS = -avoid-version -module
 
 XSLIBS_LDFLAGS += $(perl_conf_LDFLAGS)
 
+noinst_LTLIBRARIES =
 
 ########################## Test XS used in top source dir configure.ac
 
@@ -90,14 +91,23 @@ MiscXS_la_CFLAGS = $(XSLIBS_CFLAGS)
 MiscXS_la_LIBADD = $(platform_PERL_LIBADD)
 MiscXS_la_LDFLAGS = $(XSLIBS_LDFLAGS)
 
+# C only convenience library for XSParagraph solely used to set different
+# flags than the Perl part, requiring Gnulib but not Perl.
+noinst_LTLIBRARIES += libxsparagraph.la
+libxsparagraph_la_SOURCES = xspara.c xspara.h \
+                         main/text.c main/text.h
+libxsparagraph_la_CPPFLAGS = $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS)
+libxsparagraph_la_LIBADD = $(builddir)/gnulib/lib/libgnu.la
+libxsparagraph_la_LDFLAGS = $(LTLIBINTL) $(LTLIBICONV) $(LTLIBUNISTRING) 
$(LTLIBC32CONV)
+
 xs_LTLIBRARIES += XSParagraph.la
 nodist_XSParagraph_la_SOURCES = XSParagraph.c
 CLEANFILES += XSParagraph.c
-XSParagraph_la_SOURCES = xspara.c xspara.h \
-                         main/text.c main/text.h ppport.h
+# FIXME not included?
+XSParagraph_la_SOURCES = ppport.h
 XSParagraph_la_CFLAGS = $(XSLIBS_CFLAGS)
-XSParagraph_la_CPPFLAGS = $(AM_CPPFLAGS) $(GNULIB_CPPFLAGS) $(XSLIBS_CPPFLAGS)
-XSParagraph_la_LIBADD = $(builddir)/gnulib/lib/libgnu.la 
$(platform_PERL_LIBADD)
+XSParagraph_la_CPPFLAGS = $(AM_CPPFLAGS) $(XSLIBS_CPPFLAGS)
+XSParagraph_la_LIBADD = libxsparagraph.la $(platform_PERL_LIBADD)
 XSParagraph_la_LDFLAGS = $(XSLIBS_LDFLAGS) $(LTLIBINTL) $(LTLIBICONV) 
$(LTLIBUNISTRING) $(LTLIBC32CONV)
 
 EXTRA_DIST += XSParagraph.xs MiscXS.xs
@@ -106,7 +116,6 @@ EXTRA_DIST += XSParagraph.xs MiscXS.xs
 #            flags to be sure that Perl headers and Perl replacement functions
 #            are not used and libc functions are used.
 
-noinst_LTLIBRARIES =
 noinst_LTLIBRARIES += libxsutils.la
 
 libxsutils_la_SOURCES = \
diff --git a/tp/Texinfo/XS/XSParagraph.xs b/tp/Texinfo/XS/XSParagraph.xs
index 89f48a422a..3a85df5f73 100644
--- a/tp/Texinfo/XS/XSParagraph.xs
+++ b/tp/Texinfo/XS/XSParagraph.xs
@@ -13,22 +13,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#ifdef HAVE_CONFIG_H
-  #include <config.h>
-#endif
-
 #define PERL_NO_GET_CONTEXT
 #include "EXTERN.h"
 #include "perl.h"
-#if defined _WIN32 && !defined __CYGWIN__
-/* For Perl on MS-Windows, it is possible for the header XSUB.h to redefine
-   'free' (to something like "PerlMem_free").  'free' was already defined
-   by gnulib, in config.h (due to the 'free-posix' module which was
-   brought in as a dependency of other gnulib modules).  We need the Perl
-   redefinition, not the gnulib version.  The #undef line here prevents
-   a warning about the symbol being redefined. */
-  #undef free
-#endif
 #include "XSUB.h"
 
 #include "xspara.h"
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 03ea046cf2..8a8ebe7375 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -26,7 +26,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
 # undef free
 #endif
 #include "XSUB.h"
diff --git a/tp/Texinfo/XS/convert/build_html_perl_state.c 
b/tp/Texinfo/XS/convert/build_html_perl_state.c
index dd7b7e9300..3c9b1e275b 100644
--- a/tp/Texinfo/XS/convert/build_html_perl_state.c
+++ b/tp/Texinfo/XS/convert/build_html_perl_state.c
@@ -22,7 +22,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
   #undef free
 #endif
 #include "XSUB.h"
diff --git a/tp/Texinfo/XS/convert/call_html_perl_function.c 
b/tp/Texinfo/XS/convert/call_html_perl_function.c
index 563458658c..0fe193c5cb 100644
--- a/tp/Texinfo/XS/convert/call_html_perl_function.c
+++ b/tp/Texinfo/XS/convert/call_html_perl_function.c
@@ -22,7 +22,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
   #undef free
 #endif
 #include "XSUB.h"
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c 
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 79e4e520db..99b792c4b1 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -22,7 +22,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
   #undef free
 #endif
 #include "XSUB.h"
diff --git a/tp/Texinfo/XS/main/api_to_perl.c b/tp/Texinfo/XS/main/api_to_perl.c
index 8f29c8bdb7..9a941fd133 100644
--- a/tp/Texinfo/XS/main/api_to_perl.c
+++ b/tp/Texinfo/XS/main/api_to_perl.c
@@ -20,7 +20,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
   #undef free
 #endif
 #include "XSUB.h"
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs 
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index af508209a0..632787a647 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -25,8 +25,13 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
-# undef free
+/* For Perl on MS-Windows, it is possible for the header XSUB.h to redefine
+   'free' (to something like "PerlMem_free").  'free' was already defined
+   by gnulib, in config.h (due to the 'free-posix' module which was
+   brought in as a dependency of other gnulib modules).  We need the Perl
+   redefinition, not the gnulib version.  The #undef line here prevents
+   a warning about the symbol being redefined. */
+ #undef free
 #endif
 #include "XSUB.h"
 #include "ppport.h"
diff --git a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs 
b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
index 8e458f7fd2..6cddda6425 100644
--- a/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
+++ b/tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs
@@ -22,7 +22,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #if defined _WIN32 && !defined __CYGWIN__
-/* See comment in XSParagraph.xs for why we #undef free. */
+/* See comment in Parsetexi.xs for why we #undef free. */
 # undef free
 #endif
 #include "XSUB.h"



reply via email to

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