build: Require scripts/guix in pre-inst-env.
Changes
2 files changed · +7 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| Makefile.am | modified | +1 | −1 | View file |
| build-aux/pre-inst-env.in | modified | +6 | −0 | View file |
Makefile.am
View filediff --git a/Makefile.am b/Makefile.am
index f4155f0..595a7c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,7 +48,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)/[email protected]" > "$@-t"
build-aux/pre-inst-env.in
View filediff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index cd90a06..c18d372 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -46,6 +46,12 @@ export PATH
GUIX="$abs_top_builddir/scripts/guix"
export GUIX
+# Sanity check.
+if [ "$1" = "guix" ] && [ ! -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.