From ce3fbb07c57fdcd662520f6117284cd1aa785e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 28 Jun 2022 16:04:12 +0200 Subject: Ensure proper environment while compiling. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') 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. -- cgit v1.2.3