bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 1/2] gnulib-tool.py: Follow gnulib-tool changes, part 41.


From: Collin Funk
Subject: [PATCH 1/2] gnulib-tool.py: Follow gnulib-tool changes, part 41.
Date: Tue, 5 Mar 2024 02:15:49 -0800
User-agent: Mozilla Thunderbird

On 3/4/24 9:44 PM, Collin Funk wrote:
> I think the two lines I've linked are referring to the same thing. The
> 'inctest' was changed to 'gentests' in commit
> dc135c4fd14cdc219d316c61f344e64090cb33fd which is what I was working
> on. Shouldn't the Python one be using 'self.emitter.tests_Makefile_am'
> instead of 'self.emitter.lib_Makefile_am'?

I've figured this out while testing another patch. The first one fixes
the $testbase in $sourcebase issue. I've used the testcase from here,
with some version number changes for AC_PREREQ and such to avoid
warnings:

https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00010.html

With the fix for this commit implemented we get the following diff:

diff --git a/subdir-test-python/libmissing/tests/Makefile.am 
b/subdir-test-shell/libmissing/tests/Makefile.am
index 316c91bdce..02cc8018a9 100644
--- a/subdir-test-python/libmissing/tests/Makefile.am
+++ b/subdir-test-shell/libmissing/tests/Makefile.am
@@ -21,26 +21,18 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by:
-# gnulib-tool --import \
-#  --lib=libmissing \
-#  --source-base=libmissing \
-#  --m4-base=libmissing/m4 \
-#  --doc-base=doc \
-#  --tests-base=libmissing/tests \
-#  --aux-dir=build-aux \
-#  --with-tests \
-#  --no-conditional-dependencies \
-#  --no-libtool \
-#  --macro-prefix=gl \
-#  localcharset
 
-AUTOMAKE_OPTIONS = 1.11 gnits
+AUTOMAKE_OPTIONS = 1.14 foreign
 
-SUBDIRS =
+SUBDIRS = .
+TESTS =
+XFAIL_TESTS =
+TESTS_ENVIRONMENT =
+noinst_PROGRAMS =
+check_PROGRAMS =
+EXTRA_PROGRAMS =
 noinst_HEADERS =
 noinst_LIBRARIES =
-noinst_LTLIBRARIES =
 EXTRA_DIST =
 BUILT_SOURCES =
 SUFFIXES =
@@ -49,18 +41,45 @@ MOSTLYCLEANDIRS =
 CLEANFILES =
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
-# No GNU Make output.
 
-AM_CPPFLAGS =
-AM_CFLAGS =
+CFLAGS = @GL_CFLAG_ALLOW_WARNINGS@ $(GL_CFLAG_GNULIB_WARNINGS) @CFLAGS@
+CXXFLAGS = @GL_CXXFLAG_ALLOW_WARNINGS@ @CXXFLAGS@
 
-noinst_LIBRARIES += libmissing.a
+AM_CPPFLAGS = \
+  -D@gltests_WITNESS@=1 \
+  -I. -I$(srcdir) \
+  -I../.. -I$(srcdir)/../.. \
+  -I../../libmissing -I$(srcdir)/../../libmissing

The second patch changes the GLEmiter.lib_Makefile_am call to
GLEmiter.tests_Makefile_am and changes the incorrect actioncmd
argument to '${macro_prefix}tests_WITNESS' so that it is correctly
placed in AM_CPPFLAGS.

After that we get the following diff:

diff --git a/subdir-test-python/libmissing/tests/Makefile.am 
b/subdir-test-shell/libmissing/tests/Makefile.am
index cf66e59d2a..02cc8018a9 100644
--- a/subdir-test-python/libmissing/tests/Makefile.am
+++ b/subdir-test-shell/libmissing/tests/Makefile.am
@@ -22,7 +22,7 @@
 #
 # Generated by gnulib-tool.
 
-AUTOMAKE_OPTIONS = 1.11 foreign
+AUTOMAKE_OPTIONS = 1.14 foreign
 
 SUBDIRS = .
 TESTS =
@@ -42,13 +42,16 @@ CLEANFILES =
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
+CFLAGS = @GL_CFLAG_ALLOW_WARNINGS@ $(GL_CFLAG_GNULIB_WARNINGS) @CFLAGS@
+CXXFLAGS = @GL_CXXFLAG_ALLOW_WARNINGS@ @CXXFLAGS@
+
 AM_CPPFLAGS = \
   -D@gltests_WITNESS@=1 \
   -I. -I$(srcdir) \
   -I../.. -I$(srcdir)/../.. \
   -I../../libmissing -I$(srcdir)/../../libmissing
 
-LDADD = ../../libmissing/libmissing.a libtests.a ../../libmissing/libmissing.a
+LDADD = ../../libmissing/libmissing.a

Which is less incorrect. :)

Collin

Attachment: 0001-gnulib-tool.py-Follow-gnulib-tool-changes-part-41.patch
Description: Text Data

Attachment: 0002-gnulib-tool.py-Fix-incorrect-tests-Makefile.am-gener.patch
Description: Text Data


reply via email to

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