wisp
 
(Arne Babenhauserheide)
2015-09-24: wisp now starts from wisp.scm

wisp now starts from wisp.scm

diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ ChangeLog :
 
 .INTERMEDIATE: input.in.intermediate
 input.in.intermediate: ${wisp_SOURCES} wisp.scm
-	@abs_top_srcdir@/bootstrap-reader.sh @abs_top_srcdir@ @guile@ wisp.scm 2>&1 | sed "s/^;;;.*//" 2>&1 | grep . 1>&2 ; test ! $$? -eq 0 # it worked if grep does not find anything
+	@abs_top_srcdir@/bootstrap-reader.sh @abs_top_srcdir@ @abs_top_builddir@ @guile@ wisp.scm 2>&1 | sed "s/^;;;.*//" 2>&1 | grep . 1>&2 ; test ! $$? -eq 0 # it worked if grep does not find anything
 
 wisp.scm: wisp-guile.w wisp.py
 	@abs_top_srcdir@/bootstrap.sh @abs_top_srcdir@ @guile@ @python3@ 2>&1 | sed "s/^;;;.*//" 2>&1 | grep . 1>&2 ; test ! $$? -eq 0 # it worked if grep does not find anything
@@ -29,7 +29,7 @@ syntaxtests.sh : wisp.scm tests/runtests
 	chmod +x @abs_top_builddir@/$@
 
 .PHONY: syntaxtestsreader.sh
-syntaxtestsreader.sh : wisp.scm tests/runtests-scheme-reader.sh
+syntaxtestsreader.sh : ${wisp} wisp.scm tests/runtests-scheme-reader.sh
 	echo '#!/bin/bash' > @abs_top_builddir@/$@
 	echo @abs_top_srcdir@/tests/runtests-scheme-reader.sh @abs_top_srcdir@ @abs_top_builddir@ >> @abs_top_builddir@/$@
 	chmod +x @abs_top_builddir@/$@
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 wisp 0.9.0 (2015-09-24):
 - actually distribute wisp.scm
+- wisp now starts from wisp.scm. To bootstrap a release from Python, 
+  remove wisp.scm and run `make wisp.scm`
 
 wisp 0.8.7 (2015-09-24):
 - new example say.w, companion to 
diff --git a/bootstrap-reader.sh b/bootstrap-reader.sh
--- a/bootstrap-reader.sh
+++ b/bootstrap-reader.sh
@@ -7,32 +7,44 @@ else
 fi
 
 if [[ x"$2" == x"" ]]; then 
+    builddir=.
+else
+    builddir="$2"
+fi
+
+
+if [[ x"$3" == x"" ]]; then 
     guile='guile'
 else
-    guile="$2"
+    guile="$3"
 fi
 
-if [[ x"$3" == x"" ]]; then 
+
+if test -f wisp.scm; then 
     wisp=wisp.scm
+elif test -f "${builddir}/wisp.scm"; then
+    wisp="${builddir}/wisp.scm"
 else
-    wisp="$3"
+    wisp="${srcdir}/wisp.scm"
 fi
 
 
-
-mkdir -p language/wisp
+mkdir -p ${builddir}/language/wisp
 
 echo ";;;" preparing the reader: wisp at the REPL 1>&2
 
 echo ";;;" parsing wisp-scheme.w with the parser for the REPL 1>&2
-${guile} ${wisp} ${srcdir}/wisp-scheme.w 2>/dev/null > wisp-scheme.scm \
+${guile} ${wisp} ${srcdir}/wisp-scheme.w 2>/dev/null > ${builddir}/wisp-scheme.scm \
     && echo ";;;" ...precompiling the parser... 1>&2 \
-    && ${guile} -s wisp-scheme.scm 2>/dev/null \
+    && ${guile} -s ${builddir}/wisp-scheme.scm 2>/dev/null \
     && echo ";;;" ...succeeded 1>&2 \
+    || echo creating wisp-scheme.scm failed
 
 echo ";;;"  parsing the spec file... 1>&2
-${guile} ${wisp} ${srcdir}/wisp-reader.w 2>/dev/null > language/wisp/spec.scm \
+${guile} ${wisp} ${srcdir}/wisp-reader.w 2>/dev/null > ${builddir}/language/wisp/spec.scm \
     && echo ";;;" ...precompiling the spec file... 1>&2 \
-    && ${guile} -L . -s language/wisp/spec.scm \
+    && ${guile} -L . -s ${builddir}/language/wisp/spec.scm \
     && echo ";;;" ...succeeded 1>&2 \
-    && echo ";;;" to use wisp at the REPL, run '`'${guile} -L . --language=wisp'`' 1>&2
+    && echo ";;;" to use wisp at the REPL, run '`'${guile} -L . --language=wisp'`' 1>&2 \
+    || echo creating language/wisp/spec.scm failed
+
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl run `autoreconf -i` to generate a configure script. 
 dnl Then run ./configure to generate a Makefile.
 dnl Finally run make to generate the project.
-AC_INIT([wisp], [0.8.7],
+AC_INIT([wisp], [0.9.0],
         [arne_bab@web.de])
 # Check for programs I need for my build
 AC_CANONICAL_TARGET
diff --git a/tests/runtests-scheme-preprocessor.sh b/tests/runtests-scheme-preprocessor.sh
--- a/tests/runtests-scheme-preprocessor.sh
+++ b/tests/runtests-scheme-preprocessor.sh
@@ -19,7 +19,7 @@ cd ${srcdir}/tests
 for i in *.w; do
     # skip strangecomments
     if test x"${i}" = x"strangecomments.w"; then continue; fi
-    d=$(guile ${builddir}/wisp.scm "$i" > ${builddir}/testtempfoo.scm; diff -wuB ${builddir}/testtempfoo.scm "$(basename "$i" .w)".scm; rm ${builddir}/testtempfoo.scm)
+    d=$(guile ${srcdir}/wisp.scm "$i" > ${builddir}/testtempfoo.scm; diff -wuB ${builddir}/testtempfoo.scm "$(basename "$i" .w)".scm; rm ${builddir}/testtempfoo.scm)
     if test x"$d" = x""; then
         continue
     else
diff --git a/tests/runtests-scheme-reader.sh b/tests/runtests-scheme-reader.sh
--- a/tests/runtests-scheme-reader.sh
+++ b/tests/runtests-scheme-reader.sh
@@ -17,10 +17,10 @@ fi
 failed=0
 cd ${builddir}
 for i in ${srcdir}/tests/*.w; do
-    if guile -L . --language=wisp ${srcdir}/testrunner.w "${i}" "${srcdir}/tests/$(basename "${i}" .w).scm" | grep -q "have equivalent content"; then
+    if guile -L ${builddir} --language=wisp ${srcdir}/testrunner.w "${i}" "${srcdir}/tests/$(basename "${i}" .w).scm" | grep -q "have equivalent content"; then
         continue
     fi
-    echo test "$i" failed. Diff: $(guile -L . --language=wisp ${srcdir}/testrunner.w "${i}" "${srcdir}/tests/$(basename "${i}" .w).scm")
+    echo test "$i" failed. Diff: $(guile -L ${builddir} --language=wisp ${srcdir}/testrunner.w "${i}" "${srcdir}/tests/$(basename "${i}" .w).scm")
     failed=$((failed + 1))
 done
 cd - >/dev/null # undo dir change