Commit d37f617b authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

2.017.11: Fix run-shell-command on allegro/unix, tweak it on Windows:

break things differently, giving user more control when things break.
Document somewhat the mess that is asdf:run-shell-command, and
recommend xcvb-driver:run-program/process-output-stream as a replacement.
Also, rename some testing targets in the Makefile, update testing status.
Finally, hush cmucl.
parent 2eeef9dd
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -5,9 +5,12 @@ clnet_home := "/project/asdf/public_html/"
sourceDirectory := $(shell pwd)

lisps ?= ccl clisp sbcl ecl cmucl abcl scl allegro
## occasionally tested by not me: allegromodern lispworks
## FAIL: gclcvs (COMPILER BUGS!!!), ecl-bytecodes (one failed test for now), xcl (pathname issues)
## tentatively supported by asdf, not supported by our tests: cormancl genera rmcl
## MINOR FAIL: ecl-bytecodes (failure in test-compile-file-failure.script)
## MINOR FAIL: xcl (logical pathname issue in asdf-pathname-test.script)
## OCCASIONALLY TESTED BY NOT ME: allegromodern (not in my free demo version)
## OCCASIONALLY TESTED BY NOT ME: lispworks (testing requires Pro version)
## MAJOR FAIL: gclcvs -- COMPILER BUG! Upstream fixed it, but it won't compile for me.
## NOT SUPPORTED BY OUR TESTS: cormancl genera rmcl. Manually tested once in a while.

lisp ?= sbcl

@@ -86,17 +89,17 @@ test-upgrade:
test-forward-references:
	if [ -f /usr/lib/sbcl/sbcl-dist.core ] ; then SBCL="/usr/bin/sbcl --core /usr/lib/sbcl/sbcl-dist.core" ; fi ; $${SBCL:-sbcl} --noinform --load ~/cl/asdf/asdf.lisp --eval '(sb-ext:quit)' 2>&1 | cmp - /dev/null

do-test:
test-lisp:
	@cd test; ${MAKE} clean;./run-tests.sh ${lisp} ${test-glob}

test: do-test test-forward-references doc
test: test-lisp test-forward-references doc

do-test-all:
test-all-lisps:
	@for lisp in ${lisps} ; do \
		${MAKE} do-test lisp=$$lisp || exit 1 ; \
		${MAKE} test-lisp lisp=$$lisp || exit 1 ; \
	done

test-all: test-forward-references doc test-upgrade do-test-all
test-all: test-forward-references doc test-upgrade test-all-lisps

# Note that the debian git at git://git.debian.org/git/pkg-common-lisp/cl-asdf.git is stale,
# as we currently build directly from upstream at git://common-lisp.net/projects/asdf/asdf.git
@@ -136,7 +139,7 @@ TODO:
release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists

.PHONY: install archive archive-copy push doc website clean mrproper \
	upgrade-test test-forward-references test do-test test-all do-test-all \
	upgrade-test test-forward-references test test-lisp test-all test-all-lisps \
	test-upgrade test-forward-references \
	debian-package release \
	replace-sbcl-asdf replace-ccl-asdf \
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
  :licence "MIT"
  :description "Another System Definition Facility"
  :long-description "ASDF builds Common Lisp software organized into defined systems."
  :version "2.017.10" ;; to be automatically updated by bin/bump-revision
  :version "2.017.11" ;; to be automatically updated by bin/bump-revision
  :depends-on ()
  :components
  ((:file "asdf")
+54 −36
Original line number Diff line number Diff line
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.017.10: Another System Definition Facility.
;;; This is ASDF 2.017.11: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
@@ -115,7 +115,7 @@
         ;; "2.345.6" would be a development version in the official upstream
         ;; "2.345.0.7" would be your seventh local modification of official release 2.345
         ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
         (asdf-version "2.017.10")
         (asdf-version "2.017.11")
         (existing-asdf (find-class 'component nil))
         (existing-version *asdf-version*)
         (already-there (equal asdf-version existing-version)))
@@ -2766,11 +2766,25 @@ Returns the new tree (which probably shares structure with the old one)"
;;;; gratefully accepted, if they do the same thing.
;;;; If the docstring is ambiguous, send a bug report.
;;;;
;;;; WARNING! The function below is mostly dysfunctional.
;;;; For instance, it will probably run fine on most implementations on Unix,
;;;; which will hopefully use the shell /bin/sh (which we force in some cases)
;;;; which is hopefully reasonably compatible with a POSIX *or* Bourne shell.
;;;; But behavior on Windows may vary wildly between implementations,
;;;; either relying on your having installed a POSIX sh, or going through
;;;; the CMD.EXE interpreter, for a totally different meaning, depending on
;;;; what is easily expressible in said implementation.
;;;;
;;;; We probably should move this functionality to its own system and deprecate
;;;; use of it from the asdf package. However, this would break unspecified
;;;; existing software, so until a clear alternative exists, we can't deprecate
;;;; it, and even after it's been deprecated, we will support it for a few
;;;; years so everyone has time to migrate away from it. -- fare 2009-12-01
;;;;
;;;; As a suggested replacement which is portable to all ASDF-supported
;;;; implementations and operating systems except Genera, I recommend
;;;; xcvb-driver's xcvb-driver:run-program/process-output-stream and its
;;;; derivatives such as xcvb-driver:run-program/for-side-effects.

(defun* run-shell-command (control-string &rest args)
  "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
@@ -2786,8 +2800,8 @@ output to *VERBOSE-OUT*. Returns the shell's exit code."
    ;; will this fail if command has embedded quotes - it seems to work
    (multiple-value-bind (stdout stderr exit-code)
        (excl.osi:command-output
         (format nil "~a -c \"~a\""
                 #+mswindows "sh" #-mswindows "/bin/sh" command)
         #-mswindows (vector "/bin/sh" "/bin/sh" "-c" command)
         #+mswindows command ; BEWARE!
         :input nil :whole nil
         #+mswindows :show-window #+mswindows :hide)
      (asdf-message "~{~&; ~a~%~}~%" stderr)
@@ -2800,9 +2814,12 @@ output to *VERBOSE-OUT*. Returns the shell's exit code."
    #+clozure
    (nth-value 1
               (ccl:external-process-status
                (ccl:run-program "/bin/sh" (list "-c" command)
                                 :input nil :output *verbose-out*
                                 :wait t)))
                (ccl:run-program
                 #+asdf-unix "/bin/sh"
                 #+asdf-unix (list "-c" command)
                 #+asdf-windows (format nil "CMD /C ~A" command)
                 #+asdf-windows () ; BEWARE!
                 :input nil :output *verbose-out* :wait t)))

    #+(or cmu scl)
    (ext:process-exit-code
@@ -2820,7 +2837,7 @@ output to *VERBOSE-OUT*. Returns the shell's exit code."
    #+lispworks
    (system:call-system-showing-output
     command
     :shell-type "/bin/sh"
     #+asdf-unix :shell-type #+asdf-unix "/bin/sh"
     :show-cmd nil
     :prefix ""
     :output-stream *verbose-out*)
@@ -2926,7 +2943,8 @@ located."

(defparameter *lisp-version-string*
  (let ((s (lisp-implementation-version)))
    (or
    (car
     (list
      #+allegro
      (format nil "~A~A~@[~A~]"
              excl::*common-lisp-version-number*
@@ -2952,7 +2970,7 @@ located."
      (multiple-value-bind (major minor) (sct:get-system-version "System")
        (format nil "~D.~D" major minor))
      #+mcl (subseq s 8) ; strip the leading "Version "
     s)))
      s))))

(defun* implementation-type ()
  *implementation-type*)