Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cmucl/cmucl
  • pfominykh/cmucl
  • yitzchak/cmucl
  • rkreuter/cmucl
  • cshapiro/cmucl
5 results
Show changes
Commits on Source (987)
Showing
with 836 additions and 259 deletions
((nil
(indent-tabs-mode . t)
(require-final-newline . t)
(tab-width . 8))
(c-mode
(c-basic-offset . 4)))
# http://editorconfig.org
root = true
[*]
indent_style = tab
insert_final_newline = true
tab_width = 8
[*.{c,h}]
indent_size = 4
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2021/07"
version: "2021-07-x86"
bootstrap: "-B boot-2021-07-1 -B boot-2021-07-2"
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2024/08"
version: "2024-08-x86"
bootstrap: "-B boot-2024-08"
stages:
- install
......@@ -9,6 +10,7 @@ stages:
- test
- ansi-test
- benchmark
- analyze
cache:
......@@ -35,7 +37,8 @@ linux:build:
- dist/
- linux-2/*.log
- linux-3/*.log
- linux-4/*.log
- linux-4/
- src/lisp/
needs:
- job: linux:install
artifacts: true
......@@ -44,10 +47,43 @@ linux:build:
#- bin/create-target.sh xtarget x86_linux_clang
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot
- bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot. The
# analyzer job requires gcc, so make sure we build with gcc here
# instead of clang.
- bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# When the result of `git describe` cannot be used as a version
# string, an alternative can be provided with the -V flag
- bin/make-dist.sh -I dist linux-4
linux:cross-build:
stage: build
tags:
- linux
artifacts:
paths:
- xdist/
- linux-2/*.log
- linux-3/*.log
- linux-4/*.log
# The lisp directory is needed for the static analyzer job.
- linux-4/lisp
needs:
# Normally need the linux:install stage to get the compiler to
# use. But for #337, we need the normal build from linux:build to
# do the cross-compile. Once the snapshot is made, we can use
# linux:install instead.
- job: linux:build
#- job: linux:install
artifacts: true
script:
- bin/create-target.sh xtarget
- bin/create-target.sh xcross
- bin/cross-build-world.sh -crl xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp dist/bin/lisp
- bin/build.sh -b xlinux $bootstrap -R -C "" -o "xtarget/lisp/lisp -lib xtarget/lisp"
- bin/make-dist.sh -I xdist xlinux-4
linux:test:
stage: test
tags:
......@@ -61,7 +97,34 @@ linux:test:
- job: linux:build
artifacts: true
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
linux:exec-test:
stage: test
tags:
- linux
needs:
- job: linux:build
artifacts: true
script:
# Create an executable and test it by printing the version.
- dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
- ./saved-lisp-executable --version
linux:cross-test:
stage: test
tags:
- linux
artifacts:
paths:
- ansi-test/test.out
- cross-test.log
needs:
# Needs artifacts from build (dist/)
- job: linux:cross-build
artifacts: true
script:
- bin/run-unit-tests.sh -l xdist/bin/lisp 2>&1 | tee cross-test.log
linux:ansi-test:
stage: ansi-test
......@@ -74,14 +137,8 @@ linux:ansi-test:
# Needs artifacts from build (dist/)
- job: linux:build
artifacts: true
before_script:
- git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git
- (cd ansi-test; git checkout rtoy-cmucl-expected-failures)
script:
- cd ansi-test
- make LISP="../dist/bin/lisp -batch -noinit -nositeinit"
# There should be no unexpected successes or failures; check these separately.
- grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out
- bin/run-ansi-tests.sh -l dist/bin/lisp
linux:benchmark:
stage: benchmark
......@@ -105,11 +162,14 @@ linux:benchmark:
osx:install:
stage: install
tags:
- osx
- macos-virtualbox
artifacts:
paths:
- snapshot/
script:
- echo PATH = $PATH
- ls -F /usr/local/bin
- type -all gitlab-runner
- /opt/local/bin/curl -o cmucl-$version-darwin.tar.bz2 $download_url/cmucl-$version-darwin.tar.bz2
- mkdir snapshot
- (cd snapshot; tar xjf ../cmucl-$version-darwin.tar.bz2)
......@@ -117,7 +177,7 @@ osx:install:
osx:build:
stage: build
tags:
- osx
- macos-virtualbox
artifacts:
paths:
- dist/
......@@ -132,28 +192,45 @@ osx:build:
#- bin/create-target.sh xtarget x86_darwin
#- bin/create-target.sh xcross x86_darwin
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot
- bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot.
# Need /opt/local/bin to get msgmerge and msgfmt programs.
- PATH=/opt/local/bin:$PATH bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
# If needed use -V to specify the version in case some tag makes git
# describe return something that make-dist.sh doesn't like.
- bin/make-dist.sh -I dist darwin-4
osx:test:
stage: test
tags:
- osx
- macos-virtualbox
artifacts:
paths:
- ansi-test/test.out
- test.log
needs:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
- echo LANG = $LANG
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
osx:exec-test:
stage: test
tags:
- macos-virtualbox
needs:
- job: osx:build
artifacts: true
script:
# Create an executable and test it by printing the version.
- dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
- ./saved-lisp-executable --version
osx:ansi-test:
stage: ansi-test
tags:
- osx
- macos-virtualbox
artifacts:
paths:
- ansi-test/test.out
......@@ -161,19 +238,16 @@ osx:ansi-test:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
before_script:
- /opt/local/bin/git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git
- (cd ansi-test; /opt/local/bin/git checkout rtoy-cmucl-expected-failures)
script:
- cd ansi-test
- make LISP="../dist/bin/lisp -batch -noinit -nositeinit"
# There should be no unexpected successes or failures; check these separately.
- grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out
# NB: sometimes we can't clone the ansi-test repo (bad cert!?!).
# Manually cloning it in the gitlab build dir helps with this
# issue until we can figure out what's going on.
- bin/run-ansi-tests.sh -l dist/bin/lisp
osx:benchmark:
stage: benchmark
tags:
- osx
- macos-virtualbox
artifacts:
paths:
- benchmarks/cl-bench/results
......@@ -188,3 +262,94 @@ osx:benchmark:
- CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
- CMUCL=../../dist/bin/lisp ./run-cmucl.sh
- ../../snapshot/bin/lisp -load report
# Optional job that runs the static analyzer. It needs the files from
# the linux-4 directory built in the linux:build job.
linux:static-analyzer:
stage: analyze
when: manual
tags:
- linux
artifacts:
paths:
- analyzer.log
needs:
- job: linux:build
artifacts: true
script:
# Analysis can generate huge amounts of output. For now just save
# the results to the log file instead of also having it go to the
# console. If someday there's less or no output, we can consider
# having the logs go to the console too.
- make -C linux-4/lisp clean
- make -C linux-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1
opensuse:install:
stage: install
tags:
- opensuse
artifacts:
paths:
- snapshot/
script:
- wget -nv $download_url/cmucl-$version-linux.tar.bz2
- wget -nv $download_url/cmucl-$version-linux.extra.tar.bz2
- mkdir snapshot
- (cd snapshot; tar xjf ../cmucl-$version-linux.tar.bz2; tar xjf ../cmucl-$version-linux.extra.tar.bz2)
opensuse:build:
stage: build
tags:
- opensuse
artifacts:
paths:
- dist/
- linux-2/*.log
- linux-3/*.log
- linux-4/
needs:
- job: opensuse:install
artifacts: true
script:
# Do cross compile first
#- bin/create-target.sh xtarget x86_linux_clang
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot. The
# analyzer job requires gcc, so make sure we build with gcc here
# instead of clang.
- bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
# If needed use -V to specify the version in case some tag makes git
# describe return something that make-dist.sh doesn't like.
- bin/make-dist.sh -I dist linux-4
opensuse:test:
stage: test
tags:
- linux
artifacts:
paths:
- ansi-test/test.out
- test.log
needs:
# Needs artifacts from build (dist/)
- job: opensuse:build
artifacts: true
script:
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
opensuse:ansi-test:
stage: ansi-test
tags:
- linux
artifacts:
paths:
- ansi-test/test.out
needs:
# Needs artifacts from build (dist/)
- job: opensuse:build
artifacts: true
script:
- bin/run-ansi-tests.sh -l dist/bin/lisp
......@@ -16,7 +16,7 @@ If applicable, add screenshots to help explain your problem.
## Desktop (please complete the following information):
- OS: [e.g. Linux]
- Version: [e.g. 21c]
- Version: [e.g. 21e]
## Additional context
Add any other context about the problem here.
......
;;; math.lisp -- various numerical operations
;;
;; Time-stamp: <2004-01-05 emarsden>
;; Time-stamp: <2023-08-12 07:34:28 toy>
;;
;; some basic mathematical benchmarks
......@@ -56,7 +56,7 @@
;; calculate the "level" of a point in the Mandebrot Set, which is the
;; number of iterations taken to escape to "infinity" (points that
;; don't escape are included in the Mandelbrot Set). This version is
;; intended to test performance when programming in nave math-style.
;; intended to test performance when programming in naive math-style.
(defun mset-level/complex (c)
(declare (type complex c))
(loop :for z = #c(0 0) :then (+ (* z z) c)
......
......@@ -16,7 +16,7 @@ TARGET="`echo $1 | sed 's:/*$::'`"
shift
$TARGET/lisp/lisp \
-noinit -nositeinit -batch "$@" <<EOF || exit 3
-lib $TARGET/lisp -noinit -nositeinit -batch "$@" <<EOF || exit 3
(in-package :cl-user)
(setf lisp::*enable-package-locked-errors* nil)
......
......@@ -39,7 +39,7 @@ ENABLE2="yes"
ENABLE3="yes"
ENABLE4="yes"
version=21d
version=21e
SRCDIR=src
BINDIR=bin
TOOLDIR=$BINDIR
......@@ -110,6 +110,15 @@ case `uname -s` in
esac ;;
esac
# Set default version and generate lisp/cmucl-version.h
DEFAULT_VERSION="`bin/git-version.sh`"
export DEFAULT_VERISON
echo DEFAULT_VERSION = $DEFAULT_VERSION
bin/git-version.sh -f > src/lisp/cmucl-version.h
export LANG=en_US.UTF-8
buildit ()
{
if echo $INTERACTIVE_BUILD | grep $BUILD > /dev/null; then
......@@ -130,21 +139,20 @@ buildit ()
time $BUILDWORLD $TARGET $OLDLISP $BOOT || { echo "Failed: $BUILDWORLD"; exit 1; }
if [ "$REBUILD_LISP" = "yes" ]; then
$TOOLDIR/rebuild-lisp.sh $TARGET
else
# Set the LANG to C. For whatever reason, if I (rtoy) don't
# do this on my openSuSE system, any messages from gcc are
# basically garbled. This should be harmless on other
# systems.
LANG=C $MAKE -C $TARGET/lisp $MAKE_TARGET || { echo "Failed: $MAKE -C $TARGET/lisp"; exit 1; }
fi
fi
# Set the LANG to C. For whatever reason, if I (rtoy) don't do this on my openSuSE system,
# any messages from gcc are basically garbled. This should be harmless on other systems.
LANG=C $MAKE -C $TARGET/lisp $MAKE_TARGET || { echo "Failed: $MAKE -C $TARGET/lisp"; exit 1; }
if [ "$BUILD_WORLD2" = "yes" ];
then
$BUILDWORLD $TARGET $OLDLISP $BOOT || { echo "Failed: $BUILDWORLD"; exit 1; }
fi
$TOOLDIR/load-world.sh $TARGET "$VERSION" || { echo "Failed: $TOOLDIR/load-world.sh"; exit 1; }
$TOOLDIR/load-world.sh $TARGET || { echo "Failed: $TOOLDIR/load-world.sh"; exit 1; }
$TARGET/lisp/lisp -lib $TARGET/lisp -batch -noinit -nositeinit < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit"; exit 1; }
$TARGET/lisp/lisp -batch -noinit -nositeinit < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit"; exit 1; }
return 0;
fi
}
......@@ -221,7 +229,7 @@ buildit
bootfiles=
TARGET=$BASE-3
OLDLISP="${BASE}-2/lisp/lisp $OLDLISPFLAGS"
OLDLISP="${BASE}-2/lisp/lisp -lib ${BASE}-2/lisp $OLDLISPFLAGS"
ENABLE=$ENABLE3
BUILD=2
......@@ -232,7 +240,7 @@ buildit
TARGET=$BASE-4
CLEAN_FLAGS="-K all"
OLDLISP="${BASE}-3/lisp/lisp $OLDLISPFLAGS"
OLDLISP="${BASE}-3/lisp/lisp -lib ${BASE}-3/lisp $OLDLISPFLAGS"
ENABLE=$ENABLE4
if [ "${BUILD_POT}" = "yes" ]; then
......@@ -250,7 +258,7 @@ buildit
# Asdf and friends are part of the base install, so we need to build
# them now.
$TARGET/lisp/lisp -noinit -nositeinit -batch << EOF || exit 3
$TARGET/lisp/lisp -lib $TARGET/lisp -noinit -nositeinit -batch << EOF || exit 3
(in-package :cl-user)
(setf (ext:search-list "target:")
'("$TARGET/" "src/"))
......@@ -270,7 +278,7 @@ EOF
if [ "$SKIPUTILS" = "no" ];
then
OLDLISP="${BASE}-4/lisp/lisp $OLDLISPFLAGS"
OLDLISP="${BASE}-4/lisp/lisp -lib ${BASE}-4/lisp $OLDLISPFLAGS"
time $TOOLDIR/build-utils.sh $TARGET
fi
......
......@@ -48,24 +48,27 @@ CORE='-o -name "*.core"'
if [ -n "$KEEP" ]; then
case $KEEP in
lib) GREP='egrep -v'
lib) GREP='grep -Ev'
PATTERN='(gray-streams|gray-compat|simple-streams|iodefs|external-formats|clx|hemlock|clm)-library' ;;
core) CORE='' ;;
all) GREP='egrep -v'
all) GREP='grep -Ev'
PATTERN='(gray-streams|gray-compat|simple-streams|iodefs|external-formats|clx|hemlock|clm)-library|(asdf|defsystem)'
CORE='' ;;
esac
fi
find $TARGET -name "*.bytef" -o -name "*.lbytef" -o -name "*.assem" -o \
-name "*.axpf" -o \
-name "*.hpf" -o \
-name "*.pmaxf" -o \
-name "*.sgif" -o \
-name "*.ppcf" -o \
-name "*.sparcf" -o \
-name "*.x86f" -o \
-name "*.sse2f" $CORE | $GREP $PATTERN | xargs rm 2> /dev/null
find $TARGET -name "*.bytef" -o -name "*.lbytef" -o -name "*.assem" \
-o -name "*.armf" \
-o -name "*.axpf" \
-o -name "*.hpf" \
-o -name "*.ppcf" \
-o -name "*.pmaxf" \
-o -name "*.sgif" \
-o -name "*.sparcf" \
-o -name "*.sse2f" \
-o -name "*.x86f" \
$CORE |
$GREP $PATTERN | xargs rm 2> /dev/null
for d in $TARGET
do
......
......@@ -83,7 +83,7 @@ case $uname_s in
hp700*) motif_variant=hpux_cc ;;
pmax_mach) motif_variant=pmax_mach ;;
sgi*) motif_variant=irix ;;
x86_linux*|linux*) motif_variant=x86 ;;
*linux*) motif_variant=linux ;;
esac
}
[ -f src/motif/server/Config.$motif_variant ] || quit "No such motif-variant could be found: Config.$motif_variant"
......
......@@ -3,20 +3,23 @@
usage() {
echo "cross-build-world.sh [-crlX] [-B file] [-G Gnumake] target-dir cross-dir cross-compiler-script [build-binary [flags]]"
echo " -c Clean target and cross directories before compiling"
echo " -i Enable interactive mode (output to screen instead of log file)."
echo " -r Recompile lisp runtime"
echo " -l Load cross-compiled kernel to make a new lisp kernel"
echo " -B file Use this as the cross bootstrap file."
echo " -G make Specifies the name of GNU make"
echo " -X (break) before quitting the cross compilation (for debugging)"
echo " -X Execute (break) before quitting the cross-build"
}
MAKE=make
INTERACTIVE=nil
BREAK=""
while getopts "crlXB:G:" arg
while getopts "cirlXB:G:" arg
do
case $arg in
c) CLEAN_DIR=yes ;;
i) INTERACTIVE=t ;;
r) BUILD_RUNTIME=yes ;;
l) LOAD_KERNEL=yes ;;
B) BOOTSTRAP=$OPTARG ;;
......@@ -98,7 +101,7 @@ $LISP "$@" -noinit -nositeinit <<EOF
(load "target:tools/setup" :if-source-newer :load-source)
(comf "target:tools/setup" :load t)
(setq *gc-verbose* nil *interactive* nil)
(setq *gc-verbose* nil *interactive* $INTERACTIVE)
(load "$SCRIPT")
......@@ -117,6 +120,9 @@ $LISP "$@" -noinit -nositeinit <<EOF
(pushnew :no-clm *features*)
(pushnew :no-hemlock *features*)
;; At this point we can stop and play around with the compiler to various bits.
;; EOF
(load "target:tools/worldcom")
#-(or no-compiler runtime) (load "target:tools/comcom")
;; Compile at least new-genesis, so that genesis doesn't take ages
......@@ -132,10 +138,11 @@ EOF
if [ "$BUILD_RUNTIME" = "yes" ]; then
echo Building runtime
bin/git-version.sh -f > src/lisp/cmucl-version.h
(cd $TARGET/lisp; ${MAKE})
fi
if [ "$LOAD_KERNEL" = "yes" ]; then
echo Load kernel.core
bin/load-world.sh -p $TARGET cross-compiled
bin/load-world.sh -p $TARGET
fi
#!/bin/sh
# If FILE=yes, print out the version as a C file #define. Otherwise,
# just print the version to stdout and exit.
FILE=""
while getopts "f" arg; do
case $arg in
f) FILE=yes
;;
esac
done
# Script to determine the cmucl version based on git describe
GIT_HASH="`(git describe --dirty 2>/dev/null || git describe 2>/dev/null)`"
if [ `expr "X$GIT_HASH" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]'` != 0 ]; then
# The git hash looks like snapshot-yyyy-mm-<stuff>. Remove the
# "snapshot-" part.
DEFAULT_VERSION=`expr "$GIT_HASH" : "snapshot-\(.*\)"`
elif [ `expr "X$GIT_HASH" : 'X[0-9][0-9][a-f]'` != 0 ]; then
# The git hash looks like a release which is 3 hex digits. Use it as is.
DEFAULT_VERSION="${GIT_HASH}"
fi
if [ -z "$FILE" ]; then
echo $DEFAULT_VERSION
else
cat <<EOF
/*
* Cmucl version
*
* DO NOT EDIT! This file is auto-generated via bin/git-version.sh.
*/
#define CMUCL_VERSION "$DEFAULT_VERSION"
EOF
fi
......@@ -2,30 +2,14 @@
usage()
{
echo "load-world.sh [-?p] target-directory [version-string]"
echo "load-world.sh [-?p] target-directory"
echo " -p Skip loading of PCL (Mostly for cross-compiling)"
echo " -? This help"
echo " If the version-string is not given, the current date and time is used"
exit 1
}
SKIP_PCL=
NO_PCL_FEATURE=
# Default version is the date with the git hash. Older versions of
# git don't support --dirty, but the output in that case is what we
# want (except for ending with "dirty"), so we're set.
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null || git describe 2>/dev/null)`"
# If the git hash looks like a snapshot tag or release, don't add the date.
VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"
if expr "X${GIT_HASH}" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]' > /dev/null; then
VERSION="${GIT_HASH}"
fi
if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then
VERSION="${GIT_HASH}"
fi
echo $VERSION
while getopts "p" arg
do
......
......@@ -12,10 +12,10 @@
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/make-dist.sh,v 1.20 2011/04/11 16:34:49 rtoy Exp $
usage() {
echo "make-dist.sh: [-hbg] [-G group] [-O owner] [-I destdir] [-M mandir] [-A arch] [-V version] [-o OS] dir"
echo "make-dist.sh: [-h] [-C compress] [-G group] [-O owner] [-I destdir] [-M mandir] [-A arch] [-V version] [-o OS] dir"
echo " -h This help"
echo " -b Use bzip2 compression"
echo " -g Use gzip compression"
echo " -C compress Compression method to use for the tar archives. Must be one of"
echo " bzip2, xz, or gzip. The default depends on the OS"
echo " -G group Group to use"
echo " -O owner Owner to use"
echo " -I destdir Install directly to given directory instead of creating a tarball"
......@@ -59,7 +59,8 @@ def_arch_os () {
sun*)
ARCH=sparc ;;
i*)
ARCH=x86 ;;
ARCH=x86
GTAR=gtar ;;
esac
uname_r=`uname -r`
case $uname_r in
......@@ -93,28 +94,20 @@ def_arch_os () {
# Figure out the architecture and OS in case options aren't given
def_arch_os
# Choose a version based on the git hash as the default version. We
# only compute a default if the git hash looks like a snapshot
# ("snapshot-yyyy-mm") or a release number..
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`"
if expr "X${GIT_HASH}" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]' > /dev/null; then
DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"`
fi
# Default compression is -J (xz). These variables are passed to the
# other scripts via the environmen, so export them.
COMPRESS=-J
COMPRESS_EXT=xz
COMPRESS_NAME=xz
if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then
DEFAULT_VERSION="${GIT_HASH}"
fi
while getopts "G:O:I:M:bghSA:o:V:?" arg
while getopts "C:G:O:I:M:hSA:o:V:?" arg
do
case $arg in
C) COMPRESS_ARG=$OPTARG ;;
G) GROUP=$OPTARG ;;
O) OWNER=$OPTARG ;;
I) INSTALL_DIR=$OPTARG ;;
M) MANDIR=$OPTARG ;;
b) ENABLE_BZIP=-b ;;
g) ENABLE_GZIP=-g ;;
S) MAKE_SRC_DIST=yes ;;
A) ARCH=$OPTARG ;;
o) OS=$OPTARG ;;
......@@ -130,15 +123,25 @@ if [ $# -lt 1 ]; then
usage
fi
if [ -z "$VERSION" ]; then
# If a default version exists, use it. Otherwise this is an
# error---at least one of these must not be empty.
if [ -z "${DEFAULT_VERSION}" ]; then
echo "Version (-V) must be specified because default version cannot be determined."
usage
else
VERSION=${DEFAULT_VERSION}
fi
# Verify that the -C option is valid
if [ -n "$COMPRESS_ARG" ]; then
case $COMPRESS_ARG in
bzip2)
COMPRESS=-j
COMPRESS_EXT=bz2
COMPRESS_NAME=bzip2
;;
xz) # Defaults work
;;
gzip)
COMPRESS=-z
COMPRESS_EXT=gz
COMPRESS_NAME=gzip
;;
*) echo '-C option "'$COMPRESS_ARG'" must be one of bzip2, xz or gzip'
exit 1
;;
esac
fi
if [ ! -d "$1" ]
......@@ -161,28 +164,38 @@ fi
TARGET="`echo $1 | sed 's:/*$::'`"
if [ -n "$INSTALL_DIR" ]; then
VERSION="today"
# Choose a version based on the git hash as the default version. We
# only compute a default if the git hash looks like a snapshot
# ("snapshot-yyyy-mm") or a release number..
DEFAULT_VERSION="`$TARGET/lisp/lisp --version`"
if [ -z "$VERSION" ]; then
# If a default version exists, use it. Otherwise this is an
# error---at least one of these must not be empty.
if [ -z "${DEFAULT_VERSION}" ]; then
echo "Version (-V) must be specified because default version cannot be determined."
usage
else
VERSION=${DEFAULT_VERSION}
fi
fi
echo INSTALL_DIR = $INSTALL_DIR
echo cmucl-$VERSION-$ARCH-$OS
ROOT=`dirname $0`
# If no compression options given, default to bzip
if [ -z "$ENABLE_GZIP" -a -z "$ENABLE_BZIP" ]; then
ENABLE_BZIP="-b"
fi
OPTIONS="${GROUP:+ -G ${GROUP}} ${OWNER:+ -O ${OWNER}} ${INSTALL_DIR:+ -I ${INSTALL_DIR}} $ENABLE_GZIP $ENABLE_BZIP"
GTAR_OPTS="-t ${GTAR:-tar}"
EXTRA_OPTS="${GROUP:+ -G ${GROUP}} ${OWNER:+ -O ${OWNER}}"
INSTALL_OPTS="${INSTALL_DIR:+ -I ${INSTALL_DIR}}"
MANDIR="${MANDIR:+ -M ${MANDIR}}"
OPTIONS="${GTAR_OPTS} ${EXTRA_OPTS} ${INSTALL_OPTS} ${MANDIR}"
set -x
echo Creating distribution for $ARCH $OS
$ROOT/make-main-dist.sh $OPTIONS ${MANDIR} $TARGET $VERSION $ARCH $OS || exit 1
$ROOT/make-extra-dist.sh $OPTIONS $TARGET $VERSION $ARCH $OS || exit 2
$ROOT/make-main-dist.sh -C $COMPRESS -E $COMPRESS_EXT $OPTIONS ${MANDIR} $TARGET $VERSION $ARCH $OS || exit 1
$ROOT/make-extra-dist.sh -C $COMPRESS -E $COMPRESS_EXT $OPTIONS $TARGET $VERSION $ARCH $OS || exit 2
if [ X"$MAKE_SRC_DIST" = "Xyes" ]; then
# If tar is not GNU tar, set the environment variable GTAR to
# point to GNU tar.
OPTIONS="${INSTALL_DIR:+ -I ${INSTALL_DIR}} $ENABLE_GZIP $ENABLE_BZIP"
$ROOT/make-src-dist.sh $OPTIONS -t ${GTAR:-tar} $VERSION
$ROOT/make-src-dist.sh -C $COMPRESS -E $COMPRESS_EXT ${GTAR_OPTS} ${INSTALL_OPTS} $VERSION
fi
#!/bin/sh
while getopts "G:O:I:bgh?" arg
usage() {
cat <<EOF
`basename $0` -C option -E ext [-t tar] [-I destdir] [-G group] [-O owner]
-h This help
-? This help
-t tar Tar program to use
-C option Tar option for compressing the tarball; required.
-E ext Extension to use for the tarball. Must be consistent with
-C option. Required.
-I destdir Install directly to given directory instead of creating a tarball
-G group Group to use
-O owner Owner to use
This is generally called by make-dist.sh and not normally invoked by the user
Create a tarball of the extra components for cmucl. This includes things like
CLX; Hemlock; CLM; contrib library not already included in the main
distribution; locale messages.
EOF
exit 1
}
GTAR=tar
while getopts "C:E:G:O:I:t:h?" arg
do
case $arg in
C) COMPRESS=$OPTARG ;;
E) COMPRESS_EXT=$OPTARG ;;
G) GROUP="-g $OPTARG" ;;
O) OWNER="-o $OPTARG" ;;
I) INSTALL_DIR=$OPTARG ;;
b) ENABLE_BZIP=-b ;;
g) ENABLE_GZIP=-g ;;
t) GTAR=$OPTARG ;;
h | \?) usage; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
# -C and -E options are required
if [ -z "$COMPRESS" ]; then
echo "-C option is required"
exit 2
fi
if [ -z "$COMPRESS_EXT" ]; then
echo "-E option is required"
exit 2
fi
if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
then
echo "Usage: $0 target-directory version arch os"
exit 1
usage
fi
if [ ! -d "$1" ]
......@@ -32,6 +66,8 @@ VERSION=$2
ARCH=$3
OS=$4
CMUCLLIBVER="lib/cmucl/$VERSION"
case $ARCH in
x86*) FASL="sse2f" ;;
sparc*) FASL=sparcf ;;
......@@ -56,92 +92,63 @@ if [ -z "$INSTALL_DIR" ]; then
fi
echo Installing extra components
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/subsystems
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/subsystems
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/contrib
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/contrib
for ext in $FASL
do
install ${GROUP} ${OWNER} -m 0644 $TARGET/clx/clx-library.$ext \
$DESTDIR/lib/cmucl/lib/subsystems/
$DESTDIR/$CMUCLLIBVER/lib/subsystems/
install ${GROUP} ${OWNER} -m 0644 $TARGET/hemlock/hemlock-library.$ext \
$DESTDIR/lib/cmucl/lib/subsystems/
$DESTDIR/$CMUCLLIBVER/lib/subsystems/
install ${GROUP} ${OWNER} -m 0644 $TARGET/interface/clm-library.$ext \
$DESTDIR/lib/cmucl/lib/subsystems/
$DESTDIR/$CMUCLLIBVER/lib/subsystems/
done
# Not sure we really need these, but we'll install them in the
# ext-formats directory. (Should they go somewhere else?)
#install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/ext-formats
#for f in src/i18n/NameAliases.txt src/i18n/UnicodeData.txt
#do
# echo $f
# install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/lib/cmucl/lib/ext-formats/
#done
# install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/fonts/
# install ${GROUP} ${OWNER} -m 0644 misc/8x13u.snf misc/fonts.dir \
# $DESTDIR/lib/cmucl/lib/fonts/
install ${GROUP} ${OWNER} -m 0644 src/hemlock/XKeysymDB \
src/hemlock/hemlock11.cursor src/hemlock/hemlock11.mask \
$TARGET/hemlock/spell-dictionary.bin \
$DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0755 src/hemlock/mh-scan $DESTDIR/lib/cmucl/lib/
$DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0755 src/hemlock/mh-scan $DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0755 $TARGET/motif/server/motifd \
$DESTDIR/lib/cmucl/lib/
$DESTDIR/$CMUCLLIBVER/lib/
# Install the contrib stuff. Create the directories and then copy the files.
for d in `(cd src; find contrib -type d -print | egrep -v "CVS|asdf|defsystem")`
#
# asdf, defsystem and unix are part of the main distribution, so skip
# these directories.
for d in `(cd src; find contrib -type d -print | grep -v "asdf\|defsystem")`
do
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/$d
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/$d
done
for f in `(cd src/contrib; find . -type f -print | egrep -v "CVS|asdf|defsystem|unix")`
for f in `(cd src/contrib; find . -type f -print | grep -v "asdf\|defsystem\|unix")`
do
FILE=`basename $f`
DIR=`dirname $f`
install ${GROUP} ${OWNER} -m 0644 src/contrib/$f $DESTDIR/lib/cmucl/lib/contrib/$DIR
install ${GROUP} ${OWNER} -m 0644 src/contrib/$f $DESTDIR/$CMUCLLIBVER/lib/contrib/$DIR
done
# Install all the locale data.
for d in `(cd src/i18n/; find locale -type d -print | egrep -v CVS)`
for d in `(cd src/i18n/; find locale -type d -print)`
do
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/$d
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/$d
done
# Install mo files.
for f in `(cd $TARGET/i18n; find locale -type f -print | egrep -v 'CVS|~.*~|.*~')`
# Install mo files. Ignore any emacs-style backup files.
for f in `(cd $TARGET/i18n; find locale -type f -print | grep -v '~.*~\|.*~')`
do
FILE=`basename $f`
DIR=`dirname $f`
install ${GROUP} ${OWNER} -m 0644 $TARGET/i18n/$f $DESTDIR/lib/cmucl/lib/$DIR
install ${GROUP} ${OWNER} -m 0644 $TARGET/i18n/$f $DESTDIR/$CMUCLLIBVER/lib/$DIR
done
# Install po files. (Do we really need to distribute the po files?)
#for f in `(cd $TARGET/i18n; find locale -type f -print | egrep -v 'CVS|~.*~|.*~')`
#do
# FILE=`basename $f`
# DIR=`dirname $f`
# install ${GROUP} ${OWNER} -m 0644 $TARGET/i18n/$f $DESTDIR/lib/cmucl/lib/$DIR
#done
if [ -z "$INSTALL_DIR" ]; then
sync ; sleep 1 ; sync ; sleep 1 ; sync
echo Tarring extra components
if [ -n "$ENABLE_GZIP" ]; then
echo " Compressing with gzip"
( cd $DESTDIR >/dev/null ; tar cf - lib ) | \
gzip -c > cmucl-$VERSION-$ARCH-$OS.extra.tar.gz
fi
if [ -n "$ENABLE_BZIP" ]; then
echo " Compressing with bzip"
( cd $DESTDIR >/dev/null ; tar cf - lib ) | \
bzip2 > cmucl-$VERSION-$ARCH-$OS.extra.tar.bz2
fi
$GTAR -C $DESTDIR $COMPRESS -cf cmucl-$VERSION-$ARCH-$OS.extra.tar.$COMPRESS_EXT lib
echo Cleaning $DESTDIR
[ -d $DESTDIR ] && rm -rf $DESTDIR
......
#!/bin/sh
# set -x
while getopts "G:O:I:M:bgh?" arg
usage() {
cat <<EOF
`basename $0` -C option -E ext [-h?] [-t tar][-I destdir] [-G group] [-O owner] [-M mandir]
target-directory version arch os
-h This help
-? This help
-t tar Tar program to use
-C option Tar option for compressing the tarball; required.
-E ext Extension to use for the tarball. Must be consistent with
-C option. Required.
-I destdir Install directly to given directory instead of creating a tarball
-G group Group to use
-O owner Owner to use
-M mandir Install manpages in this subdirectory. Default is man/man1
This is generally called by make-dist.sh and not normally invoked by the user
Create a tarball consisting of the main components needed to distribute
a binary installation of cmucl. This includes the C executable and support
libraries; the subsystems like Gray streams, and simple streams; external
formats; contribs like asdf and defsystem; manpages and READMEs."
EOF
exit 1
}
GTAR=tar
while getopts "C:E:G:O:I:M:t:h?" arg
do
case $arg in
C) COMPRESS=$OPTARG ;;
E) COMPRESS_EXT=$OPTARG ;;
G) GROUP="-g $OPTARG" ;;
O) OWNER="-o $OPTARG" ;;
I) INSTALL_DIR=$OPTARG ;;
M) MANDIR=$OPTARG ;;
b) ENABLE_BZIP=-b ;;
g) ENABLE_GZIP=-g ;;
t) GTAR=$OPTARG ;;
h | \?) usage; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
# -C and -E options are required
if [ -z "$COMPRESS" ]; then
echo "-C option is required"
exit 2
fi
if [ -z "$COMPRESS_EXT" ]; then
echo "-E option is required"
exit 2
fi
if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
then
echo "Usage: $0 target-directory version arch os"
exit 1
usage
fi
if [ ! -d "$1" ]
......@@ -28,14 +64,24 @@ then
exit 2
fi
DESTDIR=${INSTALL_DIR:-release-$$}
DOCDIR=${DOCDIR:-doc/cmucl}
MANDIR=${MANDIR:-man/man1}
TARGET="`echo $1 | sed 's:/*$::'`"
VERSION=$2
ARCH=$3
OS=$4
# Where to install the main library of cmucl files
CMUCLLIBVER="lib/cmucl/$VERSION"
# Where to install everything
DESTDIR=${INSTALL_DIR:-release-$$}
# Where to install docs
DOCDIR=${DOCDIR:-share/cmucl/$VERSION/doc}
# Where to install man pages
MANDIR=${MANDIR:-share/man/man1}
TARGET="`echo $1 | sed 's:/*$::'`"
# Core file to look for.
CORE=lisp.core
case $ARCH in
......@@ -87,52 +133,59 @@ fi
# set -x
echo Installing main components
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/bin
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/subsystems
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/ext-formats
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/subsystems
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/ext-formats
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/${DOCDIR}
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/${MANDIR}
install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/
install ${GROUP} ${OWNER} -m 0755 $TARGET/lisp/lisp $DESTDIR/bin/lisp-$VERSION
# Install symlink for lisp
(cd $DESTDIR/bin; ln -fs lisp-$VERSION lisp)
# Install symlink for man pages
(cd $DESTDIR/${MANDIR}
ln -fs lisp-$VERSION.1 lisp.1
ln -fs cmucl-$VERSION.1 cmucl.1)
if [ "$EXECUTABLE" = "true" ]
then
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/lisp.a $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/exec-init.o $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/exec-final.o $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0755 src/tools/linker.sh $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/lisp.a $DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/exec-init.o $DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/exec-final.o $DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0755 src/tools/linker.sh $DESTDIR/$CMUCLLIBVER/lib/
if [ -f src/tools/$SCRIPT-cmucl-linker-script ]; then
install ${GROUP} ${OWNER} -m 0755 src/tools/$SCRIPT-cmucl-linker-script $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0755 src/tools/$SCRIPT-cmucl-linker-script $DESTDIR/$CMUCLLIBVER/lib/
fi
fi
for corefile in $TARGET/lisp/$CORE
do
install ${GROUP} ${OWNER} -m 0644 $corefile $DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0644 $corefile $DESTDIR/$CMUCLLIBVER/lib/
done
install ${GROUP} ${OWNER} -m 0755 src/tools/load-foreign.csh src/tools/config \
$DESTDIR/lib/cmucl/lib/
$DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0644 src/tools/config.lisp \
$DESTDIR/lib/cmucl/lib/
install ${GROUP} ${OWNER} -m 0644 src/code/generic-site.lisp \
$DESTDIR/lib/cmucl/lib/
$DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0644 src/code/default-site-init.lisp \
$DESTDIR/$CMUCLLIBVER/lib/
install ${GROUP} ${OWNER} -m 0644 $TARGET/lisp/lisp.nm $TARGET/lisp/lisp.map \
$TARGET/lisp/internals.h $TARGET/lisp/internals.inc $DESTDIR/lib/cmucl/
install ${GROUP} ${OWNER} -m 0755 src/tools/sample-wrapper $DESTDIR/lib/cmucl/
$TARGET/lisp/internals.h $TARGET/lisp/internals.inc $DESTDIR/$CMUCLLIBVER/
install ${GROUP} ${OWNER} -m 0755 src/tools/sample-wrapper $DESTDIR/$CMUCLLIBVER/
for f in gray-streams gray-compat simple-streams iodefs
do
install ${GROUP} ${OWNER} -m 0644 $TARGET/pcl/$f-library.$FASL $DESTDIR/lib/cmucl/lib/subsystems/
install ${GROUP} ${OWNER} -m 0644 $TARGET/pcl/$f-library.$FASL $DESTDIR/$CMUCLLIBVER/lib/subsystems/
done
for f in src/pcl/simple-streams/external-formats/*.lisp src/pcl/simple-streams/external-formats/aliases src/i18n/unidata.bin
do
install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/lib/cmucl/lib/ext-formats/
install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/$CMUCLLIBVER/lib/ext-formats/
done
# set -x
# Create the directories for asdf and defsystem
for f in asdf defsystem asdf/doc
do
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/contrib/$f
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/contrib/$f
done
case `uname -s` in
......@@ -140,34 +193,34 @@ case `uname -s` in
*) UCONTRIB="unix" ;;
esac
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/contrib/unix
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/unix/$UCONTRIB.$FASL $DESTDIR/lib/cmucl/lib/contrib/unix
install ${GROUP} ${OWNER} -m 0644 src/contrib/load-unix.lisp $DESTDIR/lib/cmucl/lib/contrib
install ${GROUP} ${OWNER} -m 0644 src/contrib/unix/${UCONTRIB}.lisp $DESTDIR/lib/cmucl/lib/contrib/unix
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/$CMUCLLIBVER/lib/contrib/unix
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/unix/$UCONTRIB.$FASL $DESTDIR/$CMUCLLIBVER/lib/contrib/unix
install ${GROUP} ${OWNER} -m 0644 src/contrib/load-unix.lisp $DESTDIR/$CMUCLLIBVER/lib/contrib
install ${GROUP} ${OWNER} -m 0644 src/contrib/unix/${UCONTRIB}.lisp $DESTDIR/$CMUCLLIBVER/lib/contrib/unix
# Copy the source files for asdf and defsystem
for f in `(cd src; find contrib/asdf contrib/defsystem -type f -print | grep -v CVS)`
do
install ${GROUP} ${OWNER} -m 0644 src/$f $DESTDIR/lib/cmucl/lib/$f
install ${GROUP} ${OWNER} -m 0644 src/$f $DESTDIR/$CMUCLLIBVER/lib/$f
done
# Install the fasl files for asdf and defsystem
for f in asdf defsystem
do
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/$f/$f.$FASL $DESTDIR/lib/cmucl/lib/contrib/$f
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/$f/$f.$FASL $DESTDIR/$CMUCLLIBVER/lib/contrib/$f
done
# Install the docs for asdf
for f in src/contrib/asdf/doc/*
do
base=`basename $f`
install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/lib/cmucl/lib/contrib/asdf/doc/$base
install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/$CMUCLLIBVER/lib/contrib/asdf/doc/$base
done
install ${GROUP} ${OWNER} -m 0644 src/general-info/cmucl.1 \
$DESTDIR/${MANDIR}/
$DESTDIR/${MANDIR}/cmucl-$VERSION.1
install ${GROUP} ${OWNER} -m 0644 src/general-info/lisp.1 \
$DESTDIR/${MANDIR}/
$DESTDIR/${MANDIR}/lisp-$VERSION.1
install ${GROUP} ${OWNER} -m 0644 src/general-info/README $DESTDIR/${DOCDIR}
if [ -f src/general-info/release-$VERSION.txt ]
then
......@@ -178,16 +231,7 @@ fi
if [ -z "$INSTALL_DIR" ]; then
sync ; sleep 1 ; sync ; sleep 1 ; sync
echo Tarring main components
if [ -n "$ENABLE_GZIP" ]; then
echo " Compressing with gzip"
( cd $DESTDIR >/dev/null ; tar cf - . ) | \
gzip -c > cmucl-$VERSION-$ARCH-$OS.tar.gz
fi
if [ -n "$ENABLE_BZIP" ]; then
echo " Compressing with bzip"
( cd $DESTDIR >/dev/null ; tar cf - . ) | \
bzip2 > cmucl-$VERSION-$ARCH-$OS.tar.bz2
fi
$GTAR -C $DESTDIR $COMPRESS -cf cmucl-$VERSION-$ARCH-$OS.tar.$COMPRESS_EXT .
echo Cleaning $DESTDIR
[ -d $DESTDIR ] && rm -rf $DESTDIR
......
#!/bin/sh
usage() {
echo "make-src-dist.sh: [-bgh] [-t gnutar] [-I destdir] version"
echo " -h This help"
echo " -b Use bzip2 compression"
echo " -g Use gzip compression"
echo " -t tar Name/path to GNU tar"
echo " -I destdir Install directly to given directory instead of creating a tarball"
echo ""
echo 'Create a tar ball of the cmucl sources. The tarball is named '
echo 'cmucl-src-$version.tar.bz2 (or gz if using gzip compression)'
cat <<EOF
`basename $0` -C option -E ext [-h?] [-t gnutar] [-I destdir] [version]
-h This help
-? This help
-t tar Name/path to GNU tar
-C option Tar option for compressing the tarball; required.
-E ext Extension to use for the tarball. Must be consistent with
-C option. Required.
-I destdir Install directly to given directory instead of creating a tarball
version The version. Defaults to the current date
This is generally called by make-dist.sh and not normally invoked by the user
Create a tar ball of the cmucl sources."
EOF
exit 1
}
while getopts "bgh?t:I:" arg
GTAR=tar
while getopts "C:E:h?t:I:" arg
do
case $arg in
b) ENABLE_BZIP=-b ;;
g) ENABLE_GZIP=-g ;;
C) COMPRESS=$OPTARG ;;
E) COMPRESS_EXT=$OPTARG ;;
t) GTAR=$OPTARG ;;
I) INSTALL_DIR=$OPTARG ;;
h | \?) usage; exit 1 ;;
......@@ -25,10 +34,15 @@ done
shift `expr $OPTIND - 1`
# If no compression given, default to gzip (on the assumption that
# that is available everywhere.)
if [ -z "$ENABLE_BZIP" -a -z "$ENABLE_GZIP" ]; then
ENABLE_GZIP=-b
# -C and -E options are required
if [ -z "$COMPRESS" ]; then
echo "-C option is required"
exit 2
fi
if [ -z "$COMPRESS_EXT" ]; then
echo "-E option is required"
exit 2
fi
# If no version is given, default to today's date
......@@ -38,21 +52,18 @@ else
VERSION="`date '+%Y-%m-%d-%H:%M:%S'`"
fi
echo Creating source distribution
if [ -n "$ENABLE_GZIP" ]; then
ZIP="gzip -c"
ZIPEXT="gz"
fi
if [ -n "$ENABLE_BZIP" ]; then
ZIP="bzip2"
ZIPEXT="bz2"
fi
DESTDIR=${INSTALL_DIR:-release-$$}
echo Creating source distribution
GTAR_OPTIONS="--exclude=.git --exclude='*.pot.~*~'"
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/share/cmucl/$VERSION/
install ${GROUP} ${OWNER} -m 0755 bin/run-unit-tests.sh $DESTDIR/bin
${GTAR} ${GTAR_OPTIONS} -cf - src tests | (cd $DESTDIR/share/cmucl/$VERSION; ${GTAR} xf -)
if [ -z "$INSTALL_DIR" ]; then
echo " Compressing with $ZIP"
${GTAR:-tar} ${GTAR_OPTIONS} -cf - bin src tests | ${ZIP} > cmucl-src-$VERSION.tar.$ZIPEXT
# echo " Compressing with $ZIP"
ls $DESTDIR/share/cmucl/$VERSION/
${GTAR} ${GTAR_OPTIONS} ${COMPRESS} -C $DESTDIR -cf cmucl-src-$VERSION.tar.$COMPRESS_EXT share/cmucl/$VERSION/src
else
# Install in the specified directory
${GTAR:-tar} ${GTAR_OPTIONS} -cf - bin src tests | (cd $INSTALL_DIR; ${GTAR:-tar} xf -)
${GTAR} ${GTAR_OPTIONS} -cf - src tests | (cd $DESTDIR/share/cmucl/$VERSION; ${GTAR:-tar} xf -)
fi
#! /bin/bash
# Run the ansi-tests.
#
# We need to check ou ansi-tests if we haven't already. We expect
# this to be run from the root of the cmucl git tree. We will check
# it out one level up from where we are.
usage() {
echo "run-ansi-tests.sh [?h] [-l lisp]"
echo " -l lisp Lisp to use for the tests; defaults to lisp"
echo " -h|? This help message"
echo ""
echo "Run the ansi-tests"
echo ""
echo "If ../ansi-test does not exist a clone is checked out there."
echo "Then the ansi-test is run in the clone using the given lisp."
exit 0;
}
LISP=lisp
while getopts "h?l:" arg
do
case $arg in
l) LISP="$PWD/$OPTARG" ;;
\?) usage ;;
h) usage ;;
esac
done
# Shift out the options
shift $[$OPTIND - 1]
# Branch to use for tests
#
# Use branch cmucl-expected-failures in general since this branch
# generally has the list of expected failures. This is the branch to
# use on cmucl master in general.
BRANCH=cmucl-expected-failures
set -x
if [ -d ../ansi-test ]; then
# We already have clone; make sure it's clean by stashing any
# changes. Then pull any updates for the desired branch.
(cd ../ansi-test; git stash; git checkout $BRANCH; git pull --rebase)
else
(cd ../; git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git)
fi
cd ../ansi-test
git checkout $BRANCH
make LISP="$LISP batch -noinit -nositeinit"
# There should be no unexpected successes or failures; check these separately
grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out
......@@ -6,7 +6,8 @@
# then just those tests are run.
usage() {
echo "run-tests.sh [?] [-l lisp] [tests]"
echo "run-tests.sh [?] [-d test-dir] [-l lisp] [tests]"
echo " -d test-dir Directory containing the unit test files"
echo " -l lisp Lisp to use for the tests; defaults to lisp"
echo " -? This help message"
echo ""
......@@ -23,10 +24,11 @@ usage() {
}
LISP=lisp
while getopts "h?l:" arg
while getopts "h?l:d:" arg
do
case $arg in
l) LISP=$OPTARG ;;
d) TESTDIR=$OPTARG ;;
\?) usage ;;
esac
done
......@@ -47,9 +49,21 @@ function cleanup {
trap cleanup EXIT
if [ -n "${TESTDIR}" ]; then
TESTDIRARG=" :test-directory \"$TESTDIR/\""
else
TESTDIR="tests/"
TESTDIRARG=""
fi
# Compile up the C file that is used for testing alien funcalls to
# functions that return integer types of different lengths. We use
# gcc since clang isn't always available.
(cd "$TESTDIR"; gcc -m32 -O3 -c test-return.c)
if [ $# -eq 0 ]; then
# Test directory arg for run-all-tests if a non-default
# No args so run all the tests
$LISP -noinit -load tests/run-tests.lisp -eval '(cmucl-test-runner:run-all-tests)'
$LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(cmucl-test-runner:run-all-tests ${TESTDIRARG})"
else
# Run selected files. Convert each file name to uppercase and append "-TESTS"
result=""
......@@ -58,6 +72,6 @@ else
new=`echo $f | tr '[a-z]' '[A-Z]'`
result="$result "\"$new-TESTS\"
done
$LISP -noinit -load tests/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))"
$LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))"
fi
;;; -*- Package: ARM -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: src/assembly/arm/alloc.lisp $")
;;;
;;; **********************************************************************
;;;
;;; Stuff to handle allocating simple objects.
;;;
(in-package "ARM")
;;; But we do everything inline now that we have a better pseudo-atomic.
;;; -*- Package: ARM -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: src/assembly/arm/arith.lisp $")
;;;
;;; **********************************************************************
;;;
;;; Stuff to handle simple cases for generic arithmetic.
;;;
(in-package "ARM")
;;;; Addition and subtraction.
(define-assembly-routine (generic-+
(:cost 10)
(:return-style :full-call)
(:translate +)
(:policy :safe)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res (descriptor-reg any-reg) a0-offset))
(emit-not-implemented))
(define-assembly-routine (generic--
(:cost 10)
(:return-style :full-call)
(:translate -)
(:policy :safe)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res (descriptor-reg any-reg) a0-offset))
(emit-not-implemented))
;;;; Multiplication
(define-assembly-routine (generic-*
(:cost 50)
(:return-style :full-call)
(:translate *)
(:policy :safe)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res (descriptor-reg any-reg) a0-offset))
(emit-not-implemented))
;; I (rtoy) am ripping this out right now because it doesn't
;; compile. The routine wants 2 non-descriptors and we currently only
;; have 1. Plus, do we really need these assembly routines? Is there
;; any reason why this would get called instead of the inline
;; multiplication vops that we already have?
#+nil
(macrolet
((frob (name note cost type sc)
`(define-assembly-routine (,name
(:note ,note)
(:cost ,cost)
(:translate *)
(:policy :fast-safe)
(:arg-types ,type ,type)
(:result-types ,type))
((:arg x ,sc a0-offset)
(:arg y ,sc a1-offset)
(:res res ,sc a0-offset))
(emit-not-implemented))))
(frob unsigned-* "unsigned *" 40 unsigned-num descriptor-reg)
(frob signed-* "unsigned *" 41 signed-num descriptor-reg)
(frob fixnum-* "fixnum *" 30 tagged-num any-reg))
;;;; Division.
(define-assembly-routine (positive-fixnum-truncate
(:note "unsigned fixnum truncate")
(:cost 45)
(:translate truncate)
(:policy :fast-safe)
(:arg-types positive-fixnum positive-fixnum)
(:result-types positive-fixnum positive-fixnum))
((:arg dividend any-reg a0-offset)
(:arg divisor any-reg a1-offset)
(:res quo any-reg a0-offset)
(:res rem any-reg a1-offset))
(emit-not-implemented))
(define-assembly-routine (fixnum-truncate
(:note "fixnum truncate")
(:cost 50)
(:policy :fast-safe)
(:translate truncate)
(:arg-types tagged-num tagged-num)
(:result-types tagged-num tagged-num))
((:arg dividend any-reg a0-offset)
(:arg divisor any-reg a1-offset)
(:res quo any-reg a0-offset)
(:res rem any-reg a1-offset))
(emit-not-implemented))
#+nil
(define-assembly-routine (signed-truncate
(:note "(signed-byte 32) truncate")
(:cost 60)
(:policy :fast-safe)
(:translate truncate)
(:arg-types signed-num signed-num)
(:result-types signed-num signed-num))
((:arg dividend signed-reg nl0-offset)
(:res rem signed-reg nl0-offset))
(emit-not-implemented))
;;;; Comparison
(macrolet
((define-cond-assem-rtn (name translate static-fn cmp)
`(define-assembly-routine (,name
(:cost 10)
(:return-style :full-call)
(:policy :safe)
(:translate ,translate)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res descriptor-reg a0-offset))
(emit-not-implemented))))
(define-cond-assem-rtn generic-< < two-arg-< :lt)
(define-cond-assem-rtn generic-<= <= two-arg-<= :le)
(define-cond-assem-rtn generic-> > two-arg-> :gt)
(define-cond-assem-rtn generic->= >= two-arg->= :ge))
(define-assembly-routine (generic-eql
(:cost 10)
(:return-style :full-call)
(:policy :safe)
(:translate eql)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res descriptor-reg a0-offset))
(emit-not-implemented))
(define-assembly-routine (generic-=
(:cost 10)
(:return-style :full-call)
(:policy :safe)
(:translate =)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res descriptor-reg a0-offset))
(emit-not-implemented))
(define-assembly-routine (generic-/=
(:cost 10)
(:return-style :full-call)
(:policy :safe)
(:translate /=)
(:save-p t))
((:arg x (descriptor-reg any-reg) a0-offset)
(:arg y (descriptor-reg any-reg) a1-offset)
(:res res descriptor-reg a0-offset))
(emit-not-implemented))