GNU bug report logs - #72085
test-suite missing dependency on guile-procedures.txt

Previous Next

Package: guile;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sat, 13 Jul 2024 00:41:02 UTC

Severity: normal

To reply to this bug, email your comments to 72085 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#72085; Package guile. (Sat, 13 Jul 2024 00:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 13 Jul 2024 00:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-guile <at> gnu.org
Subject: test-suite missing dependency on guile-procedures.txt
Date: Fri, 12 Jul 2024 19:39:56 -0500
[Message part 1 (text/plain, inline)]
Some of the tests in the test-suite depend on guile-procedures.txt, but
nothing currently indicates that, and so a build in a clean tree may
fail.

This patch tries to fix that:

[0001-Ensure-tests-have-guile-procedures.txt.patch (text/x-diff, inline)]
From 2e391649fc17c1ecaa297e5ce4bf2bfae0963eaf Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb <at> defaultvalue.org>
Date: Sun, 30 Jun 2024 12:38:35 -0500
Subject: [PATCH 1/1] Ensure tests have guile-procedures.txt

The tests depend on libguile/guile-procedures.txt, for example via
documented? in bit-operations.test.  Previously "make check -j..." in a
clean tree would fail because libguile/guile-procedures.txt is built by
./Makefile.am (rather than libguile/Makefile.am) so that it will have a
built module/ available, but when "." is not listed in SUBDIRS, it
builds last, and so the test-suite runs before guile-procedures.txt is
built.

To fix the problem add "." to SUBDIRS before the test-suite so that the
tests will be able depend on everything else, and move the existing
guile-procedures.txt target into libguile/ next to its
guile-procedures.texi dependency.  That gives a better overview and
simplifies the recipe a bit.  It also allows us to drop the explict
"all-local:" dependency, and to let the existing libguile/ code handle
the cleanup.

* Makefile.am (SUBDIRS): add . just before the test-suite.
(libguile/guile-procedures.txt): rely on libguile/Makefile.am.
(CLEANFILES): Drop libguile/procedures.txt.
* libguile/Makefile.am: (all-local): drop.
(libguile/guile-procedures.txt): move Makefile.am recipe here.
---
 Makefile.am          | 20 ++++++++------------
 libguile/Makefile.am | 15 +++++++++------
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c74761628..6d73625c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,6 +26,8 @@
 #
 AUTOMAKE_OPTIONS = 1.10
 
+# The test-suite goes last so that it can depend on everything else
+# (e.g. guile-procedures.txt).
 SUBDIRS =					\
 	lib					\
 	meta					\
@@ -36,8 +38,9 @@ SUBDIRS =					\
 	stage2					\
 	guile-readline				\
 	examples				\
-	test-suite				\
-	doc
+	doc					\
+	.					\
+	test-suite
 
 DIST_SUBDIRS = $(SUBDIRS) prebuilt
 
@@ -57,15 +60,9 @@ BUILT_SOURCES = libguile/scmconfig.h
 libguile/scmconfig.h:
 	$(MAKE) -C libguile scmconfig.h
 
-# Build it from here so that all the modules are compiled by the time we
-# build it.
-libguile/guile-procedures.txt: libguile/guile-procedures.texi
-	$(AM_V_GEN)						\
-	$(top_builddir)/meta/guile --no-auto-compile		\
-	  "$(srcdir)/libguile/texi-fragments-to-docstrings"	\
-	  "$(builddir)/libguile/guile-procedures.texi"		\
-	  > $@.tmp
-	@mv $@.tmp $@
+# Build it here so that (given SUBDIRS order) the modules are available
+libguile/guile-procedures.txt:
+	$(MAKE) -C libguile guile-procedures.txt
 
 EXTRA_DIST = LICENSE HACKING GUILE-VERSION			\
 	     am/maintainer-dirs					\
@@ -87,7 +84,6 @@ EXTRA_DIST = LICENSE HACKING GUILE-VERSION			\
 
 ACLOCAL_AMFLAGS = -I m4
 
-CLEANFILES = libguile/guile-procedures.txt
 DISTCLEANFILES = check-guile.log
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-error-on-warning --enable-mini-gmp
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 8d8fa27d7..3ea2e57da 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -472,10 +472,6 @@ BUILT_INCLUDES = vm-operations.h scmconfig.h libpath.h srfi-14.i.c
 BUILT_SOURCES = cpp-E.c cpp-SIG.c $(BUILT_INCLUDES) \
     $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
 
-# Force the generation of `guile-procedures.texi' because the top-level
-# Makefile expects it to be built.
-all-local: guile-procedures.texi
-
 EXTRA_libguile_ <at> GUILE_EFFECTIVE_VERSION <at> _la_SOURCES = \
     syscalls.h					\
     dynl.c regex-posix.c			\
@@ -739,8 +735,6 @@ EXTRA_DIST = ChangeLog-scm ChangeLog-threads				\
     unidata_to_charset.awk UnicodeData.txt				\
     vm-operations.h libguile-@GUILE_EFFECTIVE_VERSION@-gdb.scm		\
     $(lightening_c_files) $(lightening_extra_files)
-#    $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
-#    guile-procedures.txt guile.texi
 
 ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
 if MINGW_LIBPATH
@@ -858,6 +852,15 @@ guile.texi: $(alldotdocfiles) guile$(EXEEXT)
 guile-procedures.texi: $(alldotdocfiles) guile$(EXEEXT)
 	$(AM_V_GEN)$(dotdoc2texi)          > $@ || { rm $@; false; }
 
+# Requires meta to be listed before libguile in SUBDIRS
+guile-procedures.txt: guile-procedures.texi
+	$(AM_V_GEN)						\
+	$(top_builddir)/meta/guile --no-auto-compile		\
+	  "$(srcdir)/texi-fragments-to-docstrings"		\
+	  "$(builddir)/guile-procedures.texi"			\
+	  > $@.tmp
+	@mv $@.tmp $@
+
 c-tokenize.c: c-tokenize.lex
 	flex -t $(srcdir)/c-tokenize.lex > $@ || { rm $@; false; }
 
-- 
2.43.0

[Message part 3 (text/plain, inline)]
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

This bug report was last modified 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.