diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-20 14:55:06 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-20 14:55:06 +0100 |
commit | 28561d85dac1872b1acf23dcd8dbf2ee9016f197 (patch) | |
tree | 087e54bb949315a92d9a9bf02e743dd8c32c2ec4 | |
parent | dbab5150f83543f0c8a424dfddb698d7812370b7 (diff) | |
download | gnu-guix-28561d85dac1872b1acf23dcd8dbf2ee9016f197.tar gnu-guix-28561d85dac1872b1acf23dcd8dbf2ee9016f197.tar.gz |
build: Make sure only the local .go files are loaded during compilation.
Reported by Andreas Enge <andreas@enge.fr>
at <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00272.html>.
* Makefile.am (.scm.go): Add "unset GUILE_LOAD_COMPILED_PATH".
-rw-r--r-- | Makefile.am | 8 |
1 files changed, 8 insertions, 0 deletions
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 # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>. .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)" \ |