(Arne Babenhauserheide)
2014-01-22: allow setting alternate names for guile and python3 in configure. allow setting alternate names for guile and python3 in configure.
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ ChangeLog :
.INTERMEDIATE: input.in.intermediate
input.in.intermediate: ${wisp_SOURCES}
- @abs_top_srcdir@/bootstrap.sh @abs_top_srcdir@
+ @abs_top_srcdir@/bootstrap.sh @abs_top_srcdir@ @guile@ @python3@
.PHONY: test.sh
test.sh : wisp.scm runtests.sh
diff --git a/bootstrap.sh b/bootstrap.sh
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -7,7 +7,21 @@ else
srcdir="$1"
fi
-diff=$(python3 ${srcdir}/wisp.py ${srcdir}/wisp-guile.w > 1 && guile 1 ${srcdir}/wisp-guile.w > 2 && guile 2 ${srcdir}/wisp-guile.w > wisp.scm && diff 2 wisp.scm && echo success)
+# Bootstrap wisp-guile with wisp.py
+if [[ x"$2" == x"" ]]; then
+ guile="guile"
+else
+ guile="$2"
+fi
+
+# Bootstrap wisp-guile with wisp.py
+if [[ x"$3" == x"" ]]; then
+ python3="python3"
+else
+ python3="$3"
+fi
+
+diff=$(${python3} ${srcdir}/wisp.py ${srcdir}/wisp-guile.w > 1 && ${guile} 1 ${srcdir}/wisp-guile.w > 2 && ${guile} 2 ${srcdir}/wisp-guile.w > wisp.scm && diff 2 wisp.scm && echo success)
if [[ ! x"${diff}" == x"success" ]]; then
echo "failed to bootstrap wisp.scm. diff: " ${diff}
exit 1
@@ -16,7 +30,7 @@ echo "successfully bootstrapped wisp.scm
echo preparing the reader: wisp at the REPL
echo parsing the spec file...
mkdir -p language/wisp
-guile wisp.scm ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
+${guile} wisp.scm ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
&& echo ...precompiling the spec file... \
&& guile -L . -s language/wisp/spec.scm \
&& echo ...succeeded \
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ AC_ARG_VAR([guile], [How to call GNU Gui
AC_CHECK_TARGET_TOOL([guile], [guile], [no])
AS_IF([test "x$guile" = "xno"],
[AC_MSG_ERROR([cannot find GNU Guile.])])
+AC_ARG_VAR([python3], [How to call Python 3.])
AC_CHECK_TARGET_TOOL([python3], [python3], [no])
AS_IF([test "x$python3" = "xno"],
[AC_MSG_ERROR([cannot find Python 3 which is required for bootstrapping.])])