@@ -47,7 +47,7 @@ do_subst = $(SED) \
-e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
-e 's,[@]localedir[@],$(localedir),g'
-scripts/guix: scripts/guix.in Makefile
+scripts/guix: scripts/guix.in Makefile guile$(EXEEXT)
$(AM_V_at)rm -f $@ $@-t
$(AM_V_at)$(MKDIR_P) "$(@D)"
$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
@@ -46,6 +46,12 @@ export PATH
GUIX="$abs_top_builddir/scripts/guix"
export GUIX
+# sanity check
+if [ ! -f "$GUIX" ]; then
+ echo "$GUIX is not built. Please run make scripts/guix"
+ exit 1
+fi
+
# Define $GUIX_UNINSTALLED to prevent `guix' from
# prepending @guilemoduledir@ to the Guile load paths.