unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Build system fixes
@ 2024-02-22 21:14 Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
  2024-03-20 20:14 ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
  0 siblings, 1 reply; 2+ messages in thread
From: Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library @ 2024-02-22 21:14 UTC (permalink / raw)
  To: guile-devel, bug-guile


[-- Attachment #1.1: Type: text/plain, Size: 255 bytes --]

Dear Guile maintainers,

please find attached two patches for changes that we have been carrying
downstream in LilyPond so far: one fix to make a sed invocation fully
portable, and a fix for cross-compilation in out-of-tree-builds.

Regards
Jonas

[-- Attachment #1.2: 0001-build-Make-sed-invocation-fully-portable.patch --]
[-- Type: text/x-patch, Size: 1894 bytes --]

From 428d1b17c5f664d3cb8da4cd5687bd47bdd87877 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hahnjo@hahnjo.de>
Date: Thu, 22 Feb 2024 21:57:41 +0100
Subject: [PATCH 1/2] build: Make sed invocation fully portable

Commit 08041d216f attempted to make the "invocation compatible with
BSD sed", but moving '-i' first does not solve the problem because
it still requires to pass an argument. Instead just redirect the
instantiated output into a temporary file and install that.

* libguile/Makefile.am: Remove '-i' from INSTANTIATE.
---
 libguile/Makefile.am | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 249e44a49..2641e7f69 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -492,9 +492,9 @@ install-exec-hook:
 
 ## Instantiate a template.
 INSTANTIATE =									\
-  $(SED) -i -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'				\
-            -e 's,[@]pkglibdir[@],$(pkglibdir),g'				\
-            -e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g'
+  $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'				\
+         -e 's,[@]pkglibdir[@],$(pkglibdir),g'					\
+         -e 's,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g'
 
 install-data-hook: libguile-@GUILE_EFFECTIVE_VERSION@-gdb.scm
 	@$(MKDIR_P) $(DESTDIR)$(libdir)
@@ -518,9 +518,9 @@ install-data-hook: libguile-@GUILE_EFFECTIVE_VERSION@-gdb.scm
 	cd $$here;						\
 	echo " $(INSTALL_DATA) $<				\
 $(DESTDIR)$(libdir)/$$libname-gdb.scm";				\
-	$(INSTALL_DATA) "$<"					\
-	    "$(DESTDIR)$(libdir)/$$libname-gdb.scm";		\
-	$(INSTANTIATE) "$(DESTDIR)$(libdir)/$$libname-gdb.scm"
+	$(INSTANTIATE) "$<" > $$libname-gdb.scm;		\
+	$(INSTALL_DATA) $$libname-gdb.scm			\
+	    "$(DESTDIR)$(libdir)/$$libname-gdb.scm";
 
 # Remove the GDB support file and the Info 'dir' file that
 # 'install-info' 5.x installs.
-- 
2.43.2


[-- Attachment #1.3: 0002-build-Fix-cross-compilation-in-out-of-tree-builds.patch --]
[-- Type: text/x-patch, Size: 1529 bytes --]

From ad01912391b449fcf547ac52ed468f9b572cb0ad Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hahnjo@hahnjo.de>
Date: Thu, 22 Feb 2024 22:10:06 +0100
Subject: [PATCH 2/2] build: Fix cross-compilation in out-of-tree-builds

gen-scmconfig.h is generated in libguile, not $(top_builddir).

* libguile/Makefile.am: Add '-I.' when compiling gen-scmconfig.o.
---
 libguile/Makefile.am | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 2641e7f69..f5d43cc01 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -62,14 +62,15 @@ gen_scmconfig_SOURCES = gen-scmconfig.c
 ## Override default rule; this should be compiled for BUILD host.  Note
 ## that we don't add $(AM_CPPFLAGS) here, as we need to run this
 ## program, but $(top_srcdir)/lib has a gnulib configured for the
-## target.  Instead we manually add $(top_builddir), in order to pick up
-## the generated config.h and gen-scmconfig.h.  Nothing else from Guile
-## is included by this code generator.
+## target.  Instead we manually add $(top_builddir) and the current
+## directory, in order to pick up the generated config.h and
+## gen-scmconfig.h.  Nothing else from Guile is included by this code
+## generator.
 gen-scmconfig.$(OBJEXT): gen-scmconfig.c
 	$(AM_V_GEN) \
 	if [ "$(cross_compiling)" = "yes" ]; then \
 		$(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
-		   -c -o $@ $<; \
+		   -I. -c -o $@ $<; \
 	else \
 		$(COMPILE) -c -o $@ $<; \
 	fi
-- 
2.43.2


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Build system fixes
  2024-02-22 21:14 [PATCH] Build system fixes Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
@ 2024-03-20 20:14 ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library @ 2024-03-20 20:14 UTC (permalink / raw)
  To: guile-devel, bug-guile

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On Thu, 2024-02-22 at 22:14 +0100, Jonas Hahnfeld via Developers list
for Guile, the GNU extensibility library wrote:
> Dear Guile maintainers,
> 
> please find attached two patches for changes that we have been carrying
> downstream in LilyPond so far: one fix to make a sed invocation fully
> portable, and a fix for cross-compilation in out-of-tree-builds.

ping...

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-20 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 21:14 [PATCH] Build system fixes Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library
2024-03-20 20:14 ` Jonas Hahnfeld via Developers list for Guile, the GNU extensibility library

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).