diff --git a/asdf.lisp b/asdf.lisp index 65ab17b84604de8a64621388008d9c7294ef3546..23c055db56abac0e6c45cb0aa868e55bdece8400 100644 --- a/asdf.lisp +++ b/asdf.lisp @@ -1,4 +1,4 @@ -;;; This is asdf: Another System Definition Facility. $Revision: 1.44 $ +;;; This is asdf: Another System Definition Facility. $Revision: 1.45 $ ;;; ;;; Feedback, bug reports, and patches are all welcome: please mail to ;;; <cclan-list@lists.sf.net>. But note first that the canonical @@ -88,7 +88,7 @@ (in-package #:asdf) ;;; parse the cvs revision into something that might be vaguely useful. -(defvar *asdf-revision* (let* ((v "$Revision: 1.44 $") +(defvar *asdf-revision* (let* ((v "$Revision: 1.45 $") (colon (position #\: v)) (dot (position #\. v))) (and v colon dot @@ -611,7 +611,7 @@ system.")) (multiple-value-bind (output warnings-p failure-p) (compile-file source-file :output-file output-file) - (declare (ignore output)) + ;(declare (ignore output)) (when warnings-p (case (operation-on-warnings operation) (:warn (warn "COMPILE-FILE warned while performing ~A on ~A" @@ -708,9 +708,13 @@ system.")) ;;; syntax (defun remove-keyword (key arglist) - (loop for sublist = arglist then rest until (null sublist) - for (elt arg . rest) = sublist - unless (eq key elt) append (list elt arg))) + (labels ((aux (key arglist) + (cond ((null arglist) nil) + ((eq key (car arglist)) (cddr arglist)) + (t (cons (car arglist) (cons (cadr arglist) + (remove-keyword + key (cddr arglist)))))))) + (aux key arglist))) (defmacro defsystem (name &body options) (destructuring-bind (&key pathname (class 'system) &allow-other-keys) options @@ -903,4 +907,17 @@ output to *trace-output*. Returns the shell's exit code." :shell-type "/bin/sh" :output-stream *trace-output*))) +#+clisp +(defun run-shell-command (control-string &rest args) + "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and +synchronously execute the result using a Bourne-compatible shell, with +output to *trace-output*. Returns the shell's exit code." + (let ((command (apply #'format nil control-string args))) + (format *trace-output* "; $ ~A~%" command) + ;; XXX :terminal is not exactly *trace-output*, but it'll do + ;; XXX determined the return value of this by experimentation, it + ;; doesn't seem to be documented + (ext:run-shell-command command :output :terminal :wait t))) + + (pushnew :asdf *features*) diff --git a/cclan.lisp b/cclan.lisp index edbcf729d5f0b97983b5a8057d2c85520bede8f9..bc5a8a1987c22ba42e820a88c0c627f7314fcb3a 100644 --- a/cclan.lisp +++ b/cclan.lisp @@ -43,7 +43,7 @@ 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. Adsf uses the +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. diff --git a/test/run-tests.sh b/test/run-tests.sh index c7f06d8d349b1f23480cee15e290bc447223c1bc..3060da0e41b114496eb81b79b221614123b8f71f 100644 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -25,10 +25,15 @@ set -e if type sbcl then - do_tests "sbcl --noprogrammer" fasl + do_tests "sbcl --userinit /dev/null --noprogrammer" fasl fi -if [ -x /usr/local/bin/lisp ] +if [ -x /usr/bin/lisp ] then - do_tests "/usr/local/bin/lisp -batch" axpf + do_tests "/usr/bin/lisp -batch" x86f +fi + +if [ -x /usr/bin/clisp ] +then + do_tests "/usr/bin/clisp -norc -ansi -I " fas fi diff --git a/test/test2.script b/test/test2.script index 203d03fca54d3d966dea4a1bef7839affc39e259..bca60129de759e3ff46d23920224e30937b888f8 100644 --- a/test/test2.script +++ b/test/test2.script @@ -5,8 +5,8 @@ ;(trace asdf::find-component) ;(trace asdf::traverse) (asdf:oos 'asdf:load-op 'test2b1) -(assert (and (file-write-date (compile-file-pathname "file3")) - (file-write-date (compile-file-pathname "file4")))) +(assert (and (probe-file (compile-file-pathname "file3")) + (probe-file (compile-file-pathname "file4")))) (handler-case (asdf:oos 'asdf:load-op 'test2b2) (asdf:missing-dependency (c) diff --git a/test/test3.script b/test/test3.script index c5e711ac22bd53dff02ad913807771f9c43e0f6b..170d4c5c26111451950e438bc445b428f0ebb4d0 100644 --- a/test/test3.script +++ b/test/test3.script @@ -2,6 +2,9 @@ #+(or f1 f2) (error "This test cannot run if :f1 or :f2 are on *features*") (load "../asdf") +(asdf:run-shell-command "rm ~A ~A" + (namestring (compile-file-pathname "file1")) + (namestring (compile-file-pathname "file2"))) (setf asdf:*central-registry* '(*default-pathname-defaults*)) (in-package :asdf) (handler-case @@ -11,10 +14,10 @@ (:no-error (c) (error "should have failed, oops"))) (pushnew :f1 *features*) (asdf:oos 'asdf:load-op 'test3) -(assert (file-write-date (compile-file-pathname "file1"))) -(assert (not (file-write-date (compile-file-pathname "file2")))) +(assert (probe-file (compile-file-pathname "file1"))) +(assert (not (probe-file (compile-file-pathname "file2")))) (run-shell-command "rm ~A" (namestring (compile-file-pathname "file1"))) (setf *features* (cons :f2 (cdr *features*))) (asdf:oos 'asdf:load-op 'test3) -(assert (file-write-date (compile-file-pathname "file2"))) -(assert (not (file-write-date (compile-file-pathname "file1")))) +(assert (probe-file (compile-file-pathname "file2"))) +(assert (not (probe-file (compile-file-pathname "file1"))))