X-Git-Url: https://jxself.org/git/?p=mes.git;a=blobdiff_plain;f=build-aux%2Fbuild-guile.sh;h=f4e9547df55ec20357b5206933b85e3358c5d528;hp=00834fbcfa5472dbfd3a766ededfb27d12180b2a;hb=69813a6da3485ebe52503424949dbad60b42f008;hpb=10bd43d222436a04e7d118f3837e8a8b11ea1d6b diff --git a/build-aux/build-guile.sh b/build-aux/build-guile.sh index 00834fbc..f4e9547d 100755 --- a/build-aux/build-guile.sh +++ b/build-aux/build-guile.sh @@ -18,23 +18,57 @@ # You should have received a copy of the GNU General Public License # along with Mes. If not, see . -set -ex +if [ -n "$BUILD_DEBUG" ]; then + set -x +fi export GUILE +export GUILE_AUTO_COMPILE GUILE=${GUILE-$(command -v guile)} +GUILE_TOOLS=${GUILE_TOOLS-$(command -v guile-tools)} +GUILE_AUTO_COMPILE=0 + +set -e SCM_FILES=" -language/c99/compiler.scm -language/c99/info.scm -mes/as-i386.scm -mes/as.scm -mes/bytevectors.scm -mes/elf.scm -mes/guile.scm -mes/test.scm -mes/M1.scm" +guile/mes/guile.scm +guile/mes/misc.scm +guile/mes/test.scm +guile/mescc/M1.scm +guile/mescc/as.scm +guile/mescc/bytevectors.scm +guile/mescc/compile.scm +guile/mescc/i386/as.scm +guile/mescc/info.scm +guile/mescc/mescc.scm +guile/mescc/preprocess.scm +" export srcdir=. export host=$($GUILE -c "(display %host-type)") -cd guile -$GUILE --no-auto-compile -L . -C . -s ../build-aux/compile-all.scm $SCM_FILES + +if [ "$GUILE_EFFECTIVE_VERSION" = "2.0" ]; then + abs=$PWD/ +fi + +#$GUILE --no-auto-compile -L guile -C guile -s build-aux/compile-all.scm $SCM_FILES + +for i in $SCM_FILES; do + go=${i%%.scm}.go + if [ $i -nt $go ]; then + echo " GUILEC $i" + $GUILE_TOOLS compile -L ${abs}guile -L ${abs}scripts -o $go $i + fi +done + +SCRIPTS=" +scripts/mescc +" + +for i in $SCRIPTS; do + go=${i%%.scm}.go + if [ $i -nt $go ]; then + echo " GUILEC $i" + $GUILE_TOOLS compile -L ${abs}guile -L ${abs}scripts -o $go $i + fi +done