diff --git a/README.md b/README.md index a5059e49914ef4fbba251960dbcf7e8895784f4f..4a22c4c245ad25161c929e3879ee69699f117e3e 100644 --- a/README.md +++ b/README.md @@ -102,11 +102,16 @@ of its dependencies, you can do it with: ASDF by default uses Clozure Common Lisp (CCL) to run the scripts that orchestrate its tests. -Install CCL and make sure an executable called `ccl` is in your `PATH`, -or that you export a variable `CCL` that points to the CCL executable. -To use a different Common Lisp implementation, suitably edit the script +By defining and exporting the variable LISP to be one of `ccl`, `sbcl` or `allegro`, you +can have it use an alternate Common Lisp implementation instead. +Install CCL (respectively SBCL or Allegro) and make sure an executable called +`ccl` (respectively `sbcl` or `alisp`) is in your `PATH`, +or that you export a variable `CCL` (respectively `SBCL` or `ALLEGRO`) +that points to the executable. +To use a further Common Lisp implementation, suitably edit the script [`tools/asdf-tools`](tools/asdf-tools), or, on Windows, the batch file [`tools/asdf-tools.bat`](tools/asdf-tools.bat). +(Note that as of SBCL 1.2.13, we recommend against using SBCL on Windows.) Once you have all the required libraries and the asdf-tools script can find @@ -115,6 +120,10 @@ on a given Common Lisp implementation `$L`, with your favorite installed system make t u l=$L s=$S +To run only the regression test scripts, try simply: + + make l=$L test-scripts + Debugging tip ------------- diff --git a/tools/asdf-tools b/tools/asdf-tools index 76b2a4ca0db76a1aee29f06c88841ffcb96980e7..f12aac8dab73abfa5ed776007a213baee7d6c26c 100755 --- a/tools/asdf-tools +++ b/tools/asdf-tools @@ -1,10 +1,19 @@ -":" ; exec ${CCL:-ccl} --no-init --load "$0" -- "$@" ; exit # -*- Lisp -*- -#| -asdf-tools could also run on SBCL, or on any decent Common Lisp implementation, -including using cl-launch, but CCL is the single implementation that has decent -portable support on all of Windows, Linux (x64, x86, ARM), MacOS X -":" ; exec ${SBCL:-sbcl} --no-userinit --no-sysinit --script "$0" "$@" ; exit -":" ; cl-launch -l ccl -Q -sp asdf-tools -r entry-point -- "$@" +#| -*- Lisp -*- +case "$LISP" in + # CCL is our default because it is the single free software implementation that has + # decent portable support on all of Windows, Linux (x64, x86, ARM), MacOS X + ""|ccl) exec ${CCL:-ccl} --no-init --load "$0" -- "$@" ;; + + allegro) ${ALLEGRO:-alisp} -qq -e "(setf *load-verbose* nil)" -L "$0" -- "$@" ;; + + sbcl) exec ${SBCL:-sbcl} --noinform --no-userinit --no-sysinit --script "$0" "$@" ;; + + # Let cl-launch choose its preferred Lisp + cl-launch) cl-launch -Q -sp asdf-tools -r entry-point -- "$@" ;; + + # asdf-tools could actually run on any implementation, if you configured it above. + *) echo >&2 "Unknown Lisp $LISP" ; exit 2 +esac ; exit |# (in-package :cl-user) ;; That may be default, but let's make double sure and tell SLIME. @@ -12,9 +21,11 @@ portable support on all of Windows, Linux (x64, x86, ARM), MacOS X ;;; Ensure we load and configure this particular ASDF (eval-when (:compile-toplevel :load-toplevel :execute) (unless (member :cl-launch *features*) ;; (not necessary if we're invoked via cl-launch) - (load (make-pathname - :name "load-asdf" :type "lisp" :defaults - (or *compile-file-truename* *load-truename* (truename *default-pathname-defaults*)))))) + (handler-bind ((warning #'muffle-warning)) ;; hush Allegro + (load (make-pathname + :name "load-asdf" :type "lisp" :defaults + (or *compile-file-truename* *load-truename* + (truename *default-pathname-defaults*))))))) ;;; ASDF3 is loaded, now use it! (in-package :asdf) diff --git a/tools/asdf-tools.bat b/tools/asdf-tools.bat index 2e5916c7df25200593ca498255db51614ee7c89b..aaa3ba3b01b82379a49fa7eab448a8b586569228 100644 --- a/tools/asdf-tools.bat +++ b/tools/asdf-tools.bat @@ -1,16 +1,37 @@ @echo off + ::: By default. We use CCL. +if "%LISP%" == "" goto ccl +if "%LISP%" == "allegro" goto allegro +if "%LISP%" == "ccl" goto ccl +if "%LISP%" == "sbcl" goto sbcl + + +:ccl if "%CCL%" == "" set CCL=ccl -%CCL% --no-init --load %~dp0\asdf-tools -- %* - -::: To use SBCL instead (assuming its Windows support has been improved enough), -::: comment out the above lines, and uncomment these: -::if "%SBCL%" == "" set SBCL=sbcl -::%SBCL% --no-userinit --no-sysinit --script %~dp0\asdf-tools %* - -::: To use Allegro instead, -::: comment out the above lines, and uncomment these: -::if "%ALLEGRO%" == "" set ALLEGRO=alisp -:::Note that maybe you need something more like this (untested): -::ALLEGRO=c:\path\to\allegro\buildi.exe -I c:\path\to\allegro\alisp.dxl -::%ALLEGRO% --bat %~dp0\asdf-tools %* +%CCL% --no-init --load %~dp0asdf-tools -- %* +goto end + + +:sbcl +::: As of SBCL 1.2.13, SBCL's run-program fails to call CMD.EXE directly, so can't fully run asdf-tools +if "%SBCL%" == "" set SBCL=sbcl +%SBCL% --noinform --no-userinit --no-sysinit --script %~dp0asdf-tools %* +goto end + + +:allegro +if "%ALLEGRO%" == "" set ALLEGRO=alisp.exe +if "%~1" == "get_allegro_dir" goto get_allegro_dir +call %0 get_allegro_dir %ALLEGRO% %ALLEGRO%.exe +%ALLEGRODIR%buildi.exe -I %ALLEGRODIR%alisp.dxl -qq -e "(setf *load-verbose* nil)" -L %~dp0asdf-tools. -- %* +goto end +:get_allegro_dir +if not "%~dp$PATH:2" == "" ( set ALLEGRODIR=%~dp$PATH:2& goto end ) +if not "%~dp$PATH:3" == "" ( set ALLEGRODIR=%~dp$PATH:3& goto end ) +if not "%~dp2" == "" ( set ALLEGRODIR=%~dp2& goto end ) +goto end + + +::: Make sure this remains at the end +:end