Commit 0be82da2 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Merge branch 'upstream'

parents 4149709d ae82047e
# really this is private to my build process
make/
common-lisp.net
.vcs
init-lisp.lisp
website/changelog.xml
push
resbcl
reccl
reecl
regcl
# Temporary files from documentation build
doc/asdf/
......@@ -26,17 +23,18 @@ doc/asdf.tp
doc/asdf.vr
doc/asdf.vrs
# We build these at various stages in the make process
# We build these at various stages in the build and test process
LICENSE
website/output/
tmp/
lift-local.config
*.dribble
*.fasl
*.dfsl
*.cfsl
*.fas
*.lib
*.o
*.[oahcisS]
*.*fsl
*.bak
*.data
test/try-reloading-dependency.asd
test/fileMissing.lisp
......@@ -7,11 +7,12 @@ clnet_home := "/project/asdf/public_html/"
sourceDirectory := $(shell pwd)
lisps = allegro allegromodern ccl clisp sbcl
lisps ?= allegro ccl clisp ecl sbcl
## not tested by me: abcl allegromodern cmucl lisworks
## FAIL: gclcvs
## maybe supported by asdf, not supported yet by our tests: cormancl mcl scl
ifndef lisp
lisp := sbcl
endif
lisp ?= sbcl
# website, tag, install
......@@ -26,11 +27,12 @@ archive: FORCE
bin/build-tarball.sh
archive-copy: archive
git checkout release
bin/rsync-cp.sh tmp/asdf*.tar.gz $(webhome_private)/archives
bin/link-tarball.sh $(clnet_home) $(user)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
git push cl.net
git push --tags cl.net
git push cl.net release
git push --tags cl.net release
website:
make -C doc website
......@@ -54,13 +56,11 @@ clean: FORCE
make -C doc clean
test: FORCE
@cd test; make clean;./run-tests.sh $(lisp) $(test-regex)
@cd test; make clean;./run-tests.sh ${lisp} ${test-glob}
test-all: FORCE
@for lisp in $(lisps); do \
make test lisp=$$lisp; \
@for lisp in ${lisps} ; do \
make test lisp=$$lisp || exit 1 ; \
done
sbcl --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
--eval "(write-test-web-pages)" --eval "(quit)"
FORCE:
ASDF: another system definition facility
========================================
If you want to use ASDF to load systems, see the getting
started guide at:
If you want to use ASDF, read our manual:
http://common-lisp.net/project/asdf/getting-started.html
http://common-lisp.net/project/asdf/asdf.html
If you want to define your own systems, see the manual at:
The first few sections, Loading ASDF, Configuring ASDF and Using ASDF,
will get you started as a simple user.
http://common-lisp.net/project/asdf/manual.html
If you want to define your own systems, further read the section
Defining systems with defsystem.
More information and additional links can be found on ASDF's
home page at:
http://common-lisp.net/project/asdf
http://common-lisp.net/project/asdf/
last updated Saturday; July 18, 2009, 10:20 AM EDT
last updated Wednesday; May 5, 2010
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
;;; ;;;
;;; Free Software available under an MIT-style license. ;;;
;;; ;;;
;;; Copyright (c) 2001-2009 Daniel Barlow and contributors ;;;
;;; Copyright (c) 2001-2010 Daniel Barlow and contributors ;;;
;;; ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
This diff is collapsed.
(in-package :cl-user)
(defpackage :cclan (:use #:cl #:asdf)
(:export #:all-components #:write-package))
;;; -*- Lisp -*-
(defpackage :cclan-system (:use #:cl #:asdf))
(in-package :cclan-system)
(defsystem cclan
:version "0.1"
:components ((:file "cclan-package")
(:file "cclan" :depends-on ("cclan-package"))))
(in-package :cclan)
;;;; This file contains functions, classes etc that are not part of
;;;; asdf itself, but extend it in various ways useful for maintainers
;;;; of new-style cCLan packages
;;;; The public interface consists of the functions whose symbols are
;;;; exported from the package
;;;; This file does not contain references to asdf internals - or
;;;; shouldn't, anyway. Send bug reports
(defun mapappend (function list)
(let ((f (coerce function 'function)))
(loop for i in list append (funcall f i))))
(defgeneric all-components (component))
(defmethod all-components ((source-file source-file))
(list source-file))
(defmethod all-components ((module module))
(cons module (mapappend #'all-components (module-components module))))
(defmethod all-components ((module symbol))
(all-components (find-system module)))
(defun cvs-tag-name (system)
(let* ((system (find-system system))
(version (component-version system)))
(format nil "release_~A" (substitute #\_ #\. version))))
(defun cvs-tag (system)
(let* ((system (find-system system))
(directory (component-pathname system)))
(run-shell-command "cd ~A && cvs tag -F ~A"
(namestring directory) (cvs-tag-name system))))
(defun write-readme-file (stream suggested-registry system-name)
"Write a README.install file detailing a possible sequence of commands to use the newly-untarred system."
(format stream "~
1. Make a symlink in ~W[*] pointing to the .asd file
2. Start your asdf-enabled lisp
2a. Ensure that ~W[*] is in asdf:*central-registry*
3. At the lisp prompt, type '(asdf:operate 'asdf:load-op ~W)'. This
will compile and load the system into your running lisp.
[*] This path (~W) is only a suggestion; the important
thing is that asdf know where to find the .asd file. asdf uses the
contents of the variable ASDF:*CENTRAL-REGISTRY* to find its system
definitions.
These instructions were automatically generated by cCLan software. Use
at your own peril.~%" suggested-registry suggested-registry system-name suggested-registry))
(defun write-package (system)
(let* ((parent-dir
(parse-namestring
(format nil "/tmp/~A.~A/"
#+sbcl (sb-unix:unix-getpid)
#-sbcl (random 1000000)
(get-internal-run-time))))
(system (find-system system))
(sub-dir-name
(format nil "~A_~A"
(component-name system) (component-version system)))
(cvsroot-file
(merge-pathnames "CVS/Root" (component-pathname system)))
(old-pwd *default-pathname-defaults*)
(*default-pathname-defaults* parent-dir))
(ensure-directories-exist parent-dir)
(cvs-tag system)
(and
(zerop (asdf:run-shell-command
"cd ~A && cvs -d `cat ~A` checkout -d ~A -r ~A -kv ~A"
(namestring parent-dir)
(namestring cvsroot-file)
sub-dir-name
(cvs-tag-name system)
(component-name system)))
(with-open-file (o (format nil "~A/INSTALL.asdf" sub-dir-name)
:direction :output)
(write-readme-file o "$HOME/lisp/systems/" (component-name system))
t)
(zerop (asdf:run-shell-command "cd ~A && tar cf ~A~A.tar ~A"
(namestring parent-dir)
(namestring old-pwd) sub-dir-name
sub-dir-name))
(zerop (asdf:run-shell-command
"gzip -f9 ~A~A.tar"
(namestring old-pwd) sub-dir-name))
(format t "Now run~% gpg -b -a ~A~A.tar.gz~%in a shell with a tty"
(namestring old-pwd) sub-dir-name))))
(defun class-name-of (x)
(class-name (class-of x)))
This diff is collapsed.
......@@ -26,12 +26,18 @@
</ul>
</div>
<div class="contents">
<a id="ASDF 2"></a>
<h3>ASDF 2</h3>
<p>We recently released ASDF 2 (on May 31st 2010).
It will hopefully be bundled will all official releases
of Common Lisp implementations made after that date.
</p>
<a id="what_it_is"></a>
<h3>What it is</h3>
<p>ASDF is a tool for describing how source files are organized:
what depends on which and when.
</p>
<p>It is roughly what Common-Lisp hackers use to build software
<p>It is roughly what Common Lisp hackers use to build software
where C hackers would use say GNU Make.
</p>
<p>ASDF stands for <em>A</em>nother <em>S</em>ystem <em>D</em>efinition <em>F</em>acility,
......@@ -47,7 +53,7 @@
<li><a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git;a=blob;f=asdf.texinfo">as texinfo source</a></li>
</ul>
<a href="downloads"></a>
<a id="downloads"></a>
<h3>Getting it</h3>
<p>Though they may lag behind the version here, ASDF comes bundled with most Lisps.
To get the greatest and latest, you can:
......@@ -64,7 +70,9 @@
</li>
<li>pull the latest from our git repository
(<a href="http://common-lisp.net/gitweb?p=projects/asdf/asdf.git">browse</a>)
<pre>git clone http://common-lisp.net/project/asdf/asdf.git</pre>
<pre>git clone git://common-lisp.net/projects/asdf/asdf.git</pre>
(Note that our "master" branch is for current development;
get our "release" branch for the latest stable release.)
</li></ul>
<a id="bugs">
......@@ -90,19 +98,20 @@
<a id="news"></a>
<h3>What is happening</h3>
<dl>
<dt>December 2009 to April 2010</dt>
<dt>December 2009 to June 2010</dt>
<dd>Fran&ccedil;ois-Ren&eacute; Rideau is de facto maintainer,
with notable contributions from Robert P. Goldman.
Push towards an ASDF 2 release
with notable contributions from Robert P. Goldman,
Juanjo Garcia-Ripoll and James Anderson.
ASDF 2 released
with many clean-ups, better configurability
and updated documentation.
</dd>
<dt>May 2006 to November 2009</dt>
<dd>Gary King is de facto maintainer,
with notable contributions from
Robert P. Goldman, Nikodemus Siivola, Christophe Rhodes, D Herring.
Robert P. Goldman, Nikodemus Siivola, Christophe Rhodes, Daniel Herring.
Many small features and bug fixes,
trying to make the project more usable,
making the project more maintanable,
moving to using git and common-lisp.net.
</dd>
<dt>May 2004 to April 2006</dt>
......@@ -124,7 +133,7 @@
<a class="nav" href="http://common-lisp.net/" title="Common-Lisp.net"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/lisp-lizard.png" width="80" height="15" title="Common-Lisp.net" alt="Common-Lisp.net button" /></a>
<p><span class="copyright"Copyright &copy; 2001-2010 Daniel Barlow and contributors</span></p>
<p>ASDF has an <a href="http://www.opensource.org/licenses/mit-license.php">MIT style</a> license</p>
<div id="timestamp">Last updated 2010-04-08</div>
<div id="timestamp">Last updated 2010-06-02</div>
</div>
</body>
</html>
......@@ -185,11 +185,11 @@
(handler-bind
((error (lambda (c)
(incf system-failures)
(format *error-output* "~&error! ~a~%sysdef:~% ~W~%" c system-definition)
(format *error-output* "~&error! ~a~%sysdef:~% ~S~%" c system-definition)
#+sbcl (sb-debug:backtrace 69)
#+clozure (ccl:print-call-history :count 69 :start-frame-number 1)
#+clisp (system::print-backtrace)
(format result-stream "~&~%***~%error: ~a~%~:w"
(format result-stream "~&~%***~%error: ~a~%~s"
c system-definition)
(return-from :test-system))))
(unless (and (or (typep system-pathname 'logical-pathname)
......@@ -241,9 +241,9 @@
:missing)))
test-files))
(format result-stream "~&~%~% translations: ~a: ~:w" "ASDFTEST" (logical-pathname-translations "ASDFTEST"))
(format result-stream "~&~%~% translations: ~a: ~s" "ASDFTEST" (logical-pathname-translations "ASDFTEST"))
(format result-stream "~&~%~% variations:~% systems: ~:w~% modules: ~:w~% files: ~:w"
(format result-stream "~&~%~% variations:~% systems: ~s~% modules: ~s~% files: ~s"
systems modules files)
(let ((homogeneous-failures 0) (*print-length* nil))
......
......@@ -18,18 +18,14 @@
#'(lambda (w)
(princ w *error-output*)
(muffle-warning w))))
(compile-file *asdf-lisp* :output-file tmp))
(compile-file *asdf-lisp* :output-file tmp :print t :verbose t))
(declare (ignore result))
(cond
#-ecl
(warnings-p
(leave-lisp "Testsuite failed: ASDF compiled with warnings" 1))
(errors-p
(leave-lisp "Testsuite failed: ASDF compiled with ERRORS" 2))
(t
#+ecl
(when warnings-p
(format t "~&ASDF compiled with warnings. Please fix ECL.~%"))
(when (probe-file *asdf-fasl*)
(delete-file *asdf-fasl*))
(rename-file tmp *asdf-fasl*)
......
......@@ -86,6 +86,7 @@ do_tests() {
echo " $test_pass passing and $test_fail failing" >&2
if [ $test_fail -eq 0 ] ; then
echo "all tests apparently successful" >&2
echo success > ../tmp/results/status
else
echo "failing test(s): $failed_list" >&2
fi
......@@ -190,8 +191,11 @@ if [ -z "$command" ] ; then
else
create_config
mkdir -p ../tmp/results
echo failure > ../tmp/results/status
thedate=`date "+%Y-%m-%d"`
do_tests "$command" "$eval" 2>&1 | \
tee "../tmp/results/${lisp}.text" "../tmp/results/${lisp}-${thedate}.save"
read a < ../tmp/results/status
clean_up
[ success = "$a" ] ## exit code
fi
......@@ -43,6 +43,7 @@
;;; code adapted from cl-launch (any errors in transcription are mine!)
;; http://www.cliki.net/cl-launch
(defun leave-lisp (message return)
(fresh-line *error-output*)
(when message
(format *error-output* message)
(terpri *error-output*))
......
(defsystem test-compile-file-failure
:components ((:file "test-compile-file-failure")))
(eval-when (:compile-toplevel :load-toplevel :execute)
;; CLISP 2.48 has a bug that makes this test fail. Work around:
#+clisp (when (eq asdf:*compile-file-failure-behaviour* :error) (error 'asdf:compile-error))
(warn "Warning."))
;;; -*- Lisp -*-
(load "script-support")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(assert (handler-case
(let ((asdf:*compile-file-failure-behaviour* :warn))
(asdf:load-system 'test-compile-file-failure :force t)
t)
(asdf:compile-error () nil)))
(assert (handler-case
(let ((asdf:*compile-file-failure-behaviour* :error))
(asdf:load-system 'test-compile-file-failure :force t)
nil)
(asdf:compile-error () t))))
......@@ -29,7 +29,7 @@
(call-next-method)))
(defmethod find-component :around ((m (eql (find-quux)))
(c string) &optional version)
(c string))
"FIND-COMPONENT on a component is a no-op --- it's already found."
(declare (ignore version))
(if (string-equal c "file3-only")
......
;;; -*- Lisp -*-
(asdf:defsystem test-redundant-recompile
:components ((:file "file2" :in-order-to ((compile-op (load-op "file1"))
(load-op (load-op "file1"))))
(:file "file1")))
#|
;;;This test system definition attempts to replicate the excess dependencies
;;;that seem to give rise to launchpad bug 590517
;;;(https://bugs.launchpad.net/asdf/+bug/590517)
1) from clean, check that all fasl files build and that some function
defined in the second file is present
2) load again. Check to make sure that nothing is recompiled.
|#
;;; -*- Lisp -*-
(load "script-support")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'test-redundant-recompile)
;; test that it compiled
(let* ((file1 (asdf:compile-file-pathname* "file1"))
(file2 (asdf:compile-file-pathname* "file2"))
(file1-date (file-write-date file1))
(file2-date (file-write-date file2)))
(format t "~&test-redundant-recompile 1: ~S ~S~%" file1 file1-date)
(format t "~&test-redundant-recompile 2: ~S ~S~%" file2 file2-date)
(assert file1-date)
(assert file2-date)
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
;; now rerun the load-op and check that no files are recompiled
;;(trace asdf::operation-done-p asdf::traverse)
(asdf:operate 'asdf:load-op 'test-redundant-recompile)
(assert (= file1-date (file-write-date file1)))
(assert (= file2-date (file-write-date file2)))))
;;; -*- Lisp -*-
(asdf:defsystem test-samedir-modules
:components ((:module "here"
:components
(
(:file "file2" :in-order-to ((compile-op (load-op "file1"))))
(:file "file1"))
:pathname "")))
#|
from clean, check that all fasl files build and that some function
defined in the second file is present
|#
;;; -*- Lisp -*-
(load "script-support")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'test-samedir-modules)
;; test that it compiled
(let* ((file1 (asdf:compile-file-pathname* "file1"))
(file2 (asdf:compile-file-pathname* "file2"))
(file1-date (file-write-date file1)))
(format t "~&test samedir modules 1: ~S ~S~%" file1 file1-date)
(assert file1-date)
(assert (file-write-date file2))
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))))
;;; -*- Lisp -*-
(load "script-support")
(load-asdf)
(quit-on-error
(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(asdf:load-system :asdf)
(asdf:initialize-source-registry `(:source-registry (:directory ,*asdf-directory*) :ignore-inherited-configuration))
(asdf:load-system :asdf))
......@@ -39,8 +39,7 @@
(assert
(asdf::version-satisfies (asdf:asdf-version) (asdf:asdf-version)))
(assert
(asdf::version-satisfies (asdf:asdf-version) "1.608"))
(asdf::version-satisfies (asdf:asdf-version) "2.000"))
(assert
(not (asdf::version-satisfies (asdf:asdf-version) "666")))
)
......@@ -4,7 +4,6 @@
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
;;(trace ASDF::MERGE-COMPONENT-RELATIVE-PATHNAME ASDF::COMPONENT-RELATIVE-PATHNAME)
(asdf:operate 'asdf:load-op 'test1)
;; test that it compiled
(let* ((file1 (asdf:compile-file-pathname* "file1"))
......@@ -18,11 +17,8 @@
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
;; now remove one output file and check that the other is _not_
;; recompiled
(sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
;; now remove one output file and check that the other is _not_ recompiled
(trace asdf::operation-done-p asdf::traverse)
(asdf::run-shell-command "rm -f ~A" (namestring file2))
(asdf:operate 'asdf:load-op 'test1)
(assert (= file1-date (file-write-date file1)))
......@@ -34,6 +30,7 @@
;; unix cwd. this is not a problem for run-tests.sh, but can be in general
(let ((before (file-write-date file2)))
;; filesystem mtime has 1 second granularity. Make sure even fast machines see a difference.
(sleep 1)
(asdf::run-shell-command "touch file1.lisp")
(asdf:operate 'asdf:load-op 'test1)
......
(in-package #:common-lisp-user)
#+clisp (eval-when (:compile-toplevel) (fmakunbound 'try-recompiling-1))
(defun try-recompiling-1 ()
(assert *caught-error*))
......
;;; -*- Lisp -*-
(asdf:defsystem try-reloading-dependency
:components ((:file "file3")))
......@@ -33,6 +33,6 @@ use a wild pathname instead." module)))
files)))))
;; Don't export wild-module or else will get a full warning
;; when (require 'asdf) if asdf is already loaded
;; when (require :asdf) if asdf is already loaded
;;(export '(wild-module))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment