aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-28 16:04:12 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-07 21:14:09 +0200
commitce3fbb07c57fdcd662520f6117284cd1aa785e0c (patch)
tree3cd08cc367470cd4ceaa000baa5a7cfacefd1d08 /Makefile
parentGroup base64 tests. (diff)
downloadcalp-ce3fbb07c57fdcd662520f6117284cd1aa785e0c.tar.gz
calp-ce3fbb07c57fdcd662520f6117284cd1aa785e0c.tar.xz
Ensure proper environment while compiling.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ed9e9185..34ffaa71 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,9 @@ GUILE_CCACHE_DIR=$(shell $(GUILE) -c "(display (%site-ccache-dir))")
SCM_FILES = $(shell find module/ -type f -name \*.scm)
GO_FILES = $(SCM_FILES:module/%.scm=obj-$(GUILE_VERSION)/%.go)
+GUILE_ENV = GUILE_LOAD_PATH=$(PWD)/module \
+ GUILE_LOAD_COMPILED_PATH=$(PWD)/obj-$(GUILE_VERSION)
+
GUILE_C_FLAGS = -Lmodule \
-Wshadowed-toplevel -Wunbound-variable \
-Wmacro-use-before-definition -Warity-mismatch \
@@ -41,7 +44,7 @@ static:
obj-$(GUILE_VERSION)/%.go: module/%.scm
@echo $(GUILD) $(GUILE_VERSION) compile $<
- @$(GUILD) compile $(GUILE_C_FLAGS) -o $@ $< >/dev/null
+ @env $(GUILE_ENV) $(GUILD) compile $(GUILE_C_FLAGS) -o $@ $< >/dev/null
# Phony target used by test/run-tests.scm and main to
# automatically compile everything before they run.