From 43bc8cf214098fedf01be706351cd5be23a63221 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 6 May 2007 14:17:14 +0000 Subject: [PATCH] Restructure the build scripts to allow building a native system from a liarc system. More work needs to be done, but these changes don't break the other builds. --- v7/src/Clean.sh | 4 +-- v7/src/Makefile.in | 16 ++++++---- v7/src/etc/c-boot-compiler.sh | 56 ++++++++++++++--------------------- v7/src/etc/c-compile.sh | 12 +------- v7/src/etc/c-prepare.sh | 13 ++------ v7/src/etc/compile.scm | 30 +++++++++---------- v7/src/etc/compile.sh | 21 +++++++------ 7 files changed, 64 insertions(+), 88 deletions(-) diff --git a/v7/src/Clean.sh b/v7/src/Clean.sh index 6ace9242b..3fdeb712a 100755 --- a/v7/src/Clean.sh +++ b/v7/src/Clean.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: Clean.sh,v 1.14 2007/05/03 03:40:02 cph Exp $ +# $Id: Clean.sh,v 1.15 2007/05/06 14:16:44 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -69,7 +69,7 @@ esac . etc/functions.sh -maybe_rm boot-compiler.com +maybe_rm c-boot-compiler.com native-boot-compiler.com if [ ${FULL} = yes ]; then maybe_rm lib/*.com diff --git a/v7/src/Makefile.in b/v7/src/Makefile.in index 508dd93a4..a938567c7 100644 --- a/v7/src/Makefile.in +++ b/v7/src/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.34 2007/05/04 01:27:30 cph Exp $ +# $Id: Makefile.in,v 1.35 2007/05/06 14:16:49 cph Exp $ # # Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, @@ -72,17 +72,23 @@ COMPILE_SCRIPT = @COMPILE_SCRIPT@ all: ( cd microcode && $(MAKE) all ) - $(srcdir)/etc/$(COMPILE_SCRIPT) $(srcdir) + $(srcdir)/etc/$(COMPILE_SCRIPT) ( cd microcode && $(MAKE) liarc-bundles ) $(srcdir)/etc/build-bands.sh -c: boot-compiler.com +c: c-boot-compiler.com $(srcdir)/etc/c-prepare.sh -rm -f liarc.stamp echo "done" > liarc.stamp -boot-compiler.com: - $(srcdir)/etc/c-boot-compiler.sh +native: native-boot-compiler.com + $(srcdir)/etc/compile.sh mit-scheme-c --band native-boot-compiler.com + +c-boot-compiler.com: + $(srcdir)/etc/c-boot-compiler.sh mit-scheme c-boot-compiler + +native-boot-compiler.com: + $(srcdir)/etc/c-boot-compiler.sh mit-scheme-c native-boot-compiler mostlyclean clean distclean maintainer-clean c-clean: $(srcdir)/Clean.sh $@ $(SUBDIRS) diff --git a/v7/src/etc/c-boot-compiler.sh b/v7/src/etc/c-boot-compiler.sh index bda41a0d8..018a27da7 100755 --- a/v7/src/etc/c-boot-compiler.sh +++ b/v7/src/etc/c-boot-compiler.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: c-boot-compiler.sh,v 1.4 2007/05/03 03:45:51 cph Exp $ +# $Id: c-boot-compiler.sh,v 1.5 2007/05/06 14:16:54 cph Exp $ # # Copyright 2007 Massachusetts Institute of Technology # @@ -18,58 +18,48 @@ # # You should have received a copy of the GNU General Public License # along with MIT/GNU Scheme; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. set -e -if [ -z "${SCHEME_LARGE}" ]; then - SCHEME_LARGE="mit-scheme --heap 6000" +if [ ${#} -eq 2 ]; then + EXE=${1} + OUT=${2} +else + echo "usage: ${0} " + exit 1 fi +CMD="${EXE} --heap 6000" -if [ -z "${SCHEME_COMPILER}" ]; then - SCHEME_COMPILER="${SCHEME_LARGE} --compiler" -fi - -# Step 1: Compile CREF and SF natively, so that we can load them -# independently of the compiler. (There is no standard band that -# loads them independently.) - -echo "${SCHEME_COMPILER}" -${SCHEME_COMPILER} <