guix-commits
[Top][All Lists]
Advanced

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

01/01: build: Make sure only the local .go files are loaded during compi


From: Ludovic Courtès
Subject: 01/01: build: Make sure only the local .go files are loaded during compilation.
Date: Tue, 20 Jan 2015 13:57:15 +0000

civodul pushed a commit to branch master
in repository guix.

commit 28561d85dac1872b1acf23dcd8dbf2ee9016f197
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 20 14:55:06 2015 +0100

    build: Make sure only the local .go files are loaded during compilation.
    
    Reported by Andreas Enge <address@hidden>
    at <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00272.html>.
    
    * Makefile.am (.scm.go): Add "unset GUILE_LOAD_COMPILED_PATH".
---
 Makefile.am |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c482848..e15afd2 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)"        \



reply via email to

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