Skip to content
Snippets Groups Projects
Commit 36d9b3bc authored by rtoy's avatar rtoy
Browse files

Add asdf2 and restore (and update) defsystem.

asdf/asdf.lisp:
o Current version of asdf2 imported from common-lisp.net asdf
  project.

defsystem/defsystem.lisp:
o Restored from repository and updated to current version from
  clocc.sourceforge.net.

code/modules.lisp:
o Indent docstrings to match the style of cmucl docstrings used
  elsewhere.  (Lines after the first are indented 2 spaces.)
o Add module for asdf and defsystem.

tools/build-utils.sh:
o Compile asdf and defsystem so when users require them, they're not
  compiled again or run in the interpreter.

tools/clean-target.sh:
o Keep the asdf and defsystem directories when requested so that both
  x87 and sse2 versions can be built.

tools/make-extra-dist.sh:
o Skip the asdf and defsystem directories when building the extras
  tarball; we don't need copies in the main and extras tarball.

tools/make-main-dist.sh:
o Install the asdf and defsystem directories in the correct place
o Copy the asdf and defsystem fasls.
parent 98bb168c
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/module.lisp,v 1.14 2010/04/20 17:57:45 rtoy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/module.lisp,v 1.15 2010/05/10 19:30:40 rtoy Exp $")
;;;
;;; **********************************************************************
......@@ -62,33 +62,36 @@
;;;; Provide and Require.
(defun provide (module-name)
"Adds a new module name to *modules* indicating that it has been loaded.
Module-name may be any valid string designator. All comparisons are
done using string=, i.e. module names are case-sensitive."
"Adds a new module name to *modules* indicating that it has been
loaded. Module-name may be any valid string designator. All
comparisons are done using string=, i.e. module names are
case-sensitive."
(pushnew (module-name-string module-name) *modules* :test #'string=)
t)
(defun require (module-name &optional pathname)
"Loads a module when it has not been already. Pathname, if supplied,
is a single pathname or list of pathnames to be loaded if the module
needs to be. If pathname is not supplied, then functions from the list
*MODULE-PROVIDER-FUNCTIONS* are called in order with the stringified
MODULE-NAME as the argument, until one of them returns non-NIL. By
default the functions MODULE-PROVIDE-CMUCL-DEFMODULE and MODULE-PROVIDE-
CMUCL-LIBRARY are on this list of functions, in that order. The first
of those looks for a list of files that was registered by a EXT:DEFMODULE
form. If the module has not been defined, then the second function
causes a file to be loaded whose name is formed by merging \"modules:\"
and the concatenation of module-name with the suffix \"-LIBRARY\".
Note that both the module-name and the suffix are each, separately,
converted from :case :common to :case :local. This merged name will be
probed with both a .lisp and .fasl extensions, calling LOAD if it exists.
Note that in all cases covered above, user code is responsible for
calling PROVIDE to indicate a successful load of the module.
While loading any files, *load-verbose* is bound to *require-verbose*
which defaults to t."
"Loads a module when it has not been already. Pathname, if
supplied, is a single pathname or list of pathnames to be loaded if
the module needs to be. If pathname is not supplied, then functions
from the list *MODULE-PROVIDER-FUNCTIONS* are called in order with
the stringified MODULE-NAME as the argument, until one of them
returns non-NIL. By default the functions
MODULE-PROVIDE-CMUCL-DEFMODULE and MODULE-PROVIDE- CMUCL-LIBRARY are
on this list of functions, in that order. The first of those looks
for a list of files that was registered by a EXT:DEFMODULE form. If
the module has not been defined, then the second function causes a
file to be loaded whose name is formed by merging \"modules:\" and
the concatenation of module-name with the suffix \"-LIBRARY\". Note
that both the module-name and the suffix are each, separately,
converted from :case :common to :case :local. This merged name will
be probed with both a .lisp and .fasl extensions, calling LOAD if it
exists.
Note that in all cases covered above, user code is responsible for
calling PROVIDE to indicate a successful load of the module.
While loading any files, *load-verbose* is bound to *require-verbose*
which defaults to t."
(let ((saved-modules (copy-list *modules*))
(module-name (module-name-string module-name)))
(unless (member module-name *modules* :test #'string=)
......@@ -120,10 +123,10 @@
(defun module-default-pathname (module-name)
"Derive a default pathname to try to load for an undefined module
named module-name. The default pathname is constructed from the
module-name by appending the suffix \"-LIBRARY\" to it, and merging
with \"modules:\". Note that both the module-name and the suffix are
each, separately, converted from :case :common to :case :local."
named module-name. The default pathname is constructed from the
module-name by appending the suffix \"-LIBRARY\" to it, and merging
with \"modules:\". Note that both the module-name and the suffix
are each, separately, converted from :case :common to :case :local."
(let* ((module-pathname (make-pathname :name module-name :case :common))
(library-pathname (make-pathname :name "-LIBRARY" :case :common)))
(merge-pathnames
......@@ -134,6 +137,12 @@ each, separately, converted from :case :common to :case :local."
(pathname-name library-pathname :case :local))
:case :local))))
(defmodule :defsystem
"modules:defsystem/defsystem")
(defmodule :asdf
"modules:asdf/asdf")
;; Meta contrib that loads up definitions for all other contribs
(defmodule "cmu-contribs"
"modules:contrib.lisp")
This diff is collapsed.
This diff is collapsed.
......@@ -15,6 +15,18 @@ fi
TARGET="`echo $1 | sed 's:/*$::'`"
shift
# Compile up the asdf and defsystem modules
$TARGET/lisp/lisp -noinit -nositeinit -batch "$@" << EOF || exit 3
(in-package :cl-user)
(setf (ext:search-list "target:")
'("$TARGET/" "src/"))
(setf (ext:search-list "modules:")
'("target:contrib/"))
(compile-file "modules:asdf/asdf")
(compile-file "modules:defsystem/defsystem")
EOF
$TARGET/lisp/lisp \
-noinit -nositeinit -batch "$@" <<EOF || exit 3
(in-package :cl-user)
......
......@@ -50,7 +50,7 @@ if [ -n "$KEEP" ]; then
case $KEEP in
lib) GREP='grep -v \(gray-streams\|gray-compat\|simple-streams\|iodefs\|external-formats\|clx\|hemlock\|clm\)-library' ;;
core) CORE='' ;;
all) GREP='grep -v \(gray-streams\|gray-compat\|simple-streams\|iodefs\|external-formats\|clx\|hemlock\|clm\)-library'
all) GREP='grep -v \(gray-streams\|gray-compat\|simple-streams\|iodefs\|external-formats\|clx\|hemlock\|clm\)-library\|\(asdf\|defsystem\)'
CORE='' ;;
esac
fi
......
......@@ -94,12 +94,12 @@ install ${GROUP} ${OWNER} -m 0755 $TARGET/motif/server/motifd \
# Install the contrib stuff. Create the directories and then copy the files.
for d in `(cd src; find contrib -type d -print | grep -v CVS)`
for d in `(cd src; find contrib -type d -print | grep -v "CVS\|asdf\|defsystem")`
do
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/$d
done
for f in `(cd src/contrib; find . -type f -print | grep -v CVS)`
for f in `(cd src/contrib; find . -type f -print | grep -v "CVS\|asdf\|defsystem")`
do
FILE=`basename $f`
DIR=`dirname $f`
......
......@@ -122,6 +122,23 @@ do
install ${GROUP} ${OWNER} -m 0644 $f $DESTDIR/lib/cmucl/lib/ext-formats/
done
# Create the directories and install the fasl files for asdf and defsystem
for f in asdf defsystem
do
install -d ${GROUP} ${OWNER} -m 0755 $DESTDIR/lib/cmucl/lib/contrib/$f
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/$f/$f.$FASL $DESTDIR/lib/cmucl/lib/contrib/$f
if [ "$FASL" = "x86f" ]; then
# For x87, we want both x86f and sse2f
install ${GROUP} ${OWNER} -m 0644 $TARGET/contrib/$f/$f.sse2f $DESTDIR/lib/cmucl/lib/contrib/$f
fi
done
# 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
done
install ${GROUP} ${OWNER} -m 0644 src/general-info/cmucl.1 \
$DESTDIR/${MANDIR}/
install ${GROUP} ${OWNER} -m 0644 src/general-info/lisp.1 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment