guile-user
[Top][All Lists]
Advanced

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

guile-json cross-build fix


From: Jan Nieuwenhuizen
Subject: guile-json cross-build fix
Date: Tue, 07 Apr 2020 21:01:45 +0200

Hi!

Please find cross build fix attached.

Greetings,
janneke

>From 0ebc6b8f89680f5353693f591c24c82c8cea9ba1 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Wed, 4 Mar 2020 11:17:02 +0100
Subject: [PATCH] build: Support cross building.

* configure.ac: Add AC_CANONICAL_HOST to get host.
* Makefile.am (.scm.go): Set it as target.
* json/Makefile.am (.scm.go): Likewise.
---
 Makefile.am      | 2 +-
 configure.ac     | 1 +
 json/Makefile.am | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 996f18b..e9434be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,7 @@ nobase_nodist_obj_DATA = $(GOBJECTS)
 GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
 SUFFIXES = .scm .go
 .scm.go:
-       $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
+       $(top_builddir)/env $(GUILE_TOOLS) compile --target="$(host)" 
$(GUILE_WARNINGS) -o "$@" "$<"
 
 SOURCES = json.scm
 
diff --git a/configure.ac b/configure.ac
index fbc1aff..937dcf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ AC_CONFIG_SRCDIR(json.scm)
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability])
 AM_SILENT_RULES([yes])
+AC_CANONICAL_HOST
 
 dnl We require pkg.m4 (from pkg-config) and guile.m4.
 dnl Make sure they are available.
diff --git a/json/Makefile.am b/json/Makefile.am
index adf5972..0085a81 100644
--- a/json/Makefile.am
+++ b/json/Makefile.am
@@ -36,4 +36,4 @@ CLEANFILES = $(GOBJECTS)
 GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
 SUFFIXES = .scm .go
 .scm.go:
-       $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
+       $(top_builddir)/env $(GUILE_TOOLS) compile --target="$(host)" 
$(GUILE_WARNINGS) -o "$@" "$<"
-- 
2.24.0

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

reply via email to

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