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

Merge branch 'master' into syntax-control

parents 56d09edb 8315d238
(:source-registry-cache "asdf.asd" "uiop/asdf-driver.asd" "uiop/uiop.asd")
(:source-registry-cache
"asdf.asd"
"uiop/asdf-driver.asd"
"uiop/uiop.asd"
"tools/asdf-tools.asd")
......@@ -31,3 +31,9 @@
[submodule "ext/asdf-encodings"]
path = ext/asdf-encodings
url = https://gitlab.common-lisp.net/asdf/asdf-encodings.git
[submodule "ext/cl-scripting"]
path = ext/cl-scripting
url = https://github.com/fare/cl-scripting.git
[submodule "ext/cl-launch"]
path = ext/cl-launch
url = https://gitlab.common-lisp.net/xcvb/cl-launch.git
# Configuring this Makefile for your personal use:
# Set environment variable ASDF_TEST_LISPS to a space-separated list of values
# (see "defaultlisps" below, for an example).
# If you have a special way to find libraries that are used in the build and
# test process, you may bind ASDF_DEVEL_SOURCE_REGISTRY to a source registry to
# use (using the environment variable syntax), or bind it to "override" to use
# your normal CL source registry. Otherwise, it will use local copies of
# everything.
system := "asdf"
webhome_private := common-lisp.net:/project/asdf/public_html/
webhome_public := "http://common-lisp.net/project/asdf/"
clnet_home := "/project/asdf/public_html/"
sourceDirectory := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
#### Common Lisp implementations available for testing.
## export ASDF_TEST_LISPS to override the default list of such implementations,
## or specify a lisps= argument at the make command-line
defaultLisps = ccl clisp sbcl ecl ecl_bytecodes cmucl abcl scl allegro lispworks allegromodern gcl xcl mkcl
ifdef ASDF_TEST_LISPS
lisps ?= ${ASDF_TEST_LISPS}
else
lisps ?= ${defaultLisps}
endif
ifdef ASDF_UPGRADE_TEST_LISPS
ulisps ?= ${ASDF_UPGRADE_TEST_LISPS}
else
ifdef ASDF_TEST_LISPS
ulisps ?= ${ASDF_TEST_LISPS}
else
ulisps ?= ${defaultLisps}
endif
endif
## grep for #+/#- features in the test/ directory to see plenty of disabled tests on some platforms
## NOT SUPPORTED BY OUR AUTOMATED TESTS:
## cormancl genera lispworks-personal-edition rmcl
## Some are manually tested once in a while.
ifdef ASDF_TEST_SYSTEMS
s ?= ${ASDF_TEST_SYSTEMS}
endif
ifdef ASDF_DEVEL_SOURCE_REGISTRY
ifeq ($(ASDF_DEVEL_SOURCE_REGISTRY), override)
# do nothing... Use the user's CL_SOURCE_REGISTRY
# -*- Makefile -*- This minimal Makefile delegates most work to the asdf-tools script
#
# End-Users, all you need to do is:
# make
#
# Vendors, you may want to test your implementation with:
# make test l=sbcl
# BUT you first need have installed the development-time external dependencies of ASDF;
# this will be done automatically if you are using quicklisp;
# you can do it manually with your favorite tools (e.g. clbuild or git);
# or you can do it using `git submodule update` which is also available as:
# make ext
# To undo the `git submodule update` you can use: `make noext`
#
# Other targets are for maintainer use only. If you want a list of all of the targets, use
# make help
#
### Default fall back rule: delegate to asdf-tools.
# Note that the l= L= etc. are the only way I (Faré) have found to
# pass arguments from the Makefile to the underlying script:
# l= overrides $ASDF_TEST_LISPS to specify which lisp implementations to use
# L= overrides $ASDF_UPGRADE_TEST_LISPS (defaults to the former) to lisps during upgrade
# s= overrides $ASDF_TEST_SYSTEMS to specify systems with which to test ASDF
# t= overrides $ASDF_TESTS to specify test script patterns to use (default to *.script)
# u= overrides $ASDF_UPGRADE_TEST_TAGS to specify versions to upgrade from (e.g. 3.0.3 or REQUIRE)
# U= overrides $ASDF_UPGRADE_TEST_METHODS to specify upgrade methods
# v= overrides the default next version for bump-version or bump.
# see in tools/test-environment.lisp for details.
# Note that because of how make and the shell quote arguments,
# thou shalt not use the single-quote character in any of the short x= parameters
# (but you may use them in the long variant in the exported environment variable).
# To have a list of commands, see make help or ./tools/asdf-tools help
# Note that when you call ./tools/asdf-tools directly,
# you may have to use positional parameters instead (unless you use env as below), as in
# ./tools/asdf-tools bump 3.2.1
# instead of
# make bump v=3.2.1
# or
# ./make.sh v=3.2.1 bump
# or
# ./tools/asdf-tools env v=3.2.1 bump
# or
# v=3.2.1 ./tools/asdf-tools bump
ifeq ($(OS),Windows_NT)
MAKE_SCRIPT := cmd /c make.bat
else
export CL_SOURCE_REGISTRY = ${ASDF_DEVEL_SOURCE_REGISTRY}
MAKE_SCRIPT := ./make.sh
endif
else # no ASDF_DEVEL_SOURCE_REGISTRY
export CL_SOURCE_REGISTRY = ${sourceDirectory}/:${sourceDirectory}/uiop/:${sourceDirectory}/ext//:
endif
l ?= sbcl
ABCL ?= abcl
ALLEGRO ?= alisp
ALLEGROMODERN ?= mlisp
CCL ?= ccl
CLISP ?= clisp
CMUCL ?= cmucl
ECL ?= ecl
GCL ?= gcl
LISPWORKS ?= lispworks
MKCL ?= mkcl
SBCL ?= sbcl
SCL ?= scl
XCL ?= xcl
header_lisp := header.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/eval.lisp uiop/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
defsystem_lisp := upgrade.lisp component.lisp system.lisp cache.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp output-translations.lisp source-registry.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp
all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
# Making ASDF itself should be our first, default, target:
build/asdf.lisp: $(all_lisp)
mkdir -p build
rm -f $@
cat $(all_lisp) > $@
ext:
git submodule update --init
noext:
git submodule deinit .
# This quickly locates such mistakes as unbalanced parentheses:
load: build/asdf.lisp
./test/run-tests.sh -t $l $(all_lisp)
install: archive
bump: bump-version
git commit -a -m "Bump version to $$(eval a=$$(cat version.lisp-expr) ; echo $$a)"
temp=$$(cat version.lisp-expr); temp="$${temp%\"}"; temp="$${temp#\"}"; git tag $$temp
bump-version: build/asdf.lisp
./bin/asdf-builder bump-version ${v}
driver-files:
@echo $(driver_lisp)
defsystem-files:
@echo $(defsystem_lisp)
archive: build/asdf.lisp
./bin/asdf-builder make-and-publish-archive
### Count lines separately for asdf-driver and asdf itself:
wc:
@wc $(driver_lisp) | sort -n ; echo ; \
wc $(header_lisp) $(defsystem_lisp) | sort -n ; \
echo ; \
wc $(header_lisp) $(driver_lisp) $(defsystem_lisp) | tail -n 1
push:
git status
git push --tags cl.net release master
git push --tags github release master
git fetch
git status
# doc:
# ${MAKE} -C doc
# don't have the toolchain to build docs installed...
doc: ;
website:
${MAKE} -C doc website
clean_dirs = $(sourceDirectory)
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl ufasl o bak x86f vbin amd64f sparcf sparc64f hpf hp64f
clean:
@for dir in $(clean_dirs); do \
if test -d $$dir; then \
echo Cleaning $$dir; \
for ext in $(clean_extensions); do \
find $$dir \( -name "*.$$ext" \) \
-and -not -path \""*/.git/*"\" \
-and -not -path \""*/_darcs/*"\" \
-and -not -path \""*/tags/*"\" -print -delete; \
done; \
fi; \
done
rm -rf build/ LICENSE test/try-reloading-dependency.asd test/hello-world-example asdf.lisp
rm -rf test/hello-world-example.exe test/mkcl_*.dll # needed only on MS-Windows
rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap
${MAKE} -C doc clean
all ext noext driver_files defsystem_files: force
${MAKE_SCRIPT} $@
mrproper:
git clean -xfd
build_asdf build/asdf.lisp: force
${MAKE_SCRIPT} build_asdf
test-upgrade: build/asdf.lisp
./test/run-tests.sh -u ${l}
u: test-upgrade
.PHONY: force all ext noext driver_files defsystem_files build_asdf
test-clean-load: build/asdf.lisp
./test/run-tests.sh -c ${l}
# The text below was automaticaly generated by `make --silent makefile-targets`
# then manually inserted here to provide for completion:
.PHONY: archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
# test-glob has been replaced by t, and lisp by l, easier to type
test-lisp: build/asdf.lisp
@cd test; ./run-tests.sh ${l} ${t}
t: test-lisp
test: doc test-lisp test-clean-load test-load-systems
test-load-systems: build/asdf.lisp
./test/run-tests.sh -l ${l} ${s}
test-all-lisps: test-load-systems test-all-clean-load test-all-lisp test-all-upgrade
test-all-clean-load:
@for lisp in ${lisps} ; do ${MAKE} test-clean-load l=$$lisp || exit 1 ; done
test-all-lisp:
@for lisp in ${lisps} ; do ${MAKE} test-lisp l=$$lisp || exit 1 ; done
test-all-upgrade:
@for lisp in ${ulisps} ; do ${MAKE} test-upgrade l=$$lisp || exit 1 ; done
test-all-no-upgrade: doc test-load-systems test-all-clean-load test-all-lisp
test-all: test-all-no-upgrade test-all-upgrade
test-all-lisp-no-stop:
@for lisp in ${lisps} ; do ${MAKE} test-lisp l=$$lisp ; done ; :
test-all-upgrade-no-stop:
@for lisp in ${ulisps} ; do ${MAKE} test-upgrade l=$$lisp ; done ; :
test-all-no-upgrade-no-stop: doc test-load-systems test-all-clean-load test-all-lisp-no-stop
make --quiet check-all-test-results
test-all-no-stop: doc test-load-systems test-all-clean-load test-all-lisp-no-stop test-all-upgrade-no-stop
make --quiet check-all-results
check-all-test-results:
@A="`grep -L '[5-9][0-9] passing and 0 failing' build/results/*-test.text`" ; \
if [ -n "$$A" ] ; then \
echo "Unexpected test failures on these implementations:" ; \
echo "$$A" ; \
exit 1 ; \
fi
check-all-upgrade-results:
@A="`grep -L 'Upgrade test succeeded for ' build/results/*-upgrade.text`" ; \
if [ -n "$$A" ] ; then \
echo "Unexpected upgrade failures on these implementations:" ; \
echo "$$A" ; \
exit 1 ; \
fi
check-all-results:
@r=0 ; \
make --quiet check-all-test-results || r=1 ; \
make --quiet check-all-upgrade-results || r=1 ; \
exit $r
extract: extract-all-tagged-asdf
extract-all-tagged-asdf: build/asdf.lisp
./test/run-tests.sh -H
# 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
debian-package:
./bin/asdf-builder debian-package release
debian-package-from-master:
./bin/asdf-builder debian-package master
# Replace SBCL's ASDF with the current one. -- NOT recommended now that SBCL has ASDF2.
# for casual users, just use (asdf:load-system :asdf)
replace-sbcl-asdf: build/asdf.lisp
${SBCL} --eval '(compile-file "$<" :output-file (format nil "~Aasdf/asdf.fasl" (sb-int:sbcl-homedir-pathname)))' --eval '(quit)'
# Replace CCL's ASDF with the current one. -- NOT recommended now that CCL has ASDF2.
# for casual users, just use (asdf:load-system :asdf)
replace-ccl-asdf: build/asdf.lisp
${CCL} --eval '(progn(compile-file "$<" :output-file (compile-file-pathname (format nil "~Atools/asdf.lisp" (ccl::ccl-directory))))(quit))'
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE emp # It's not 1.37, it's 1.85! 1.37 is for the README.
# Delete wrongful tags from local repository
fix-local-git-tags:
for i in ${WRONGFUL_TAGS} ; do git tag -d $$i ; done
# Delete wrongful tags from remote repository
fix-remote-git-tags:
for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done
release-push:
git checkout master
git merge release
git checkout release
git merge master
git checkout master
TODO:
exit 2
release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists
.PHONY: install archive push doc website clean mrproper \
test-forward-references test test-lisp test-upgrade test-forward-references \
test-all test-all-lisps test-all-no-upgrade \
debian-package release \
replace-sbcl-asdf replace-ccl-asdf \
fix-local-git-tags fix-remote-git-tags wc wc-driver wc-asdf \
list-source-registry \
ext noext
# debug the source registry that will be used to execute commands from this Makefile.
list-source-registry:
${sourceDirectory}/bin/asdf-builder re '(uiop:writeln (sort (alexandria:hash-table-alist asdf::*source-registry*) `string< :key `car))'
# RELEASE or PUSH checklist:
# make test-all
# make test-load-systems s=fare-all
# make bump v=3.0
# edit debian/changelog # RELEASE only...
# git commit
# git tag 3.0 # for example ...
# make debian-package
# git push
# git push origin 3.0 # for example...
# everything from here for RELEASE only
# make release-push archive website debian-package
# dput mentors ../*.changes
# send debian mentors request
# send announcement to asdf-announce, asdf-devel, etc.
# Move all fixed bugs from Fix Committed -> Fix Released on launchpad
#
## Users don't release as above, only maintainers do.
## Users, all you need to do is: make
## Vendors, you may want to test your implementation with: make test l=sbcl
archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
${MAKE_SCRIPT} l='$l' L='$L' u='$u' U='$u' v='$v' s='$s' t='$t' $@
......@@ -9,15 +9,32 @@ Your Lisp implementation probably contains a copy of ASDF,
which you can load using `(require "asdf")`.
If you come from the C/C++ world, ASDF covers a bit of what each of
make, autoconf, dlopen and libc do for C programs:
`make`, `autoconf`, `dlopen` and `libc` do for C programs:
it orchestrates the compilation and dependency management,
handles some of the portability issues, dynamically finds and loads code,
and offers some portable system access library.
Except everything is different in Common Lisp, and ultimately much simpler,
though it requires acquiring some basic concepts.
though it does require acquiring some basic concepts.
Importantly, ASDF builds all software in the current Lisp image,
as opposed to building software into separate processes.
Where to find ASDF?
-------------------
ASDF's home page contains more information and additional links, and can be found at:
<https://common-lisp.net/project/asdf/>
The one and only official source control repository is at:
<https://gitlab.common-lisp.net/asdf/asdf>
The one and only official bug tracker is at:
<https://bugs.launchpad.net/asdf>
How to use ASDF?
----------------
To use ASDF, read our manual:
<http://common-lisp.net/project/asdf/asdf.html>
......@@ -36,8 +53,6 @@ ASDF 3 now includes an extensive runtime support library:
Its documentation unhappily lies mainly in the source code and docstrings.
See [uiop/README.md](uiop/README.md) for an introduction.
More information and additional links can be found on ASDF's home page at:
<http://common-lisp.net/project/asdf/>
Quick Start
......@@ -49,14 +64,15 @@ If it is recent enough (3.0 or later, check its `(asdf:asdf-version)`),
then it will automatically upgrade to the ASDF provided as source code,
assuming the source code in under a path registered by the source-registry.
If it isn't present or isn't recent enough, we recommend you install a recent
ASDF release using [tools/install-asdf.lisp](tools/install-asdf.lisp)
ASDF release into your implementation using [tools/install-asdf.lisp](tools/install-asdf.lisp)
Building and testing it
-----------------------
Building it
-----------
First, make sure ASDF is checked out under a path registered by the source-registry,
if that isn't the case yet (see the manual). One place would be:
if that isn't the case yet (see the [manual](http://common-lisp.net/project/asdf/asdf.html)).
One place would be:
~/.local/share/common-lisp/source/asdf/
......@@ -65,10 +81,15 @@ or, assuming your implementation provides ASDF 3.1 or later:
~/common-lisp/asdf/
If you cloned our git repository, bootstrap a copy of `build/asdf.lisp` with:
If you cloned our git repository, rather than extracted a tarball,
bootstrap a copy of `build/asdf.lisp` with:
make
Testing it
----------
Before you may run tests, you need a few CL libraries.
The simplest way to get them is as follows, but read below:
......@@ -80,24 +101,44 @@ own set of carefully controlled CL libraries, that's what you want to use.
However, if you do maintain your own set of carefully controlled CL libraries
then you will want to use whichever tools you use (e.g. `quicklisp`, `clbuild`,
or your own scripts around `git`) to download these libraries:
`alexandria`, `closer-mop`, `cl-ppcre`, `fare-mop`, `fare-quasiquote`,
`fare-utils`, `inferior-shell`, `lisp-invocation`, `named-readtables`, `optima`.
`alexandria`, `asdf-encodings`, `cl-launch`, `closer-mop`, `cl-ppcre`,
`cl-scripting`, `fare-mop`, `fare-quasiquote`, `fare-utils`, `inferior-shell`,
`lisp-invocation`, `named-readtables`, `optima`.
If you are a CL developer, you may already have them, or may want
to use your own tools to download a version of them you control.
If you use [Quicklisp](https://www.quicklisp.org/), you may let
Quicklisp download those you don't have.
In these cases, you do NOT want to use the git submodules from `make ext`.
In these cases, you may NOT want to use the git submodules from `make ext`.
Otherwise, if you want to let ASDF download known-working versions
of its dependencies, you can do it with:
make ext
To run all the tests on your favorite Lisp implementation `$L`,
choose your most elaborate installed system `$S`, and try:
ASDF by default uses Clozure Common Lisp (CCL) to run the scripts that orchestrate its tests.
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
a suitable Common Lisp implementation, you may run all the tests
on a given Common Lisp implementation `$L`, with your favorite installed system `$S`, using:
make t u l=$L s=$S
To run only the regression test scripts, try simply:
make l=$L test-scripts
Debugging tip
-------------
......@@ -139,13 +180,19 @@ How do I navigate this source tree?
and functions all have docstrings.
* [Makefile](Makefile)
* a `Makefile` for bootstrap and development purposes.
* a minimal `Makefile` for bootstrap and development purposes.
Most of the logic is in the [asdf-tools](tools/asdf-tools.asd) system below.
* [tools/](tools/)
* Some scripts to help ASDF users
* [load-asdf.lisp](tools/load-asdf.lisp) -- a build script to load, configure and use ASDF
* `asdf-tools`, a system to build, test and release ASDF. It includes:
* [asdf-tools](tools/asdf-tools) -- a shell script to run it as a shell command.
* [asdf-tools.bat](tools/asdf-tools.bat) -- a Windows batch file to run the above.
* [asdf-tools.asd](tools/asdf-tools.asd) -- system definition for asdf-tools
* `*.lisp` -- the source code for the `asdf-tools` system, except for the few files below.
* also a couple scripts to help ASDF users:
* [load-asdf.lisp](tools/load-asdf.lisp) -- a working example script to load, configure and use ASDF in a self-contained project
* [install-asdf.lisp](install-asdf.lisp) -- replace and update an implementation's ASDF
* [cl-source-registry-cache.lisp](cl-source-registry-cache.lisp) -- update a cache for the source-registry
* [cl-source-registry-cache.lisp](cl-source-registry-cache.lisp) -- update a cache for the source-registry as a standalone script.
* [build.xcvb](build.xcvb)
* The system definition for building ASDF with XCVB.
......@@ -154,7 +201,7 @@ How do I navigate this source tree?
* [version.lisp-expr](version.lisp-expr)
* The current version. Bumped up every time the code changes, using:
./tools/asdf-builder bump
make bump
* [doc/](doc/)
* documentation for ASDF, including:
......@@ -168,7 +215,7 @@ How do I navigate this source tree?
* [test/](test/)
* regression test scripts (and ancillary files) for developers to check
that they don't unintentionally break any of the functionality of ASDF.
Far from covering all of ASDF.
Far from covering all of ASDF, but a good start.
* [contrib/](contrib/)
* a few contributed files that show case how to use ASDF.
......@@ -195,4 +242,4 @@ How do I navigate this source tree?
* plenty of ideas for how to further improve ASDF.
Last updated Tuesday, June 9th, 2015.
Last updated Saturday, September 19th, 2015.
......@@ -113,7 +113,6 @@
*** it somehow pushes :non-base-chars-exist-p even though +non-base-chars-exist-p+ is NIL???
** XCL has bad bugs:
*** it can't compile ASDF3 anymore. Figure out why, if you have time.
*** make-pathname doesn't handle :type nil properly and
has massive lossage in logical-pathname support.
*** If using block () and return in search-for-system-definition
......@@ -378,7 +377,7 @@ It looks like SWANK can be fixed soon, though, so we'll see.
*** work with cl-test-grid to eliminate deferred warnings from quicklisp libraries
*** https://www.mail-archive.com/asdf-devel@common-lisp.net/msg03608.html
*** czak@google.com rewrote part of deferred warnings support.
Ask him for the code he implemented at Google.
Ask him to release the code he implemented at Google under QITAB.
** Ensure all run-program issues on Windows are solved.
*** SBCL cannot do raw CMD.EXE command-lines
......
......@@ -75,7 +75,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.1.5" ;; to be automatically updated by make bump-version
:version "3.1.6" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
......
":" ; exec sbcl --script "$0" "$@" ; exit # -*- Lisp -*-
;;;;; Really runs on any decent Common Lisp implementation
;;;;; Can also be invoked by cl-launch 4: cl-launch "$0" "$@"
;;; The code below exemplifies how to load and configure ASDF
;;; as part of your own deterministic build.
;;; See "User-configurable parts" for where you'd customize it to suit your build.
;;;
;;; Everything is MUCH simpler if you can assume your implementation has a recent-enough ASDF 3:
;;; just (require "asdf"), then configure in a subsequent eval-when form,
;;; in which you may then use asdf: and uiop: prefix.
;;;
;;; To use the user-configured ASDF rather than a deterministic self-contained project build,
;;; see instead how cl-launch 4.0.4 loads ASDF.
(in-package :cl-user) ;; That's may be default, but let's make double sure and tell SLIME.
;; Do everything in eval-when, so this works
;; whether this file is being loaded directly or compiled first.
(eval-when (:compile-toplevel :load-toplevel :execute)
(let* ((this (or *load-pathname* *compile-file-pathname*)))
(load (merge-pathnames (make-pathname :name "load-asdf" :type "lisp"
:directory '(:relative :back "tools")
:defaults this) this))))
(in-package :asdf)
(eval-when (:compile-toplevel :load-toplevel :execute)
(load-systems :cl-ppcre :fare-utils :inferior-shell))
(unless (featurep :cl-launch) (restore-image))
(defpackage :asdf-builder
(:use :cl :uiop :asdf/operate :asdf :fare-utils :inferior-shell)
(:shadow #:DBG))
(in-package :asdf-builder)
(uiop-debug)
(defun build-asdf ()
"Make sure asdf.lisp is built"
(load-system :asdf)
(values))
;;; ASDF directory
(defvar *asdf-dir*
(ensure-pathname (system-relative-pathname :asdf/defsystem ())
:want-physical t :want-absolute t
:want-existing t :truename t))
(defun pn (&rest x)
(subpathname *asdf-dir* (and x (uiop:resolve-relative-location x))))
(defun nn (&rest x)
(native-namestring (apply 'pn x)))
;;; UIOP directory
(defvar *uiop-dir* (pn "uiop/"))
;;; build directory
(defparameter *build-dir* (pn "build/"))
(defparameter /build-dir/ (nn "build/"))
(defun bpath (x &rest keys) (apply 'subpathname *build-dir* x keys))
(defparameter *version-file*
(pn "version.lisp-expr"))
(defparameter *version* (safe-read-file-form *version-file*))