Commit 31fcc8f6 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Support CCL, SBCL and Allegro alike in asdf-tools.

parent f6a72966
...@@ -102,11 +102,16 @@ of its dependencies, you can do it with: ...@@ -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. 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`, By defining and exporting the variable LISP to be one of `ccl`, `sbcl` or `allegro`, you
or that you export a variable `CCL` that points to the CCL executable. can have it use an alternate Common Lisp implementation instead.
To use a different Common Lisp implementation, suitably edit the script 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), [`tools/asdf-tools`](tools/asdf-tools),
or, on Windows, the batch file [`tools/asdf-tools.bat`](tools/asdf-tools.bat). 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 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 ...@@ -115,6 +120,10 @@ on a given Common Lisp implementation `$L`, with your favorite installed system
make t u l=$L s=$S make t u l=$L s=$S
To run only the regression test scripts, try simply:
make l=$L test-scripts
Debugging tip Debugging tip
------------- -------------
......
":" ; exec ${CCL:-ccl} --no-init --load "$0" -- "$@" ; exit # -*- Lisp -*- #| -*- Lisp -*-
#| case "$LISP" in
asdf-tools could also run on SBCL, or on any decent Common Lisp implementation, # CCL is our default because it is the single free software implementation that has
including using cl-launch, but CCL is the single implementation that has decent # decent portable support on all of Windows, Linux (x64, x86, ARM), MacOS X
portable support on all of Windows, Linux (x64, x86, ARM), MacOS X ""|ccl) exec ${CCL:-ccl} --no-init --load "$0" -- "$@" ;;
":" ; exec ${SBCL:-sbcl} --no-userinit --no-sysinit --script "$0" "$@" ; exit
":" ; cl-launch -l ccl -Q -sp asdf-tools -r entry-point -- "$@" 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. (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 ...@@ -12,9 +21,11 @@ portable support on all of Windows, Linux (x64, x86, ARM), MacOS X
;;; Ensure we load and configure this particular ASDF ;;; Ensure we load and configure this particular ASDF
(eval-when (:compile-toplevel :load-toplevel :execute) (eval-when (:compile-toplevel :load-toplevel :execute)
(unless (member :cl-launch *features*) ;; (not necessary if we're invoked via cl-launch) (unless (member :cl-launch *features*) ;; (not necessary if we're invoked via cl-launch)
(load (make-pathname (handler-bind ((warning #'muffle-warning)) ;; hush Allegro
:name "load-asdf" :type "lisp" :defaults (load (make-pathname
(or *compile-file-truename* *load-truename* (truename *default-pathname-defaults*)))))) :name "load-asdf" :type "lisp" :defaults
(or *compile-file-truename* *load-truename*
(truename *default-pathname-defaults*)))))))
;;; ASDF3 is loaded, now use it! ;;; ASDF3 is loaded, now use it!
(in-package :asdf) (in-package :asdf)
......
@echo off @echo off
::: By default. We use CCL. ::: 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 if "%CCL%" == "" set CCL=ccl
%CCL% --no-init --load %~dp0\asdf-tools -- %* %CCL% --no-init --load %~dp0asdf-tools -- %*
goto end
::: 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
::%SBCL% --no-userinit --no-sysinit --script %~dp0\asdf-tools %* ::: 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
::: To use Allegro instead, %SBCL% --noinform --no-userinit --no-sysinit --script %~dp0asdf-tools %*
::: comment out the above lines, and uncomment these: goto end
::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
::%ALLEGRO% --bat %~dp0\asdf-tools %* 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
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