From 28561d85dac1872b1acf23dcd8dbf2ee9016f197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 20 Jan 2015 14:55:06 +0100 Subject: [PATCH] build: Make sure only the local .go files are loaded during compilation. Reported by Andreas Enge at . * Makefile.am (.scm.go): Add "unset GUILE_LOAD_COMPILED_PATH". --- Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index c482848fdf..e15afd2ff4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -268,10 +268,18 @@ AM_V_GUILEC = $(AM_V_GUILEC_$(V)) AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY)) AM_V_GUILEC_0 = @echo " GUILEC" $@; +# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if +# $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in +# there that are newer than the local .scm files (for instance because the +# user ran 'make install' recently). When that happens, we end up loading +# those previously-installed .go files, which may be stale, thereby breaking +# the whole thing. +# # XXX: Use the C locale for when Guile lacks # . .scm.go: $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \ + unset GUILE_LOAD_COMPILED_PATH ; \ LC_ALL=C \ $(top_builddir)/pre-inst-env \ $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \