#!/bin/sh
#
-# $Id: Clean.sh,v 1.16 2007/05/14 16:50:31 cph Exp $
+# $Id: Clean.sh,v 1.17 2007/06/08 06:03:20 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
fi
if [ ${MAINTAINER} = yes ]; then
- maybe_rm autom4te.cache configure liarc.stamp lib
+ maybe_rm autom4te.cache configure lib stamp_* boot-root
fi
for SUBDIR in ${SUBDIRS}; do
-# $Id: Makefile.in,v 1.40 2007/06/06 19:42:38 cph Exp $
+# $Id: Makefile.in,v 1.41 2007/06/08 06:03:32 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# **** END BOILERPLATE ****
-SUBDIRS_1 = cref sf star-parser
-SUBDIRS_2 = edwin imail sos ssp xml
+LIARC_BOOT_BUNDLES = compiler cref sf sos star-parser
+LIARC_BUNDLES = $(LIARC_BOOT_BUNDLES) edwin imail ssp xml
SUBDIRS = $(INSTALLED_SUBDIRS) 6001 compiler rcs win32 xdoc
-INSTALLED_SUBDIRS = microcode runtime $(SUBDIRS_1) $(SUBDIRS_2)
-
-LIARC_BOOT_BUNDLES = $(SUBDIRS_1) compiler
-LIARC_INSTALLED_BUNDLES = $(SUBDIRS_1) $(SUBDIRS_2)
-LIARC_BUNDLES = $(LIARC_INSTALLED_BUNDLES) compiler
+INSTALLED_SUBDIRS = microcode runtime $(LIARC_BUNDLES)
AUXDIR = @AUXDIR@
EDETC = $(AUXDIR)/edwin/etc
-all: compile-microcode @ALL_TARGET@ build-bands
+all: @ALL_TARGET@
+
+all-native: compile-microcode
+ @$(top_srcdir)/etc/compile.sh
+ $(MAKE) build-bands
+
+all-liarc:
+ @echo "Use etc/make-liarc.sh script."
compile-microcode:
(cd microcode && $(MAKE) all)
build-bands:
@$(top_srcdir)/etc/build-bands.sh
-all-native:
- @$(top_srcdir)/etc/compile.sh
-
-
-liarc-dist: liarc-stamp distclean
-
-liarc-stamp:
+liarc-dist:
@$(top_srcdir)/etc/compile-boot-compiler.sh mit-scheme
@$(top_srcdir)/etc/c-prepare.sh mit-scheme
- echo "done" > liarc.stamp
-
-all-liarc: liarc-compile-scheme
- $(MAKE) compile-microcode
- $(MAKE) compile-liarc-bundles
- rm -rf boot-lib
+ $(MAKE) distclean
-liarc-compile-scheme: boot-lib/liarc-compiler.com c-clean
- @$(top_srcdir)/etc/c-compile.sh boot-lib/scheme --library boot-lib \
- --band boot-lib/liarc-compiler.com
+stamp_install-liarc-microcode: compile-microcode
+ (cd microcode; $(MAKE) install)
+ echo "done" > $@
-boot-lib/liarc-compiler.com: boot-lib/scheme compile-liarc-boot-bundles
- $(INSTALL_PROGRAM) microcode/liarc-cc boot-lib/.
- $(INSTALL_PROGRAM) microcode/liarc-ld boot-lib/.
- $(mkinstalldirs) boot-lib/include
- $(INSTALL_DATA) microcode/*.h boot-lib/include/.
+stamp_compile-liarc-boot-bundles: stamp_install-liarc-microcode
@for BN in $(LIARC_BOOT_BUNDLES); do \
- CMD="$(INSTALL_DATA) $${BN}/$${BN}.so boot-lib/lib/.";\
+ CMD="(cd $${BN} && $(MAKE) compile-liarc-bundle)";\
echo "$${CMD}"; eval "$${CMD}";\
done
- @$(top_srcdir)/etc/build-boot-compiler.sh boot-lib liarc-compiler.com
-
-boot-lib/scheme: compile-microcode
- $(mkinstalldirs) boot-lib boot-lib/lib
- $(INSTALL_DATA) $(top_srcdir)/etc/optiondb.scm boot-lib/.
- $(INSTALL_PROGRAM) microcode/scheme boot-lib/.
- $(INSTALL_PROGRAM) microcode/gen-nonce boot-lib/.
- $(INSTALL_DATA) microcode/*.so boot-lib/lib/.
- rm -f boot-lib/star-parser; ln -s ../star-parser boot-lib/.
- rm -f boot-lib/options; ln -s ../runtime boot-lib/options
-
-compile-liarc-boot-bundles:
+ echo "done" > $@
+
+stamp_install-liarc-boot-bundles: stamp_compile-liarc-boot-bundles
@for BN in $(LIARC_BOOT_BUNDLES); do \
- CMD="(cd $${BN} && $(MAKE) compile-liarc-bundle)";\
+ CMD="(cd $${BN} && $(MAKE) install-liarc-bundle)";\
echo "$${CMD}"; eval "$${CMD}";\
done
+ echo "done" > $@
+
+stamp_build-liarc-boot-compiler: stamp_install-liarc-boot-bundles
+ @$(top_srcdir)/etc/build-boot-compiler.sh
+ echo "done" > $@
+
+stamp_install-liarc-boot-compiler: stamp_build-liarc-boot-compiler
+ $(MAKE) install-auxdir-top
+ echo "done" > $@
+
+stamp_liarc-compile-scheme:
+ @$(top_srcdir)/etc/c-compile.sh boot-root/bin/scheme \
+ --band boot-compiler.com
+ echo "done" > $@
-compile-liarc-bundles:
+stamp_compile-liarc-bundles: stamp_liarc-compile-scheme compile-microcode
@for BN in $(LIARC_BUNDLES); do \
CMD="(cd $${BN} && $(MAKE) compile-liarc-bundle)";\
echo "$${CMD}"; eval "$${CMD}";\
done
+ echo "done" > $@
-install-liarc-bundles:
- @for BN in $(LIARC_INSTALLED_BUNDLES); do \
+install-liarc-bundles: stamp_compile-liarc-bundles
+ @for BN in $(LIARC_BUNDLES); do \
CMD="(cd $${BN} && $(MAKE) install-liarc-bundle)";\
echo "$${CMD}"; eval "$${CMD}";\
done
+
+
+
native-from-liarc: boot-lib/native-compiler.com clean
$(MAKE) compile-microcode
@$(top_srcdir)/etc/compile.sh boot-lib/scheme --library boot-lib \
rm -rf boot-lib
boot-lib/native-compiler.com: boot-lib/scheme native-prepare
- @$(top_srcdir)/etc/build-boot-compiler.sh boot-lib native-compiler.com
+ @$(top_srcdir)/etc/build-boot-compiler.sh native-compiler.com
native-prepare:
@$(top_srcdir)/etc/compile-boot-compiler.sh mit-scheme-c
install: install-standard @INSTALL_LIARC_BUNDLES@
-install-standard:
+install-standard: install-auxdir-top
@for SUBDIR in $(INSTALLED_SUBDIRS); do \
echo "Making $@ in $${SUBDIR}";\
(cd $${SUBDIR}; $(MAKE) install) || exit 1;\
done
+ $(mkinstalldirs) $(DESTDIR)$(EDETC)
+ $(INSTALL_DATA) $(top_srcdir)/etc/TUTORIAL $(DESTDIR)$(EDETC)/.
+
+install-auxdir-top:
$(mkinstalldirs) $(DESTDIR)$(AUXDIR)
$(INSTALL_DATA) $(top_srcdir)/etc/optiondb.scm $(DESTDIR)$(AUXDIR)/.
$(INSTALL_DATA) lib/*.com $(DESTDIR)$(AUXDIR)/.
- $(mkinstalldirs) $(DESTDIR)$(EDETC)
- $(INSTALL_DATA) $(top_srcdir)/etc/TUTORIAL $(DESTDIR)$(EDETC)/.
-
.PHONY: all compile-microcode build-bands all-native
-.PHONY: liarc-dist all-c liarc-compile-scheme compile-liarc-boot-bundles
-.PHONY: compile-liarc-bundles native
+.PHONY: liarc-dist install-liarc-bundles
+.PHONY: native
.PHONY: mostlyclean clean distclean maintainer-clean c-clean
-.PHONY: tags TAGS install install-standard
+.PHONY: tags TAGS install install-standard install-auxdir-top
#!/bin/sh
-# $Id: choose-machine.sh,v 1.1 2007/06/06 19:42:38 cph Exp $
+# $Id: choose-machine.sh,v 1.2 2007/06/08 06:03:38 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
chosen "${MACHINE}"
esac
-[ -f ../liarc.stamp ] && chosen C
-
case `${DIR}/config.guess` in
alpha-* | alphaev[56]-* | alphaev56-* | alphapca56-*)
chosen alpha
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.15 2007/06/06 19:42:38 cph Exp $])
+AC_REVISION([$Id: configure.ac,v 1.16 2007/06/08 06:03:26 cph Exp $])
AC_CONFIG_SRCDIR([microcode/boot.c])
AC_PROG_MAKE_SET
AC_ARG_ENABLE([native-code],
AS_HELP_STRING([--enable-native-code],
[Support native compiled code if available [[yes]]]))
-if test -f liarc.stamp; then
- : ${enable_native_code='c'}
-else
- : ${enable_native_code='yes'}
-fi
+: ${enable_native_code='yes'}
case ${enable_native_code} in
c)
(cd lib; rm -f ${BN}; ${LN_S} ../microcode/${BN} .)
BN=liarcc-ld
(cd lib; rm -f ${BN}; ${LN_S} ../microcode/${BN} .)
+ for BN in sos star-parser; do
+ (cd lib; rm -f ${BN}; ${LN_S} ../${BN} .)
+ done
for BUNDLE in 6001 compiler cref edwin imail sf sos ssp star-parser xdoc xml; do
SO=${BUNDLE}.so
(cd lib/lib; rm -f ${SO}; ${LN_S} ../../${BUNDLE}/${SO} .)
#!/bin/sh
#
-# $Id: build-boot-compiler.sh,v 1.1 2007/06/06 19:42:39 cph Exp $
+# $Id: build-boot-compiler.sh,v 1.2 2007/06/08 06:03:44 cph Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
set -e
-if [ ${#} -eq 2 ]; then
- LIB=${1}
- BAND=${2}
-else
- echo "usage: ${0} <lib-dir> <band>"
- exit 1
-fi
-
cd runtime
if [ -f make.o ]; then
exit 1
fi
-CMD="../microcode/scheme --library ../${LIB} --fasl ${FASL} --heap 6000"
+CMD="../microcode/scheme --library ../lib --fasl ${FASL} --heap 6000"
echo "${CMD}"
eval "${CMD}" <<EOF
(begin
(load-option (quote compiler))
(load-option (quote cref))
(load-option (quote *parser))
- (disk-save "../${LIB}/${BAND}"))
+ (disk-save "../lib/boot-compiler.com"))
EOF
#| -*-Scheme-*-
-$Id: compile.scm,v 1.20 2007/06/06 19:42:39 cph Exp $
+$Id: compile.scm,v 1.21 2007/06/08 06:03:51 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(define (compile-all-dirs compile-dir)
(compile-boot-dirs compile-dir)
- (for-each compile-dir '("sos" "xml" "win32" "edwin" "imail" "ssp")))
+ (compile-dir "sos")
+ (with-working-directory-pathname "sos"
+ (lambda ()
+ (load "load")))
+ (for-each compile-dir '("xml" "win32" "edwin" "imail" "ssp")))
(define (compile-boot-dirs compile-dir)
(compile-cref compile-dir)
(if (and (eq? microcode-id/compiled-code-type 'C)
(file-exists? "compiler.so"))
(load "compiler.so"))
- (load
- (string-append (or (file-symbolic-link? "machine")
- (error "Missing compiler/machine link."))
- "/make")))))
+ (load "make"))))
(define (c-prepare)
(in-liarc
--- /dev/null
+#!/bin/sh
+#
+# $Id: make-liarc.sh,v 1.1 2007/06/08 06:03:57 cph Exp $
+#
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007 Massachusetts Institute of Technology
+#
+# This file is part of MIT/GNU Scheme.
+#
+# MIT/GNU Scheme is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# MIT/GNU Scheme is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# 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., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+set -e
+
+FASTP=no
+for ARG in "${@}"; do
+ case ${ARG} in
+ --help|--help=*|--version)
+ FASTP=yes
+ ;;
+ esac
+done
+
+if [ ${FASTP} = yes ]; then
+ exec ./configure "${@}"
+fi
+
+./configure --prefix=`pwd`/boot-root --enable-native-code=c
+make stamp_install-liarc-boot-compiler
+make c-clean distclean
+
+./configure --enable-native-code=c "${@}"
+make stamp_compile-liarc-bundles
+make build-bands
#| -*-Scheme-*-
-$Id: optiondb.scm,v 1.21 2007/06/06 19:42:40 cph Exp $
+$Id: optiondb.scm,v 1.22 2007/06/08 06:04:03 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(define-load-option 'COMPILER
(lambda () (load-option 'SF))
- (guarded-system-loader '(compiler)
- "compiler"
+ (guarded-system-loader '(compiler) "compiler"
(if (eq? microcode-id/compiled-code-type 'C)
"machines/C/make"
"make")))
#| -*-Scheme-*-
-$Id: utilities.scm,v 1.4 2007/06/06 19:42:40 cph Exp $
+$Id: utilities.scm,v 1.5 2007/06/08 06:04:09 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
"$^")
(newline port)
(write-rule port "install-liarc-bundle" so-file)
- (let ((dir
- (string-append "$(DESTDIR)$(AUXDIR)/" bundle)))
- (write-command port "$(mkinstalldirs)" dir)
- (write-command port
- "$(INSTALL_DATA)"
- "$^"
- (string-append dir "/.")))
+ (write-command port
+ "$(mkinstalldirs)"
+ "$(DESTDIR)$(AUXDIR)/lib")
+ (write-command port
+ "$(INSTALL_DATA)"
+ "$^"
+ "$(DESTDIR)$(AUXDIR)/lib/.")
(newline port)
(write-rule port
".PHONY"
dnl Process this file with autoconf to produce a configure script.
AC_INIT([MIT/GNU Scheme microcode], [15.1], [bug-mit-scheme@gnu.org], [mit-scheme])
-AC_REVISION([$Id: configure.ac,v 1.48 2007/06/06 19:42:40 cph Exp $])
+AC_REVISION([$Id: configure.ac,v 1.49 2007/06/08 06:04:15 cph Exp $])
AC_CONFIG_SRCDIR([boot.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_MAKE_SET
AC_ARG_ENABLE([native-code],
AS_HELP_STRING([--enable-native-code],
[Support native compiled code if available [[yes]]]))
-if test -f ../liarc.stamp; then
- : ${enable_native_code='c'}
-else
- : ${enable_native_code='yes'}
-fi
+: ${enable_native_code='yes'}
AC_ARG_WITH([openssl],
AS_HELP_STRING([--with-openssl],