Merge patch from James Bielman fixing self-build under Win32.
... a little bit of an accident ensued; I ran
canonicalize-whitespace on .sh files, which seemed to
work (except on wc.sh) until it scribbled all over
make.sh, confusing the shell interpreter utterly.
... the resulting files have built the system, nevertheless.
$b/pubring.pgp \
$b/contrib/asdf-module.mk \
$b/contrib/vanilla-module.mk \
- `for dir in $b/contrib/*; do
- if test -d $dir && test -f $dir/test-passed; then
+ `for dir in $b/contrib/*; do
+ if test -d $dir && test -f $dir/test-passed; then
echo $dir
fi
done`
# are never in the sources, so must've been created
# sbcl
# the runtime environment, created by compiling C code
-# sbcl.h
+# sbcl.h
# information about Lisp code needed to build the runtime environment,
# created by running GENESIS
# Config, target
# .#*, *.orig, .*.orig, *.rej
# rubbish left behind by CVS updates
# *.htm, *.html
-# The system doc sources are mostly texinfo, plus various odds
+# The system doc sources are mostly texinfo, plus various odds
# and ends like docstrings embedded in .lisp sources; any HTML is
# automatically-generated output.
# depend
# test-passed
# generated by automatic directory-test-thyself procedure
find . \( \
- -type l -o \
- -name '*~' -o \
- -name '#*#' -o \
- -name '.#*' -o \
- -name '*.orig' -o \
- -name '.*.orig' -o \
+ -type l -o \
+ -name '*~' -o \
+ -name '#*#' -o \
+ -name '.#*' -o \
+ -name '*.orig' -o \
+ -name '.*.orig' -o \
-name '*.rej' -o \
- -name '?*.x86f' -o \
- -name '?*.axpf' -o \
- -name '?*.lbytef' -o \
- -name '?*.fasl' -o \
- -name 'core' -o \
- -name '?*.core' -o \
- -name '*.map' -o \
- -name '*.nm' -o \
- -name '*.host-obj' -o \
- -name '*.lisp-obj' -o \
- -name '*.target-obj' -o \
- -name '*.lib' -o \
- -name '*.tmp' -o \
- -name '*.lisp-temp' -o \
- -name '*.o' -o \
- -name '*.so' -o \
- -name 'a.out' -o \
- -name 'sbcl' -o \
- -name 'sbcl.h' -o \
- -name 'depend' -o \
- -name 'TAGS' -o \
- -name 'tags' -o \
- -name 'test-passed' -o \
- -name 'local-target-features.lisp-expr' \) -print | xargs rm -f
+ -name '?*.x86f' -o \
+ -name '?*.axpf' -o \
+ -name '?*.lbytef' -o \
+ -name '?*.fasl' -o \
+ -name 'core' -o \
+ -name '?*.core' -o \
+ -name '*.map' -o \
+ -name '*.nm' -o \
+ -name '*.host-obj' -o \
+ -name '*.lisp-obj' -o \
+ -name '*.target-obj' -o \
+ -name '*.lib' -o \
+ -name '*.tmp' -o \
+ -name '*.lisp-temp' -o \
+ -name '*.o' -o \
+ -name '*.so' -o \
+ -name 'a.out' -o \
+ -name 'sbcl' -o \
+ -name 'sbcl.h' -o \
+ -name 'depend' -o \
+ -name 'TAGS' -o \
+ -name 'tags' -o \
+ -name 'test-passed' -o \
+ -name 'local-target-features.lisp-expr' \) -print | xargs rm -f
#!/bin/sh
set -e
-# a superset of clean.sh, cleaning up not only automatically
+# a superset of clean.sh, cleaning up not only automatically
# generated files but other things (e.g. customization files)
# which shouldn't be in the distribution
# Since the CVS/ subdirectories on my (WHN) machine have CVS/Root
# containing
# :ext:wnewman@cvs.sbcl.sourceforge.net:/cvsroot/sbcl
-# they're not useful for anyone else, so blow them away. (And even
-# if we could set them up to refer to CVS in a way that someone else
-# could use, perhaps referring to SourceForge anoncvs, what'd be the
-# point? I'd expect a comfortable majority of those who want to do
+# they're not useful for anyone else, so blow them away. (And even
+# if we could set them up to refer to CVS in a way that someone else
+# could use, perhaps referring to SourceForge anoncvs, what'd be the
+# point? I'd expect a comfortable majority of those who want to do
# CVS operations would be inclined to start with "cvs co" anyway.)
find . \( -type d -a -name CVS \) -print | xargs rm -r
#!/bin/sh
-# After the ordeal, we went back to the Factory. Greenblatt said he
+# After the ordeal, we went back to the Factory. Greenblatt said he
# was gonna locate us in a cell. He said: "Kid, I'm gonna INTERN you in a
# cell. I want your manual and your mouse."
-# I said, "Greenblatt, I can understand your wantin' my manual, so
+# I said, "Greenblatt, I can understand your wantin' my manual, so
# I don't have any documentation about the cell, but what do you want my
-# mouse for?" and he said, "Kid, we don't want any window system problems".
+# mouse for?" and he said, "Kid, we don't want any window system problems".
# I said, "Greenblatt, did you think I was gonna deexpose myself for
# litterin'?"
-# Greenblatt said he was makin' sure, and, friends, Greenblatt
+# Greenblatt said he was makin' sure, and, friends, Greenblatt
# was, 'cause he took out the left Meta-key so I couldn't double bucky the
# rubout and cold-boot, and he took out the Inspector so I couldn't
# click-left on Modify, set the PROCESS-WARM-BOOT-ACTION on the window,
echo /creating docstring snippets from SBCL=\'$SBCLRUNTIME\' for packages \'$PACKAGES\'
$SBCL <<EOF
-(load "docstrings.lisp")
+(load "docstrings.lisp")
(require :asdf)
-(dolist (module (quote ($MODULES)))
- (require module))
-(sb-texinfo:generate-includes "$DOCSTRINGDIR" $PACKAGES)
+(dolist (module (quote ($MODULES)))
+ (require module))
+(sb-texinfo:generate-includes "$DOCSTRINGDIR" $PACKAGES)
(sb-ext:quit))
EOF
GNUMAKE=gmake
elif [ -x "`which gnumake`" ] ; then
# MacOS X aka Darwin
- GNUMAKE=gnumake
+ GNUMAKE=gnumake
elif [ "GNU Make" = "`make -v | head -n 1 | cut -b 0-8`" ]; then
GNUMAKE=make
else
# Install SBCL files into the usual places.
-ensure_dirs ()
+ensure_dirs ()
{
- for j in $*; do
- test -d $j || mkdir -p $j
+ for j in $*; do
+ test -d $j || mkdir -p $j
done;
}
# Before doing anything else, make sure we have an SBCL to install
if [ -f src/runtime/sbcl ]; then
if [ -f output/sbcl.core ]; then
- true
+ true
else
- echo "output/sbcl.core not found, aborting installation."
- exit 1
+ echo "output/sbcl.core not found, aborting installation."
+ exit 1
fi
else
echo "src/runtime/sbcl not found, aborting installation."
cp src/runtime/sbcl $BUILD_ROOT$INSTALL_ROOT/bin/
cp output/sbcl.core $BUILD_ROOT$SBCL_HOME/sbcl.core
-# installing contrib
+# installing contrib
SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
SBCL_BUILDING_CONTRIB=1
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
+case `uname` in
+ Linux)
+ sbcl_os="linux"
+ ;;
+ OSF1)
+ # it's changed name twice since it was called OSF/1: clearly
+ # the marketers forgot to tell the engineers about Digital Unix
+ # _or_ OSF/1 ...
+ sbcl_os="osf1"
+ ;;
+ *BSD)
+ case `uname` in
+ FreeBSD)
+ sbcl_os="freebsd"
+ ;;
+ OpenBSD)
+ sbcl_os="openbsd"
+ ;;
+ NetBSD)
+ sbcl_os="netbsd"
+ ;;
+ *)
+ echo unsupported BSD variant: `uname`
+ exit 1
+ ;;
+ esac
+ ;;
+ Darwin)
+ sbcl_os="darwin"
+ ;;
+ SunOS)
+ sbcl_os="sunos"
+ ;;
+ CYGWIN* | WindowsNT | MINGW*)
+ sbcl_os="win32"
+ ;;
+ *)
+ echo unsupported OS type: `uname`
+ exit 1
+ ;;
+esac
+
+link_or_copy() {
+ if [ "$sbcl_os" = "win32" ] ; then
+ cp -r "$1" "$2"
+ else
+ ln -s "$1" "$2"
+ fi
+}
+
+remove_dir_safely() {
+ if [ "$sbcl_os" = "win32" ] ; then
+ if [ -d "$1" ] ; then
+ rm -rf "$1"
+ elif [ -e "$1" ] ; then
+ echo "I'm afraid to remove non-directory $1."
+ exit 1
+ fi
+ else
+ if [ -h "$1" ] ; then
+ rm "$1"
+ elif [ -w "$1" ] ; then
+ echo "I'm afraid to replace non-symlink $1 with a symlink."
+ exit 1
+ fi
+ fi
+}
+
echo //entering make-config.sh
echo //ensuring the existence of output/ directory
printf '(' >> $ltf
echo //guessing default target CPU architecture from host architecture
-case `uname -m` in
- *86) guessed_sbcl_arch=x86 ;;
+case `uname -m` in
+ *86) guessed_sbcl_arch=x86 ;;
i86pc) guessed_sbcl_arch=x86 ;;
- *x86_64) guessed_sbcl_arch=x86-64 ;;
+ *x86_64) guessed_sbcl_arch=x86-64 ;;
[Aa]lpha) guessed_sbcl_arch=alpha ;;
sparc*) guessed_sbcl_arch=sparc ;;
sun*) guessed_sbcl_arch=sparc ;;
mips*) guessed_sbcl_arch=mips ;;
*)
# If we're not building on a supported target architecture, we
- # we have no guess, but it's not an error yet, since maybe
- # target architecture will be specified explicitly below.
- guessed_sbcl_arch=''
- ;;
+ # we have no guess, but it's not an error yet, since maybe
+ # target architecture will be specified explicitly below.
+ guessed_sbcl_arch=''
+ ;;
esac
echo //setting up CPU-architecture-dependent information
echo "can't guess target SBCL architecture, need SBCL_ARCH environment var"
exit 1
fi
-printf ":%s" "$sbcl_arch" >> $ltf
+printf ":%s" "$sbcl_arch" >> $ltf
for d in src/compiler src/assembly; do
echo //setting up symlink $d/target
original_dir=`pwd`
+ remove_dir_safely "$d/target"
cd ./$d
- if [ -h target ] ; then
- rm target
- elif [ -w target ] ; then
- echo "I'm afraid to replace non-symlink $d/target with a symlink."
- exit 1
- fi
if [ -d $sbcl_arch ] ; then
- ln -s $sbcl_arch target
+ link_or_copy $sbcl_arch target
else
- echo "missing sbcl_arch directory $PWD/$sbcl_arch"
- exit 1
+ echo "missing sbcl_arch directory $PWD/$sbcl_arch"
+ exit 1
fi
cd $original_dir
done
echo //setting up symlink src/compiler/assembly
-if [ -h src/compiler/assembly ] ; then
- rm src/compiler/assembly
-elif [ -w src/compiler/assembly ] ; then
- echo "I'm afraid to replace non-symlink compiler/assembly with a symlink."
- exit 1
-fi
-ln -s ../assembly src/compiler/assembly
+remove_dir_safely src/compiler/assembly
+original_dir=`pwd`
+cd src/compiler
+link_or_copy ../assembly assembly
+cd $original_dir
echo //setting up OS-dependent information
original_dir=`pwd`
# KLUDGE: these two logically belong in the previous section
# ("architecture-dependent"); it seems silly to enforce this in terms
# of the shell script, though. -- CSR, 2002-02-03
-ln -s $sbcl_arch-arch.h target-arch.h
-ln -s $sbcl_arch-lispregs.h target-lispregs.h
-case `uname` in
- Linux)
- printf ' :elf' >> $ltf
- printf ' :linux' >> $ltf
- sbcl_os="linux"
- if [ $sbcl_arch = "x86-64" ]; then
- ln -s Config.x86_64-linux Config
- else
- ln -s Config.$sbcl_arch-linux Config
- fi
- ln -s $sbcl_arch-linux-os.h target-arch-os.h
- ln -s linux-os.h target-os.h
- ;;
- OSF1)
- # it's changed name twice since it was called OSF/1: clearly
- # the marketers forgot to tell the engineers about Digital Unix
- # _or_ OSF/1 ...
- printf ' :elf' >> $ltf
- printf ' :osf1' >> $ltf
- sbcl_os="osf1"
- ln -s Config.$sbcl_arch-osf1 Config
- ln -s $sbcl_arch-osf1-os.h target-arch-os.h
- ln -s osf1-os.h target-os.h
- ;;
- *BSD)
- printf ' :bsd' >> $ltf
- ln -s $sbcl_arch-bsd-os.h target-arch-os.h
- ln -s bsd-os.h target-os.h
- case `uname` in
- FreeBSD)
- printf ' :elf' >> $ltf
- printf ' :freebsd' >> $ltf
- sbcl_os="freebsd"
- ln -s Config.$sbcl_arch-freebsd Config
- ;;
- OpenBSD)
- printf ' :elf' >> $ltf
- printf ' :openbsd' >> $ltf
- sbcl_os="openbsd"
- ln -s Config.$sbcl_arch-openbsd Config
- ;;
- NetBSD)
+link_or_copy $sbcl_arch-arch.h target-arch.h
+link_or_copy $sbcl_arch-lispregs.h target-lispregs.h
+case "$sbcl_os" in
+ linux)
+ printf ' :elf' >> $ltf
+ printf ' :linux' >> $ltf
+ if [ $sbcl_arch = "x86-64" ]; then
+ link_or_copy Config.x86_64-linux Config
+ else
+ link_or_copy Config.$sbcl_arch-linux Config
+ fi
+ link_or_copy $sbcl_arch-linux-os.h target-arch-os.h
+ link_or_copy linux-os.h target-os.h
+ ;;
+ osf1)
+ printf ' :elf' >> $ltf
+ printf ' :osf1' >> $ltf
+ link_or_copy Config.$sbcl_arch-osf1 Config
+ link_or_copy $sbcl_arch-osf1-os.h target-arch-os.h
+ link_or_copy osf1-os.h target-os.h
+ ;;
+ *bsd)
+ printf ' :bsd' >> $ltf
+ link_or_copy $sbcl_arch-bsd-os.h target-arch-os.h
+ link_or_copy bsd-os.h target-os.h
+ case "$sbcl_os" in
+ freebsd)
+ printf ' :elf' >> $ltf
+ printf ' :freebsd' >> $ltf
+ link_or_copy Config.$sbcl_arch-freebsd Config
+ ;;
+ openbsd)
+ printf ' :elf' >> $ltf
+ printf ' :openbsd' >> $ltf
+ link_or_copy Config.$sbcl_arch-openbsd Config
+ ;;
+ netbsd)
printf ' :netbsd' >> $ltf
- printf ' :elf' >> $ltf
- sbcl_os="netbsd"
- ln -s Config.$sbcl_arch-netbsd Config
- ;;
- *)
- echo unsupported BSD variant: `uname`
- exit 1
- ;;
- esac
- ;;
- Darwin)
- printf ' :mach-o' >> $ltf
- printf ' :bsd' >> $ltf
- sbcl_os="darwin"
- ln -s $sbcl_arch-darwin-os.h target-arch-os.h
- ln -s bsd-os.h target-os.h
- printf ' :darwin' >> $ltf
- ln -s Config.$sbcl_arch-darwin Config
- ;;
- SunOS)
- printf ' :elf' >> $ltf
+ printf ' :elf' >> $ltf
+ link_or_copy Config.$sbcl_arch-netbsd Config
+ ;;
+ *)
+ echo unsupported BSD variant: `uname`
+ exit 1
+ ;;
+ esac
+ ;;
+ darwin)
+ printf ' :mach-o' >> $ltf
+ printf ' :bsd' >> $ltf
+ link_or_copy $sbcl_arch-darwin-os.h target-arch-os.h
+ link_or_copy bsd-os.h target-os.h
+ printf ' :darwin' >> $ltf
+ link_or_copy Config.$sbcl_arch-darwin Config
+ ;;
+ sunos)
+ printf ' :elf' >> $ltf
printf ' :sunos' >> $ltf
- sbcl_os="sunos"
- ln -s Config.$sbcl_arch-sunos Config
- ln -s $sbcl_arch-sunos-os.h target-arch-os.h
- ln -s sunos-os.h target-os.h
- ;;
+ link_or_copy Config.$sbcl_arch-sunos Config
+ link_or_copy $sbcl_arch-sunos-os.h target-arch-os.h
+ link_or_copy sunos-os.h target-os.h
+ ;;
+ win32)
+ printf ' :win32' >> $ltf
+ link_or_copy Config.$sbcl_arch-win32 Config
+ link_or_copy $sbcl_arch-win32-os.h target-arch-os.h
+ link_or_copy win32-os.h target-os.h
+ ;;
*)
- echo unsupported OS type: `uname`
- exit 1
- ;;
+ echo unsupported OS type: `uname`
+ exit 1
+ ;;
esac
cd $original_dir
printf ' :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack' >> $ltf
printf ' :stack-allocatable-closures :alien-callbacks' >> $ltf
if [ "$sbcl_os" = "linux" ] || [ "$sbcl_os" = "freebsd" ] || [ "$sbcl_os" = "netbsd" ] || [ "$sbcl_os" = "sunos" ]; then
- printf ' :linkage-table' >> $ltf
+ printf ' :linkage-table' >> $ltf
fi
elif [ "$sbcl_arch" = "x86-64" ]; then
printf ' :gencgc :stack-grows-downward-not-upward :c-stack-is-control-stack :linkage-table' >> $ltf
exit 1
fi
elif [ "$sbcl_arch" = "sparc" ]; then
- # Test the compiler in order to see if we are building on Sun
+ # Test the compiler in order to see if we are building on Sun
# toolchain as opposed to GNU binutils, and write the appropriate
- # FUNCDEF macro for assembler. No harm in running this on sparc-linux
+ # FUNCDEF macro for assembler. No harm in running this on sparc-linux
# as well.
sh tools-for-build/sparc-funcdef.sh > src/runtime/sparc-funcdef.h
if [ "$sbcl_os" = "sunos" ] || [ "$sbcl_os" = "linux" ]; then
- printf ' :linkage-table' >> $ltf
+ printf ' :linkage-table' >> $ltf
fi
printf ' :stack-allocatable-closures' >> $ltf
elif [ "$sbcl_arch" = "alpha" ]; then
# symbol table data on the C runtime. And we can get that symbol
# data only after the C runtime has been built. Therefore, even
# though we ran GENESIS earlier, we couldn't get it to make a .core
-# file at that time; but we needed to run it earlier in order to
+# file at that time; but we needed to run it earlier in order to
# get to where we can write a .core file.)
echo //loading and running GENESIS to create cold-sbcl.core
$SBCL_XC_HOST < make-genesis-2.lisp
#
# (This C build has to come after the first genesis in order to get
# the sbcl.h the C build needs, and come before the second genesis in
-# order to produce the symbol table file that second genesis needs. It
+# order to produce the symbol table file that second genesis needs. It
# could come either before or after running the cross compiler; that
# doesn't matter.)
echo //building runtime system and symbol table file
for i in contrib/*; do
test -d $i && test -f $i/Makefile || continue;
# export INSTALL_DIR=$SBCL_HOME/`basename $i `
- test -f $i/test-passed && rm $i/test-passed
+ test -f $i/test-passed && rm $i/test-passed
$GNUMAKE -C $i test && touch $i/test-passed
done
do
if [ -d "$dir" -a -f "$dir/Makefile" -a ! -f "$dir/test-passed" ]; then
if $HEADER_HAS_BEEN_PRINTED; then
- echo > /dev/null
+ echo > /dev/null
else
- echo "Failed contribs:"
- HEADER_HAS_BEEN_PRINTED=true
+ echo "Failed contribs:"
+ HEADER_HAS_BEEN_PRINTED=true
fi
echo " `basename $dir`"
fi
# endlessly for a programmer to help it out with input
# on *DEBUG-IO*
# "lisp -batch" to use an existing CMU CL binary as a cross-compilation host
-# "lisp -noinit -batch"
+# "lisp -noinit -batch"
# to use an existing CMU CL binary as a cross-compilation host
# when you have weird things in your .cmucl-init file
# "openmcl --batch"
# optimizations (especially specializable arrays) that it doesn't
# know how to implement how in a portable way. (Or maybe that wouldn't
# require a second pass, just testing at build-the-cross-compiler time
-# whether the cross-compilation host returns suitable values from
+# whether the cross-compilation host returns suitable values from
# UPGRADED-ARRAY-ELEMENT-TYPE?)
LANG=C
# identify the target architecture).
# On the host system:
# SBCL_XC_HOST=<whatever> sh make-host-1.sh
-# Copy src/runtime/genesis/*.h from the host system to the target
+# Copy src/runtime/genesis/*.h from the host system to the target
# system.
# On the target system:
# sh make-target-1.sh
NPASSED=`find contrib -name test-passed -print | wc -l`
echo
echo "The build seems to have finished successfully, including $NPASSED (out of $NCONTRIBS)"
-echo "contributed modules. If you would like to run more extensive tests on"
+echo "contributed modules. If you would like to run more extensive tests on"
echo "the new SBCL, you can try:"
echo
echo " cd tests && sh ./run-tests.sh"
echo
echo "To install SBCL (more information in INSTALL):"
echo
-echo " sh install.sh"
+echo " sh install.sh"
build_finished=`date`
echo
# This script is not a reliable way to build the system, but it is
# fast.:-| It can be useful if you are trying to debug a low-level
# problem, e.g. a problem in src/runtime/*.c or in
-# src/code/cold-init.lisp. Soon, you'll find yourself wanting to
+# src/code/cold-init.lisp. Soon, you'll find yourself wanting to
# test a small change in a file compiled into cold-sbcl.core without
# redoing the entire rebuild-the-system-from-scratch process. You may be
# able to avoid a complete make-host-2.sh by just letting this script
# Mostly it looks as though such limitations aren't fixable without
# the aforementioned rearchitecting or solving the halting problem.
#
-# To make this work, you need an after-xc.core file. To cause the
+# To make this work, you need an after-xc.core file. To cause the
# system to generate an after-xc.core file, you need
# :SB-AFTER-XC-CORE in target features during an ordinary build.
-# See the comments in base-target-features.lisp-expr for the
+# See the comments in base-target-features.lisp-expr for the
# recommended way to make that happen.
#######################################################################
;;
openmcl)
LISP="openmcl"
- INIT="-b"
- CORE="-I"
- ;;
+ INIT="-b"
+ CORE="-I"
+ ;;
*) echo unknown host type: "$HOST_TYPE"
echo should be one of "sbcl", "cmucl", or "clisp"
exit 1
# Create a source distribution. (You should run clean.sh first.)
b=${1:?missing base directory name argument}
-tar cf $b-source.tar $b
+tar cf $b-source.tar $b
# (You *are* encouraged to design and implement a coherent stable
# interface, though.:-| As far as I (WHN 2002-05-19) know, no one is
# working on one and it would be a nice thing to have.)
-OS_LINK_FLAGS = -Wl,--export-dynamic
-OS_LIBS =
+OS_LINK_FLAGS = -Wl,--export-dynamic,-mno-cygwin
+OS_LIBS = -mno-cygwin
GC_SRC = gencgc.c
-CFLAGS = -g -Wall -O3
+CFLAGS = -g -Wall -O3 -mno-cygwin
ASFLAGS = $(CFLAGS)
-CPP = /opt/xmingw/bin/i386-mingw32msvc-cpp
-CC = /opt/xmingw/bin/i386-mingw32msvc-gcc
-LD = /opt/xmingw/bin/i386-mingw32msvc-ld
-NM = /opt/xmingw/bin/i386-mingw32msvc-nm
+CPP = cpp
+CC = gcc
+LD = ld
+NM = nm
+
+# Nothing to do for after-grovel-headers.
+.PHONY: after-grovel-headers
+after-grovel-headers:
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
if [ "$SBCL_CLOCC_ANSI_TEST" = "" ] ; then
echo //punting clocc ansi-test because SBCL_CLOCC_ANSI_TEST is undefined
exit 104
-else
+else
echo //going on to run clocc ansi-test in $SBCL_CLOCC_ANSI_TEST
cd $SBCL_CLOCC_ANSI_TEST
fi
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# succession.
cat > $tmpfilename <<EOF
(in-package :cl-user)
- (defclass another-class-with-slots ()
+ (defclass another-class-with-slots ()
(a-new-slot-name))
(defun foo (x)
(values (setf (slot-value x 'a-new-slot-name) 2)
rm $tmpfilename
rm $compiled_tmpfilename
-# success
+# success
exit 104
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# having the same name.
cat > $tmpfilename <<EOF
(in-package :cl-user)
- (defun foo (x)
+ (defun foo (x)
(flet ((baz (y) (load y)))
(declare (notinline baz))
(baz x)))
- (defun bar (x)
+ (defun bar (x)
(flet ((baz (y) (load y)))
(declare (notinline baz))
(baz x)))
cat > $tmpfilename <<EOF
(in-package :cl-user)
(defun foo (x) (list x))
- (defun bar (x)
+ (defun bar (x)
(declare (notinline foo))
(1+ (foo x)))
EOF
# been there
cat > $tmpfilename <<EOF
(eval-when (:compile-toplevel :load-toplevel :execute)
- (defstruct buffer-state
+ (defstruct buffer-state
(output-index 0)))
-
+
(defclass buffered-stream-mixin ()
((buffer-state :initform (make-buffer-state))))
-
+
(defgeneric frob (stream))
(defmethod frob ((stream t))
nil)
cat > $tmpfilename <<EOF
(defun bar ()
(let ((result ""))
- (nreverse result)))
+ (nreverse result)))
EOF
expect_clean_compile $tmpfilename
rm $tmpfilename
rm $compiled_tmpfilename
-# success
+# success
exit 104
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# In sbcl-0.9.8 saving cores with callbacks didn't work on gencgc platforms
$SBCL <<EOF
- (defun bar ()
+ (defun bar ()
(format t "~&Callbacks not supported, skipping~%")
(quit :unix-status 42))
#+alien-callbacks
{
# Test compiling and loading.
$SBCL <<EOF
- (compile-file "$1")
- ;;; But loading the file should fail.
- (multiple-value-bind (value0 value1) (ignore-errors (load *))
- (assert (null value0))
- (format t "VALUE1=~S (~A)~%" value1 value1)
- (assert (typep value1 'error)))
- (sb-ext:quit :unix-status 52)
+ (compile-file "$1")
+ ;;; But loading the file should fail.
+ (multiple-value-bind (value0 value1) (ignore-errors (load *))
+ (assert (null value0))
+ (format t "VALUE1=~S (~A)~%" value1 value1)
+ (assert (typep value1 'error)))
+ (sb-ext:quit :unix-status 52)
EOF
if [ $? != 52 ]; then
- echo compile-and-load $1 test failed: $?
- exit 1
+ echo compile-and-load $1 test failed: $?
+ exit 1
fi
# Test loading into the interpreter.
$SBCL <<EOF
- (multiple-value-bind (value0 value1) (ignore-errors (load "$1"))
- (assert (null value0))
- (format t "VALUE1=~S (~A)~%" value1 value1)
- (assert (typep value1 'error)))
- (sb-ext:quit :unix-status 52)
+ (multiple-value-bind (value0 value1) (ignore-errors (load "$1"))
+ (assert (null value0))
+ (format t "VALUE1=~S (~A)~%" value1 value1)
+ (assert (typep value1 'error)))
+ (sb-ext:quit :unix-status 52)
EOF
if [ $? != 52 ]; then
- echo load-into-interpreter $1 test failed: $?
- exit 1
+ echo load-into-interpreter $1 test failed: $?
+ exit 1
fi
}
# Test that a file compiles cleanly, with no ERRORs, WARNINGs or
# STYLE-WARNINGs.
-expect_clean_compile ()
+expect_clean_compile ()
{
$SBCL <<EOF
(multiple-value-bind (pathname warnings-p failure-p)
(compile-file "$1"))
EOF
if [ $? != 52 ]; then
- echo expect-compiler-note $1 test failed: $?
- exit 1
+ echo expect-compiler-note $1 test failed: $?
+ exit 1
fi
}
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
(defun absolutify (pathname)
"Convert a possibly-relative pathname to absolute."
(merge-pathnames pathname
- (make-pathname :directory
- (pathname-directory
- *default-pathname-defaults*))))
+ (make-pathname :directory
+ (pathname-directory
+ *default-pathname-defaults*))))
(defun sorted-truenamestrings (pathname-designators)
"Convert a collection of pathname designators into canonical form
using TRUENAME, NAMESTRING, and SORT."
(sort (mapcar #'namestring
- (mapcar #'truename
- pathname-designators))
- #'string<))
+ (mapcar #'truename
+ pathname-designators))
+ #'string<))
(defun need-match-1 (directory-pathname result-sorted-truenamestrings)
"guts of NEED-MATCH"
(let ((directory-sorted-truenamestrings (sorted-truenamestrings
- (directory directory-pathname))))
+ (directory directory-pathname))))
(unless (equal directory-sorted-truenamestrings
- result-sorted-truenamestrings)
+ result-sorted-truenamestrings)
(format t "~&~@<DIRECTORY argument = ~_~2I~S~:>~%"
- directory-pathname)
+ directory-pathname)
(format t "~&~@<DIRECTORY result = ~_~2I~S~:>~%"
- directory-sorted-truenamestrings)
+ directory-sorted-truenamestrings)
(format t "~&~@<expected result = ~_~2I~S.~:>~%"
- result-sorted-truenamestrings)
+ result-sorted-truenamestrings)
(error "mismatch between DIRECTORY and expected result"))))
(defun need-match (directory-pathname result-pathnames)
"Require that (DIRECTORY DIRECTORY-PATHNAME) return RESULT-PATHNAMES
(need-match "./animal" '("animal/"))
(need-match "animal/*.*" '("animal/invertebrate/" "animal/vertebrate/"))
(need-match "animal/*/*.*"
- '("animal/vertebrate/bird/"
- "animal/vertebrate/mammal/"
- "animal/vertebrate/snake/"))
+ '("animal/vertebrate/bird/"
+ "animal/vertebrate/mammal/"
+ "animal/vertebrate/snake/"))
(need-match "plant/*.*" '("plant/kingsfoil" "plant/pipeweed"))
(need-match "plant/**/*.*" '("plant/kingsfoil" "plant/pipeweed"))
(need-match "plant/**/**/*.*" '("plant/kingsfoil" "plant/pipeweed"))
(let ((vertebrates (mapcar (lambda (stem)
- (concatenate 'string
- "animal/vertebrate/"
- stem))
- '("bird/"
- "mammal/"
- "mammal/bear/" "mammal/bear/grizzly"
- "mammal/mythical/" "mammal/mythical/mermaid"
- "mammal/mythical/unicorn"
- "mammal/platypus"
- "mammal/rodent/" "mammal/rodent/beaver"
- "mammal/rodent/mouse" "mammal/rodent/rabbit"
- "mammal/rodent/rat"
- "mammal/ruminant/" "mammal/ruminant/cow"
- "mammal/walrus"
- "snake/" "snake/python"))))
+ (concatenate 'string
+ "animal/vertebrate/"
+ stem))
+ '("bird/"
+ "mammal/"
+ "mammal/bear/" "mammal/bear/grizzly"
+ "mammal/mythical/" "mammal/mythical/mermaid"
+ "mammal/mythical/unicorn"
+ "mammal/platypus"
+ "mammal/rodent/" "mammal/rodent/beaver"
+ "mammal/rodent/mouse" "mammal/rodent/rabbit"
+ "mammal/rodent/rat"
+ "mammal/ruminant/" "mammal/ruminant/cow"
+ "mammal/walrus"
+ "snake/" "snake/python"))))
(need-match "animal/vertebrate/**/*.*" vertebrates)
(need-match "animal/vertebrate/mammal/../**/*.*" vertebrates)
(need-match "animal/vertebrate/mammal/../**/**/*.*" vertebrates)
#+nil
(need-match "animal/vertebrate/mammal/mythical/../**/../**/*.*"
- vertebrates))
+ vertebrates))
(need-match "animal/vertebrate/**/robot.*" nil)
(need-match "animal/vertebrate/mammal/../**/*.robot" nil)
(need-match "animal/vertebrate/mammal/../**/robot/*.*" nil)
(let ((junk (mapcar (lambda (_)
(declare (ignore _))
(let ((x (gensym)))
- (finalize x (lambda ()
- ;; cons in finalizer
+ (finalize x (lambda ()
+ ;; cons in finalizer
(setf *tmp* (make-list 10000))
- (incf *count*)))
- x))
- (make-list 10000))))
+ (incf *count*)))
+ x))
+ (make-list 10000))))
(setf junk (foo junk))
(foo junk))
echo "Waiting for SBCL to finish stress-testing finalizers"
while true; do
if [ -f finalize-test-passed ]; then
- echo "OK"
- rm finalize-test-passed
- exit 104 # Success
+ echo "OK"
+ rm finalize-test-passed
+ exit 104 # Success
elif [ -f finalize-test-failed ]; then
- echo "Failed"
- rm finalize-test-failed
- exit 1 # Failure
+ echo "Failed"
+ rm finalize-test-failed
+ exit 1 # Failure
fi
sleep 1
WAITED=$(($WAITED+1))
if (($WAITED>60)); then
- echo
- echo "timeout, killing SBCL"
- kill -9 $SBCL_PID
- exit 1 # Failure, SBCL probably hanging in GC
+ echo
+ echo "timeout, killing SBCL"
+ kill -9 $SBCL_PID
+ exit 1 # Failure, SBCL probably hanging in GC
fi
done
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
${SBCL:-sbcl} <<EOF
;; test that $PATH is searched
- (assert (zerop (sb-ext:process-exit-code
- (sb-ext:run-program "true" () :search t :wait t))))
- (assert (not (zerop (sb-ext:process-exit-code
- (sb-ext:run-program "false" () :search t :wait t)))))
+ (assert (zerop (sb-ext:process-exit-code
+ (sb-ext:run-program "true" () :search t :wait t))))
+ (assert (not (zerop (sb-ext:process-exit-code
+ (sb-ext:run-program "false" () :search t :wait t)))))
(let ((string (with-output-to-string (stream)
(sb-ext:run-program "/bin/echo"
'("foo" "bar")
;; (instead of CMU CL alist-of-keywords convention).
(let ((string (with-output-to-string (stream)
(sb-ext:run-program "/usr/bin/env" ()
- :output stream
- :environment '("FEEFIE=foefum")))))
+ :output stream
+ :environment '("FEEFIE=foefum")))))
(assert (string= string "FEEFIE=foefum
")))
;; The default Unix environment for the subprocess is the same as
;; other programs, but not like CMU CL.)
(let ((string (with-output-to-string (stream)
(sb-ext:run-program "/usr/bin/env" ()
- :output stream)))
- (expected (apply #'concatenate
- 'string
- (mapcar (lambda (environ-string)
- (concatenate 'string
- environ-string
- (string #\newline)))
+ :output stream)))
+ (expected (apply #'concatenate
+ 'string
+ (mapcar (lambda (environ-string)
+ (concatenate 'string
+ environ-string
+ (string #\newline)))
(sb-ext:posix-environ)))))
(assert (string= string expected)))
;; That's not just because POSIX-ENVIRON is having a bad hair
# --break-on-failure Break into the debugger when a test fails
# unexpectedly
# --break-on-expected-failure Break into the debugger when any test fails
-#
+#
# If no test files are specified, runs all tests.
# This software is part of the SBCL system. See the README file for
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
# While most of SBCL is derived from the CMU CL system, the test
# files (like this one) were written from scratch after the fork
# from CMU CL.
-#
+#
# This software is in the public domain and is provided with
# absolutely no warranty. See the COPYING and CREDITS files for
# more information.
$GNUMAKE $bin -I ../src/runtime > /dev/null 2>&1 && ./$bin > /dev/null 2>&1
if [ "$?" = 104 ]
then
- printf " :$1"
+ printf " :$1"
fi
rm -f $bin
}
#include <stdio.h>
#include <sys/types.h>
-#include <sys/times.h>
+#ifdef _WIN32
+ #include <stdlib.h>
+#else
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/ioctl.h>
+ #include <sys/termios.h>
+ #ifdef __APPLE_CC__
+ #include "../src/runtime/ppc-darwin-dlshim.h"
+ #include "../src/runtime/ppc-darwin-langinfo.h"
+ #else
+ #include <dlfcn.h>
+ #include <langinfo.h>
+ #endif
+#endif
+
#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <sys/termios.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
-#ifdef __APPLE_CC__
- #include "../src/runtime/ppc-darwin-dlshim.h"
- #include "../src/runtime/ppc-darwin-langinfo.h"
-#else
- #include <dlfcn.h>
- #include <langinfo.h>
-#endif
#include "genesis/config.h"
;;;; See the program \"grovel-headers.c\".\n\
\n\
");
-
+#ifdef _WIN32
+ printf (";;; This file is presently unused for the Windows version of sbcl.\n");
+#else
printf("(in-package \"SB!ALIEN\")\n\n");
printf (";;;flags for dlopen()\n");
defsignal("sigxcpu", SIGXCPU);
defsignal("sigxfsz", SIGXFSZ);
#endif
+#endif // _WIN32
return 0;
}
TMP=sparc-funcdef.S
-SUN_FUNCDEF="#define FUNCDEF(x) .type x, #function"
-GNU_FUNCDEF="#define FUNCDEF(x) .type x,@function"
+SUN_FUNCDEF="#define FUNCDEF(x) .type x, #function"
+GNU_FUNCDEF="#define FUNCDEF(x) .type x,@function"
echo $SUN_FUNCDEF > $TMP
# cribbed from ldso_stubs, just "some code"
echo "
-.globl ldso_stub__printf ;
- FUNCDEF(ldso_stub__printf) ;
-ldso_stub__printf: ;
- sethi %hi(printf),%g1 ;
- jmpl %g1+%lo(printf),%g0 ;
- nop /* delay slot*/ ;
-.Lprintfe1: ;
- .size ldso_stub__printf,.Lprintfe1-ldso_stub__printf ;" >> $TMP
+.globl ldso_stub__printf ;
+ FUNCDEF(ldso_stub__printf) ;
+ldso_stub__printf: ;
+ sethi %hi(printf),%g1 ;
+ jmpl %g1+%lo(printf),%g0 ;
+ nop /* delay slot*/ ;
+.Lprintfe1: ;
+ .size ldso_stub__printf,.Lprintfe1-ldso_stub__printf ;" >> $TMP
if $GNUMAKE sparc-funcdef.o > /dev/null 2>&1 ; then
- echo $SUN_FUNCDEF
+ echo $SUN_FUNCDEF
else
echo $GNU_FUNCDEF
fi
# conservative syntax used in SBCL sources)
source_extensions='.lisp .lisp-expr .c .h'
# other candidates:
-# .sh
+# .sh: if ./make.sh is altered, Bad Things happen
# ?
for source_extension in $source_extensions; do
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.8.26"
+"0.9.8.27"