From: Chris Hanson Date: Fri, 12 Jan 2007 06:19:53 +0000 (+0000) Subject: Replace "--enable-c-back-end" with "--enable-native-code". Update X-Git-Tag: 20090517-FFI~791 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8afc676549ee8cccae25208f1a79a54e70722fcf;p=mit-scheme.git Replace "--enable-c-back-end" with "--enable-native-code". Update compiler cleaning and configuration to handle C shared-object files. --- diff --git a/v7/src/compiler/Clean.sh b/v7/src/compiler/Clean.sh index 0c1f16bc0..f17ad5191 100755 --- a/v7/src/compiler/Clean.sh +++ b/v7/src/compiler/Clean.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: Clean.sh,v 1.11 2007/01/05 21:19:20 cph Exp $ +# $Id: Clean.sh,v 1.12 2007/01/12 06:19:49 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -31,9 +31,9 @@ if [ $# -ne 1 ]; then exit 1 fi -TOPDIR="${TOPDIR:-$(pwd)/..}" +TOPDIR=${TOPDIR:-$(pwd)/..} export TOPDIR -CLEANSH="${TOPDIR}/etc/Clean.sh" +CLEANSH=${TOPDIR}/etc/Clean.sh "${CLEANSH}" "${1}" rm-pkg for SUBDIR in back base fggen fgopt machine rtlbase rtlgen rtlopt; do @@ -45,7 +45,8 @@ done case "${1}" in distclean | maintainer-clean) - rm -f machine compiler.cbf compiler.pkg compiler.sf make.com + rm -f machine compiler.cbf compiler.pkg compiler.sf + "${CLEANSH}" "${1}" rm-bin rm-com ;; esac diff --git a/v7/src/compiler/configure b/v7/src/compiler/configure index 746bf6fd6..ea6a3d80c 100755 --- a/v7/src/compiler/configure +++ b/v7/src/compiler/configure @@ -1,6 +1,6 @@ #!/bin/sh -# $Id: configure,v 1.10 2007/01/05 21:19:20 cph Exp $ +# $Id: configure,v 1.11 2007/01/12 06:19:53 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -23,16 +23,19 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301, USA. -enable_c_back_end="no" - +MACHINE= while test $# -gt 0; do case "${1}" in - (--enable-c-back-end) - enable_c_back_end="yes" + (--enable-native-code=c) + MACHINE=C + shift + ;; + (--enable-native-code) + MACHINE= shift ;; - (--disable-c-back-end) - enable_c_back_end="no" + (--disable-native-code | --enable-native-code=no) + MACHINE=none shift ;; (*) @@ -41,39 +44,48 @@ while test $# -gt 0; do esac done -if test ! -e machine; then - if test "${enable_c_back_end}" = "yes"; then - MACHINE="C" - else - case `./config.guess` in - (alpha-* | alphaev[56]-* | alphaev56-* | alphapca56-*) - MACHINE="alpha" - ;; - (m68k-*) - MACHINE="bobcat" - ;; - (i[3456]86-*) - MACHINE="i386" - ;; - (mips-* | mipsel-*) - MACHINE="mips" - ;; - (sparc-*) - MACHINE="sparc" - ;; - (hppa-* | hppa1.[01]-* | hppa2.?-*) - MACHINE="spectrum" - ;; - (vax-*) - MACHINE="vax" - ;; - (*) - MACHINE="C" - ;; - esac - fi - ln -s "machines/${MACHINE}" machine +if test "x${MACHINE}" = x; then + case `./config.guess` in + (alpha-* | alphaev[56]-* | alphaev56-* | alphapca56-*) + MACHINE=alpha + ;; + (m68k-*) + MACHINE=bobcat + ;; + (i[3456]86-*) + MACHINE=i386 + ;; + (mips-* | mipsel-*) + MACHINE=mips + ;; + (sparc-*) + MACHINE=sparc + ;; + (hppa-* | hppa1.[01]-* | hppa2.?-*) + MACHINE=spectrum + ;; + (vax-*) + MACHINE=vax + ;; + (*) + MACHINE=none + ;; + esac +fi + +if test "${MACHINE}" = none; then + exit 0 fi -for FN in compiler.cbf compiler.pkg compiler.sf make.com; do - test -h "${FN}" || ln -s "machine/${FN}" .; + +ln -s "machines/${MACHINE}" machine + +LINKS="compiler.cbf compiler.pkg compiler.sf" +if test "${MACHINE}" = C; then + LINKS="${LINKS} make.so" +else + LINKS="${LINKS} make.com" +fi + +for FN in ${LINKS}; do + ln -s machine/${FN} ${FN} done diff --git a/v7/src/configure.ac b/v7/src/configure.ac index ea131c517..7b32c8fb5 100644 --- a/v7/src/configure.ac +++ b/v7/src/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([MIT/GNU Scheme], [7.7.91], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.5 2007/01/05 21:19:20 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.6 2007/01/12 06:19:45 cph Exp $]) AC_CONFIG_SRCDIR([microcode/boot.c]) AC_PROG_MAKE_SET @@ -28,8 +28,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ]) -AC_ARG_ENABLE([c-back-end], -[[ --enable-c-back-end Build portable system with C output [no]]]) +AC_ARG_ENABLE([native-code], + AS_HELP_STRING([--enable-native-code], + [Support native compiled code if available [[yes]]])) AC_PROG_INSTALL AC_PROG_LN_S