all-native: compile-star-parser
all-native: compile-win32
all-native: compile-xml
-all-native: cross-end
+@CROSS@all-native: cross-end
+
+@CROSS@COMPILER_SETTINGS = (set! compiler:cross-compiling? true)
HOST_SCHEME = '$(MIT_SCHEME_EXE)' --batch-mode
BOOTSTRAP_COMPILER = $(BOOTSTRAP_TOOLCHAIN)
BOOTSTRAP_SYNTAXER = $(HOST_SCHEME) --band ./boot/syntaxer.com
BOOTSTRAP_TOOLCHAIN = $(HOST_SCHEME) --band ./boot/compiler.com \
- --eval '(set! compiler:cross-compiling? true)'
+ --eval '(begin $(COMPILER_SETTINGS))'
.PHONY: bootstrap-toolchain
bootstrap-toolchain: boot/compiler.com
microcode/scheme: compile-microcode
lib/runtime.com: compile-runtime
-lib/runtime.com: cross-end
+@CROSS@lib/runtime.com: cross-end
lib/runtime.com: microcode/scheme
(. etc/functions.sh && get_fasl_file && cd runtime \
&& (echo '(disk-save "../$@")' \
: ${enable_host_scheme_test=yes}
fi
+AC_ARG_ENABLE([cross-compiling],
+ AS_HELP_STRING([--enable-cross-compiling],
+ [Cross-compile scheme, even if to the same target]))
+: ${enable_cross_compiling=no}
+if test "x$enable_cross_compiling" = xyes; then
+ CROSS=
+else
+ CROSS=\#
+fi
+
AC_ARG_WITH([default-target],
AS_HELP_STRING([--with-default-target],
[Set the default make target [[all]]]))
AC_SUBST([MIT_SCHEME_EXE])
AC_SUBST([AUXDIR_NAME])
AC_SUBST([AUXDIR])
+AC_SUBST([CROSS])
AC_PROG_INSTALL
AC_PROG_LN_S