Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • asdf/asdf
  • darabi/asdf
  • alendvai/asdf
  • dkochmanski/asdf
  • etimmons/asdf
  • adunn/asdf
  • mevenson/asdf
  • skatrevich/asdf
  • rmartinez/asdf
  • phousel/asdf
  • jmoringen/asdf
  • dverna/asdf
  • hishimaru/asdf
  • pbourguignon/asdf
  • arbv/asdf
  • vsedach/asdf
  • kpoeck/asdf
  • msimmons/asdf
  • loliveira/asdf
  • gpalter/asdf
  • eschulte/asdf
  • yitzchak/asdf
  • AlbertoEAF/asdf
  • drmeister/asdf
  • mathrick/asdf
25 results
Show changes
Commits on Source (3782)
(:source-registry-cache
"asdf.asd"
"uiop/asdf-driver.asd"
"uiop/uiop.asd"
"tools/asdf-tools.asd")
* export-subst
\ No newline at end of file
ext export-ignore
* export-subst
# really this is private to my build process
make/
common-lisp.net
.vcs
init-lisp.lisp
website/changelog.xml
# We build these at various stages in the make process
??
build
asdf.lisp
doc/cmucl/
doc/asdf/
doc/asdf.aux
doc/asdf.cp
doc/asdf.cps
doc/asdf.fn
doc/asdf.fns
doc/asdf.html
doc/asdf.info
doc/asdf.ky
doc/asdf.log
doc/asdf.pdf
doc/asdf.pg
doc/asdf.toc
doc/asdf.tps
doc/asdf.tp
doc/asdf.tps
doc/asdf.vr
doc/asdf.vrs
doc/asdf.t2d/
doc/asdf.dvi
doc/version.texinfo
doc/*.log
*.tmp
uiop/doc/uiop.html
uiop/doc/uiop.info
uiop/doc/uiop.pdf
uiop/doc/uiop.texinfo
LICENSE
website/output/
test-results/
lift-local.config
README.html
tmp/
man/
lib/
*.dribble
*.fasl
*.dfsl
*.cfsl
*.fas
*.fas[bcl]
*.fas
*.lib
*.[oahcisS]
*.*fsl
*.x86f
*.bak
*.data
*.ufasl
*.vbin
*.~*~
*.sse2f
test/try-reloading-dependency.asd
test/fileMissing.lisp
test/hello-world-example
test/test-include.asd
test/test-multiple-too.asd
build-stamp
# Although there is no debian subdir/ in this repo any more, the
# presence of these lines helps the debian package maintainers, so
# please leave them here.
debian/cl-asdf.debhelper.log
debian/cl-asdf.postinst.debhelper
debian/cl-asdf.prerm.debhelper
debian/cl-asdf.substvars
debian/cl-asdf/
debian/files
.pc
.DS_Store
core
# Hack: ignore the GNUmakefile here, so you can ln -s Makefile-lisp-scripting GNUmakefile
GNUmakefile
[submodule "ext/fare-utils"]
path = ext/fare-utils
url = https://gitlab.common-lisp.net/frideau/fare-utils.git
[submodule "ext/fare-quasiquote"]
path = ext/fare-quasiquote
url = https://gitlab.common-lisp.net/frideau/fare-quasiquote.git
[submodule "ext/fare-mop"]
path = ext/fare-mop
url = https://gitlab.common-lisp.net/frideau/fare-mop.git
[submodule "ext/closer-closer-mop"]
path = ext/closer-closer-mop
url = https://github.com/pcostanza/closer-mop.git
[submodule "ext/alexandria"]
path = ext/alexandria
url = https://gitlab.common-lisp.net/alexandria/alexandria.git
[submodule "ext/optima"]
path = ext/optima
url = https://github.com/m2ym/optima.git
[submodule "ext/named-readtables"]
path = ext/named-readtables
url = https://github.com/melisgl/named-readtables.git
[submodule "ext/inferior-shell"]
path = ext/inferior-shell
url = https://gitlab.common-lisp.net/qitab/inferior-shell.git
[submodule "ext/lisp-invocation"]
path = ext/lisp-invocation
url = https://gitlab.common-lisp.net/qitab/lisp-invocation.git
[submodule "ext/cl-ppcre"]
path = ext/cl-ppcre
url = https://github.com/edicl/cl-ppcre
[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
system := "asdf"
#user := $(shell basename `echo "$home"`)
user := "gking"
webhome_private := $(user)@common-lisp.net:/project/asdf/public_html/
webhome_public := "http://common-lisp.net/project/asdf/"
clnet_home := "/project/asdf/public_html/"
sourceDirectory := $(shell pwd)
lisps = allegro allegromodern ccl clisp sbcl
ifndef lisp
lisp := sbcl
endif
# website, tag, install
install: archive-copy
archive: FORCE
sbcl --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
--eval "(rewrite-license)" --eval "(quit)"
bin/build-tarball.sh
archive-copy: archive
bin/rsync-cp.sh tmp/asdf*.tar.gz $(webhome_private)/archives
bin/link-tarball.sh $(clnet_home) $(user)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
git push cl.net
website-copy: FORCE
bin/rsync-cp.sh website/output/ $(webhome_private)
bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private)
clean_dirs = $(sourceDirectory)
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl
clean: FORCE
@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
test: FORCE
@cd test; ./run-tests.sh $(lisp) $(test-regex)
echo "My foot is $?"
test-all: FORCE
@for lisp in $(lisps); do \
make test lisp=$$lisp; \
done
sbcl --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
--eval "(write-test-web-pages)" --eval "(quit)"
FORCE:
\ No newline at end of file
# 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
version := $(shell cat "version.lisp-expr")
#$(info $$version is [${version}])
version := $(patsubst "%",%,$(version))
#$(info $$version is [${version}])
fullversion := $(shell git describe --tags --match "[0-9][.][0-9]*" 2> /dev/null || echo $(version))
## 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
else
export CL_SOURCE_REGISTRY = ${ASDF_DEVEL_SOURCE_REGISTRY}
endif
else # no ASDF_DEVEL_SOURCE_REGISTRY
export CL_SOURCE_REGISTRY = ${sourceDirectory}/:${sourceDirectory}/uiop/:${sourceDirectory}/ext//
endif
#$(error "CL_SOURCE_REGISTRY is ${CL_SOURCE_REGISTRY}")
sys := $(shell uname -s)
ifneq (,$(findstring CYGWIN,$(sys)))
CL_SOURCE_REGISTRY := $(shell cygpath -pw "${CL_SOURCE_REGISTRY}")
endif
CP ?= cp
l ?= sbcl
UPCASE_L = $(shell echo '$(l)' | tr '[:lower:]' '[:upper:]')
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
# If you need to sudo in order to use docker, modify this.
DOCKER ?= docker
docker_tag ?= latest
DOCKER_IMAGE_ABCL ?= containers.common-lisp.net/cl-docker-images/abcl
DOCKER_IMAGE_ALLEGRO ?= containers.common-lisp.net/cl-docker-images/allegro
DOCKER_IMAGE_ALLEGROMODERN ?= containers.common-lisp.net/cl-docker-images/allegro
DOCKER_IMAGE_CCL ?= containers.common-lisp.net/cl-docker-images/ccl
DOCKER_IMAGE_CLISP ?= containers.common-lisp.net/cl-docker-images/clisp
DOCKER_IMAGE_CMUCL ?= containers.common-lisp.net/cl-docker-images/cmucl
DOCKER_IMAGE_ECL ?= containers.common-lisp.net/cl-docker-images/ecl
DOCKER_IMAGE_ECL_BYTECODES ?= containers.common-lisp.net/cl-docker-images/ecl
DOCKER_IMAGE_SBCL ?= containers.common-lisp.net/cl-docker-images/sbcl
header_lisp := header.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/version.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/launch-program.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
defsystem_lisp := upgrade.lisp session.lisp component.lisp operation.lisp system.lisp system-registry.lisp action.lisp lisp-action.lisp find-component.lisp forcing.lisp plan.lisp operate.lisp find-system.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp package-inferred-system.lisp output-translations.lisp source-registry.lisp backward-internals.lisp backward-interface.lisp interface.lisp user.lisp footer.lisp
all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
print-% : ; @echo $* = $($*)
# 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/bump-version ${v}
driver-files:
@echo $(driver_lisp)
defsystem-files:
@echo $(defsystem_lisp)
# FIXME: needs rewrite
#archive: build/asdf.lisp
# ./bin/asdf-builder make-and-publish-archive
archive: build/asdf.lisp
$(eval UIOPDIR := "uiop-$(version)")
mkdir -p build/$(UIOPDIR) # UIOP tarball
${CP} -pHux uiop/README.md uiop/uiop.asd uiop/asdf-driver.asd ${driver_lisp} uiop/contrib/debug.lisp build/$(UIOPDIR)
tar zcf "build/uiop-${version}.tar.gz" -C build $(UIOPDIR)
rm -r build/$(UIOPDIR)
$(eval ASDFDIR := "asdf-$(version)")
mkdir -p build/$(ASDFDIR) # asdf-defsystem tarball
${CP} -pHux build/asdf.lisp asdf.asd version.lisp-expr header.lisp README.md ${defsystem_lisp} build/$(ASDFDIR)
tar zcf "build/asdf-defsystem-${version}.tar.gz" -C build $(ASDFDIR)
rm -r build/$(ASDFDIR)
git archive --worktree-attributes --prefix="asdf-$(version)/" --format=tar -o "build/asdf-${version}.tar" ${version} #asdf-all tarball
gzip "build/asdf-${version}.tar"
${CP} "build/asdf.lisp" "build/asdf-${version}.lisp"
publish-archive:
rsync --times --chmod=a+rX,ug+w "build/uiop-${version}.tar.gz" "build/asdf-defsystem-${version}.tar.gz" \
"build/asdf-${version}.tar.gz" "build/asdf-${version}.lisp" common-lisp.net:/project/asdf/public_html/archives/
ssh common-lisp.net "cd /project/asdf/public_html/archives/; ln -sf uiop-${version}.tar.gz uiop.tar.gz; ln -sf asdf-defsystem-${version}.tar.gz asdf-defsystem.tar.gz; ln -sf asdf-${version}.tar.gz asdf.tar.gz; ln -sf asdf-${version}.lisp asdf.lisp"
### 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
# if you don't have the toolchain to build docs installed...
#doc: ;
website:
${MAKE} -C doc website
${MAKE} -C uiop/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/*"\" -delete; \
done; \
fi; \
echo "Cleaned $$dir"; \
done
echo "Done with cleaning loop."
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
${MAKE} -C doc clean
${MAKE} -C uiop/doc clean
mrproper:
git clean -xfd
test-upgrade: build/asdf.lisp show-version
./test/run-tests.sh -u ${l}
u: test-upgrade
test-clean-load: build/asdf.lisp show-version
./test/run-tests.sh -c ${l}
show-version:
@echo "Building and testing asdf $(fullversion)"
# test-glob has been replaced by t, and lisp by l, easier to type
test-lisp: build/asdf.lisp show-version
@cd test; ./run-tests.sh ${l} ${t}
t: test-lisp
# Useful for reproducing test failures with Docker. Allegro does not like it if
# the user we're running as has no entry in /etc/passwd. So we make a user
# first and then execute the command as that user.
test-docker-repl:
@${DOCKER} run --rm -i -t -e I_AGREE_TO_ALLEGRO_EXPRESS_LICENSE=yes -v $(sourceDirectory):$(sourceDirectory) -w $(sourceDirectory)/test $(DOCKER_IMAGE_$(UPCASE_L)):${docker_tag} bash -c "adduser --uid $(shell id -u) --gecos 'ASDF tester' --disabled-password --no-create-home user && su user -c \"$($(UPCASE_L))\""
# Allegro does not like it if the user we're running as has no entry in
# /etc/passwd. So we make a user first and then execute the command as that
# user.
test-docker-lisp: build/asdf.lisp show-version
${DOCKER} run --rm -i -t -e I_AGREE_TO_ALLEGRO_EXPRESS_LICENSE=yes -v $(sourceDirectory):$(sourceDirectory) -w $(sourceDirectory) $(DOCKER_IMAGE_$(UPCASE_L)):${docker_tag} bash -c "adduser --uid $(shell id -u) --gecos 'ASDF tester' --disabled-password --no-create-home user && su user -c \"make test-lisp l=$(l) t=$(t)\""
td: test-docker-lisp
test: test-lisp test-clean-load test-load-systems
test-load-systems: build/asdf.lisp show-version
./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 t=${t}|| 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
# 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 show-version \
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
# -*- Makefile -*- This minimal Makefile delegates most work to the asdf-tools script
#
# End-Users, all you need to do is:
# make -f Makefile-lisp-scripting
#
# Vendors, you may want to test your implementation with:
# make -f Makefile-lisp-scripting 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 -f Makefile-lisp-scripting 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 -f Makefile-lisp-scripting 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 -f Makefile-lisp-scripting bump v=3.2.1
# or
# ./make-asdf.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-asdf.bat
else
MAKE_SCRIPT := ./make-asdf.sh
endif
all ext noext driver_files defsystem_files build_asdf build_asdf_tools: force
${MAKE_SCRIPT} $@
build/asdf.lisp: build_asdf
build/asdf-tools build/asdf-tools.exe: build_asdf_tools
.PHONY: force all ext noext driver_files defsystem_files build_asdf build_asdf_tools
# The text below was automaticaly generated by
# make -f Makefile-lisp-scripting --silent makefile-targets
# then manually inserted here to provide for completion:
.PHONY: archive build-asdf build-asdf-tools 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 show-version t test test-all test-all-basic 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
archive build-asdf build-asdf-tools 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 show-version t test test-all test-all-basic 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' $@
ASDF: another system definition facility
========================================
If you want to use ASDF to load systems, see the getting
started guide at:
http://common-lisp.net/project/asdf/getting-started.html
If you want to define your own systems, see the manual at:
http://common-lisp.net/project/asdf/manual.html
More information and additional links can be found on ASDF's
home page at:
http://common-lisp.net/project/asdf
last updated Saturday; July 18, 2009, 10:20 AM EDT
ASDF: Another System Definition Facility
========================================
For general information about ASDF, consult the web page:
<https://common-lisp.net/project/asdf/>
For some reference documentation, read the manual:
<https://common-lisp.net/project/asdf/asdf.html>
For a guide on how to use it, read our "best practices" document:
<https://github.com/fare/asdf/blob/master/doc/best_practices.md>
Below is a guide for ASDF developers. It is not meant for ASDF users.
[TOC]
Building ASDF
-------------
First, make sure ASDF is checked out under a path registered to the source-registry,
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/
or, assuming your implementation provides ASDF 3.1 or later:
~/common-lisp/asdf/
If you cloned our git repository rather than extracted a tarball,
bootstrap a copy of `build/asdf.lisp` with:
make
Building the documentation
--------------------------
The manual is also in the [doc/](doc/) subdirectory, and can be prepared with:
make -C doc
Testing ASDF
------------
Before you may run tests, you need a few CL libraries.
The simplest way to get them is as follows, but read below:
make ext
_NOTA BENE_: You may also need to run `make ext` again
after you `git pull` or switch branch, to update the `ext/` directory.
This unhappily is not automatic.
If for some reason tests fail, particularly due to an error
compiling, loading or running a library, then run `make ext` and try again.
The above `make` target uses `git submodule update --init` to download
all these libraries using git. If you don't otherwise maintain your
own set of carefully controlled CL libraries, that's what you want to use.
However, it is only available if you have a git checkout of ASDF;
not if you used a tarball.
If you use a tarball or otherwise 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`, `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 may NOT want to use the git submodules from `make ext`;
you may undo a `make ext` with `make noext`.
Otherwise, if you want to let ASDF download known-working versions
of its dependencies, you can do it with `make ext`.
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
Lisp Scripting test system
--------------------------
ASDF by default uses a shell script in `./test/run-tests.sh` to run the scripts
that orchestrate its tests.
An alternate build and test system is available
that uses Common Lisp as a scripting language.
It is disabled by default because
the new maintainer is having trouble with it in some of his environments.
It worked fine for the previous maintainer in his environments,
and may be particularly useful on Windows if and when
the shell-based test system fails or is not available.
Its source code is in [tools/](tools/) and
you can invoke it without going through GNU make,
using the script [make-asdf.sh](make-asdf.sh),
or, on Windows, [make-asdf.bat](make-asdf.bat).
To use this alternate test system, pass to `make` the extra arguments `-f Makefile-lisp-scripting`
as in for instance:
make -f Makefile-lisp-scripting t l=sbcl
Or you can make that your local default (assuming GNU make) using:
echo "include Makefile-lisp-scripting" > GNUmakefile
These Lisp tools by default use Clozure Common Lisp (CCL) to build and run a binary
`build/asdf-tools` that will orchestrate the 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 we recommend SBCL 1.3.13 or later when on Windows.)
Note that the executable `build/asdf-tools` is built
the first time you test ASDF.
When you update ASDF, via e.g. `git pull` or a branch switch,
you may have to update it, with:
make -f Makefile-lisp-scripting build-asdf-tools
The reason this is not done automatically every time is because
building it depends on a working ASDF;
but when you're modifying ASDF and testing it, you cannot rely on a working ASDF:
indeed, a developer may not only make mistakes, but may deliberately
introduce or re-introduce bugs at some place to test code in another place.
Contributing to ASDF
--------------------
Bugs can be filled on ASDF by reporting them on the [Gitlab issue
tracker](https://gitlab.common-lisp.net/asdf/asdf/-/issues) or sending them to
the [asdf-devel mailing list](https://mailman.common-lisp.net/listinfo/asdf-devel).
You can contribute code to ASDF development by forking the
[repository](https://gitlab.common-lisp.net/asdf/asdf) and sending a merge
request or sending a patch to the asdf-devel mailing list.
If you fork the repository on Gitlab, note that Gitlab CI is enabled to help in
automated testing. While not exhaustive, this can help make sure you don't
inadvertantly break anything with your patch! The tests will be run any time
you submit a merge request or manually trigger a run using Gitlab's UI.
If you would like to run ASDF's upgrade tests you need to first ensure your
fork contains the tags for every released version of ASDF. If your fork is
freshly created, this will happen automatically. However, if there has been a
release since you forked, you need to update your tags. Assuming that your fork
is the `origin` remote and upstream is the `upstream` remote, you can do this
by running:
git fetch upstream --tags
git push origin --tags
Then set the varialbe `RUN_UPGRADE_TESTS` on a pipeline.
If you would like to enable test jobs that use the Lisp scripting test harness,
set the variable `ENABLE_ASDF_TOOLS` on a pipeline.
Debugging ASDF
--------------
To interactively debug ASDF, you may load it in such a way that `M-.` will work,
by installing the source code, and running:
(map () 'load (asdf:input-files :monolithic-concatenate-source-op "asdf/defsystem"))
To interactively use the `asdf-tools`, you need to either have
all its dependencies installed and configured.
If you're using them through the `ext/` directory and `make ext`,
then you may need to emulate
what the script in [tools/asdf-tools](tools/asdf-tools) does
with respect to initializing the source-registry.
Note that it also declares a system for `cl-launch/dispatch`;
you can either do something similar, or expand the source for `cl-launch` with
`make -C ext/cl-launch source` so `cl-launch.asd` will be created.
Using ASDF internals
--------------------
If you have to use or extend internal functionality not currently exported by
ASDF, please contact us and have us negotiate a proper, stable, tested interface
that you can actually rely on. Also, please *DO NOT* refer to specific
subpackages such as `asdf/find-system` from the outside of ASDF, because
functions may occasionally be moved from one internal package to the other,
without notification. They have in the past and will in the future.
Instead, when refering to symbols in ASDF, we recommend you either have
your package `:use` the package `:asdf` or `:import-from` it, or that
you shall use `asdf:` or `asdf::` as a prefix to the symbols.
And once again, please contact us if you have to use non-exported symbols.
Also, the normal way of extending ASDF is to use our class hierarchies for
`component` and `operation` and to define methods on `component-depends-on`,
`perform`, `input-files`, `output-files`.
A common mistake seems to be that some people define methods on `operate`,
which usually is not at all what they think it is.
How do I navigate this source tree?
-----------------------------------
* [asdf.asd](asdf.asd)
* The system definition for building ASDF with ASDF.
* `*.lisp`
* The source code files for `asdf/defsystem`.
See [asdf.asd](asdf.asd) for the order in which they are loaded.
All exported functions should have docstrings,
and all internal functions should have comments.
If any definition is insufficiently documented,
please tell us: that's a bug.
* [uiop/](uiop/)
* Utilities of Implementation- and OS- Portability,
the portability layer of ASDF. It has its own [README](uiop/README.md),
and exported functions should all have docstrings and other ones comment,
or once again it's a bug.
* [Makefile](Makefile)
* The classical `Makefile` used for development purposes.
Regular users only need to call `make` with the default target.
Developers will typically use the like of
`make t l=sbcl` or `make u l=ccl`.
* [bin/](bin/)
* [bump-version](bin/bump-version) --
a script to bump the version of ASDF, used by the classic `Makefile`.
Use it with e.g. `./bin/bump-version 3.4.5`
to test with the next version number before you release.
NB: ASDF's version number notably affects the behavior of ASDF
with respect to deprecated functions.
* [tools/](tools/)
* `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.
Check the `.asd` file for the order in which to read them.
* 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 as a standalone script.
* [Makefile-lisp-scripting](Makefile-lisp-scripting),
[make-asdf.sh](make-asdf.sh) and [make-asdf.bat](make-asdf.bat)
* Minimal Makefile and scripts to invoke
the lisp scripting variants of the build system.
* [version.lisp-expr](version.lisp-expr)
* The current version. Bumped up every time the code changes, using:
make bump
* [doc/](doc/)
* Documentation for ASDF, including:
* [index.html](doc/index.html) --
the web page for <http://common-lisp.net/project/asdf/>
* [asdf.texinfo](doc/asdf.texinfo) -- our manual
* [Makefile](doc/Makefile) -- how to build the manual
* [cclan.png](doc/cclan.png) [lisp-logo120x80.png](doc/lisp-logo120x80.png)
[style.css](doc/style.css) [favicon.ico](doc/favicon.ico)
-- auxiliaries of [index.html](doc/index.html)
* [test/](test/)
* Regression test scripts (and ancillary files) for developers to check
that they don't unintentionally break any of the functionality of ASDF.
They are far from covering all of ASDF, but they are a good start.
* [script-support.lisp](test/script-support.lisp) --
the common test infrastructure used by our tests
* [run-tests.sh](test/run-tests.sh) --
the shell script used by the classic `Makefile` to run tests.
It is not used by the Lisp scripting variant of the `Makefile`.
* [contrib/](contrib/)
* A few contributed files that show case how to use ASDF
or help with debugging it or debugging programs that use it.
* [debian/](debian/)
* Files for packaging on Debian, Ubuntu, etc.
(now only present in the debian branch).
* [build/](build/)
* Where the `Makefile` and `asdf-tools` store their output files,
including:
* `asdf.lisp` -- the current one-file deliverable of ASDF
* `asdf-*.lisp` -- for upgrade test purposes, old versions
* `asdf-tools` -- the executable for asdf-tools (.exe on Windows)
* `results/` -- logs of tests that have been run
* `fasls/` -- output files while running tests
* [ext/](ext/)
* External dependencies, that can be populated with `make ext`
or equivalently with `git submodule update --init`.
Depopulate it with `make noext`
or equivalently with: `submodule deinit .`
* [README.md](README.md)
* This file.
* [TODO](TODO)
* Plenty of ideas for how to further improve ASDF
(not all of them guaranteed good ideas.)
* [gitlab-ci.yml](gitlab-ci.yml)
* A YAML file describing jobs for Gitlab CI to run.
This diff is collapsed.
This diff is collapsed.
#|| sh asdf-install.lisp will compile this file to an exe called asdf-install
sbcl <<EOF
(require 'sb-executable)
(compile-file "asdf-install.lisp")
(sb-executable:make-executable "asdf-install" *)
EOF
exit 0
||#
;;; Install an ASDF system or anything else that looks convincingly
;;; like one, including updating symlink for all the toplevel .asd files it
;;; contains
;;; If the file $HOME/.asdf-install exists, it is loaded. This can be
;;; used to override the default values of exported special variables
;;; (see the defpackage form for details) - however, most of them are
;;; sensible and/or taken from the environment anyway
#||
TODO:
a) gpg signature checking would be better if it actually checked against
a list of "trusted to write Lisp" keys, instead of just "trusted to be
who they say they are"
d) in sbcl 0.8.1 we'll have a run-program that knows about $PATH and so
won't need to hardcode gpgpgpgp and tar locations.
e) nice to have: resume half-done downloads instead of starting from scratch
every time. but right now we're dealing in fairly small packages, this is not
an immediate concern
||#
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require 'asdf)
(require 'sb-posix)
(require 'sb-executable)
(require 'sb-bsd-sockets))
(defpackage :asdf-install
(:use "CL" "SB-EXT" "SB-BSD-SOCKETS")
(:export #:*proxy* #:*cclan-mirror* #:*sbcl-home*
#:*verify-gpg-signatures* #:*locations*))
(defpackage :asdf-install-customize
(:use "CL" "SB-EXT" "SB-BSD-SOCKETS" "ASDF-INSTALL"))
(in-package :asdf-install)
(defvar *proxy* (posix-getenv "http_proxy"))
(defvar *cclan-mirror*
(or (posix-getenv "CCLAN_MIRROR")
"http://ftp.linux.org.uk/pub/lisp/cclan/"))
(defun directorify (name)
;; input name may or may not have a training #\/, but we know we
;; want a directory
(let ((path (pathname name)))
(if (pathname-name path)
(merge-pathnames
(make-pathname :directory `(:relative ,(pathname-name path))
:name "")
path)
path)))
(defvar *sbcl-home* (directorify (posix-getenv "SBCL_HOME")))
(defvar *dot-sbcl*
(merge-pathnames (make-pathname :directory '(:relative ".sbcl"))
(user-homedir-pathname)))
(defvar *verify-gpg-signatures* t)
(defvar *locations*
`((,(merge-pathnames "site/" *sbcl-home*)
,(merge-pathnames "site-systems/" *sbcl-home*)
"System-wide install")
(,(merge-pathnames "site/" *dot-sbcl*)
,(merge-pathnames "systems/" *dot-sbcl*)
"Personal installation")))
(let* ((*package* (find-package :asdf-install-customize))
(file (probe-file (merge-pathnames
(make-pathname :name ".asdf-install")
(user-homedir-pathname)))))
(when file (load file)))
(define-condition download-error (error)
((url :initarg :url :reader download-url)
(response :initarg :response :reader download-response))
(:report (lambda (c s)
(format s "Server responded ~A for GET ~A"
(download-response c) (download-url c)))))
(define-condition signature-error (error)
((cause :initarg :cause :reader signature-error-cause))
(:report (lambda (c s)
(format s "Cannot verify package signature: ~A"
(signature-error-cause c)))))
(defun url-host (url)
(assert (string-equal url "http://" :end1 7))
(let* ((port-start (position #\: url :start 7))
(host-end (min (or (position #\/ url :start 7) (length url))
(or port-start (length url)))))
(subseq url 7 host-end)))
(defun url-port (url)
(assert (string-equal url "http://" :end1 7))
(let ((port-start (position #\: url :start 7)))
(if port-start (parse-integer url :start port-start :junk-allowed t) 80)))
(defun url-connection (url)
(let ((s (make-instance 'inet-socket :type :stream :protocol :tcp))
(host (url-host url))
(port (url-port url)))
(socket-connect
s (car (host-ent-addresses (get-host-by-name (url-host (or *proxy* url)))))
(url-port (or *proxy* url)))
(let ((stream (socket-make-stream s :input t :output t :buffering :full)))
;; we are exceedingly unportable about proper line-endings here.
;; Anyone wishing to run this under non-SBCL should take especial care
(format stream "GET ~A HTTP/1.0~%Host: ~A~%Cookie: CCLAN-SITE=~A~%~%"
url host *cclan-mirror*)
(force-output stream)
(list
(let* ((l (read-line stream))
(space (position #\Space l)))
(parse-integer l :start (1+ space) :junk-allowed t))
(loop for line = (read-line stream nil nil)
until (or (null line) (eql (elt line 0) (code-char 13)))
collect
(let ((colon (position #\: line)))
(cons (intern (string-upcase (subseq line 0 colon)) :keyword)
(string-trim (list #\Space (code-char 13))
(subseq line (1+ colon))))))
stream))))
(defun download (package-name-or-url file-name)
(let ((url
(if (= (mismatch package-name-or-url "http://") 7)
package-name-or-url
(format nil "http://www.cliki.net/~A?download"
package-name-or-url))))
(destructuring-bind (response headers stream)
(block got
(loop
(destructuring-bind (response headers stream) (url-connection url)
(unless (member response '(301 302))
(return-from got (list response headers stream)))
(close stream)
(setf url (cdr (assoc :location headers))))))
(if (>= response 400)
(error 'download-error :url url :response response))
(let ((length (parse-integer
(or (cdr (assoc :content-length headers)) "")
:junk-allowed t)))
(format t "Downloading ~A bytes from ~A ..."
(if length length "some unknown number of") url)
(force-output)
(with-open-file (o file-name :direction :output)
(if length
(let ((buf (make-array length
:element-type
(stream-element-type stream) )))
(read-sequence buf stream)
(write-sequence buf o))
(sb-executable:copy-stream stream o))))
(close stream)
(terpri)
;; seems to have worked. let's try for a detached gpg signature too
(when *verify-gpg-signatures*
(verify-gpg-signature url file-name)))))
(defun verify-gpg-signature (url file-name)
(destructuring-bind (response headers stream)
(url-connection (concatenate 'string url ".asc"))
(declare (ignore headers))
(unwind-protect
(if (= response 200)
;; sadly, we can't pass the stream directly to run-program,
;; because (at least in sbcl 0.8) that ignores existing buffered
;; data and only reads new fresh data direct from the file
;; descriptor
(let ((data (make-string (parse-integer
(cdr (assoc :content-length headers))
:junk-allowed t))))
(read-sequence data stream)
(let ((ret
(process-exit-code
(sb-ext:run-program "/usr/bin/gpg"
(list "--verify" "-"
(namestring file-name))
:output t
:input (make-string-input-stream data)
:wait t))))
(unless (zerop ret)
(error 'signature-error
:cause (make-condition
'simple-error
:format-control "GPG returned exit status ~A"
:format-arguments (list ret))))))
(error 'signature-error
:cause
(make-condition
'download-error :url (concatenate 'string url ".asc")
:response response)))
(close stream))))
(defun where ()
(format t "Install where?~%")
(loop for (source system name) in *locations*
for i from 1
do (format t "~A) ~A: ~% System in ~A~% Files in ~A ~%"
i name system source))
(format t " --> ") (force-output)
(let ((response (read)))
(when (> response 0)
(elt *locations* (1- response)))))
(defun install (source system packagename)
"Returns a list of asdf system names for installed asdf systems"
(ensure-directories-exist source )
(ensure-directories-exist system )
(let* ((tar
(with-output-to-string (o)
(or
(sb-ext:run-program "/bin/tar"
(list "-C" (namestring source)
"-xzvf" (namestring packagename))
:output o
:wait t)
(error "can't untar"))))
(dummy (princ tar))
(pos-slash (position #\/ tar))
(*default-pathname-defaults*
(merge-pathnames
(make-pathname :directory
`(:relative ,(subseq tar 0 pos-slash)))
source)))
(loop for asd in (directory
(make-pathname :name :wild :type "asd"))
do (let ((target (merge-pathnames
(make-pathname :name (pathname-name asd)
:type (pathname-type asd))
system)))
(when (probe-file target)
(sb-posix:unlink target))
(sb-posix:symlink asd target))
collect (pathname-name asd))))
(defvar *temporary-files*)
(defun temp-file-name (p)
(let* ((pos-slash (position #\/ p :from-end t))
(pos-dot (position #\. p :start (or pos-slash 0))))
(merge-pathnames
(make-pathname
:name (subseq p (if pos-slash (1+ pos-slash) 0) pos-dot)
:type "asdf-install-tmp"))))
(defun run (&optional (packages (cdr *posix-argv*)))
(destructuring-bind (source system name) (where)
(labels ((one-iter (packages)
(dolist (asd
(loop for p in packages
unless (probe-file p)
do (let ((tmp (temp-file-name p)))
(pushnew tmp *temporary-files*)
(download p tmp)
(setf p tmp))
end
do (format t "Installing ~A in ~A,~A~%" p source system)
append (install source system p)))
(handler-case
(asdf:operate 'asdf:load-op asd)
(asdf:missing-dependency (c)
(format t "Downloading package ~A, required by ~A~%"
(asdf::missing-requires c)
(asdf:component-name (asdf::missing-required-by c)))
(one-iter (list
(symbol-name (asdf::missing-requires c)))))))))
(one-iter packages))))
(handler-case
(let ((*temporary-files* nil))
(unwind-protect
(run)
(dolist (l *temporary-files*)
(when (probe-file l) (delete-file l)))))
(error (c)
(princ "Install failed due to error:") (terpri)
(princ c) (terpri)
(quit :unix-status 1)))
;(quit)
\ No newline at end of file
;;; -*- mode: lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
;;; Free Software available under an MIT-style license. ;;;
;;; ;;;
;;; Copyright (c) 2001-2019 Daniel Barlow and contributors ;;;
;;; ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :asdf)
;; We can't rely on it being defined in uiop.asd, since that file isn't loaded.
(defun call-without-redefinition-warnings (thunk)
(handler-bind (((or
#+allegro simple-warning
#+clozure ccl:compiler-warning
#+cmucl kernel:simple-style-warning
#-(or allegro clozure cmucl) warning)
#'muffle-warning))
(funcall thunk)))
;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order.
#+asdf3
(defsystem "asdf/prelude"
:version (:read-file-form "version.lisp-expr")
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:encoding :utf-8
:components ((:file "header")))
#+asdf3
(defsystem "asdf/driver"
;; Since ASDF 3.3, asdf.asd can't afford to depend on reading uiop.asd,
;; which would cause circularity, since everything depends on reading asdf.asd.
;; Therefore, we can't "just" :depends-on ("uiop") like we used to do, and instead
;; we transclude the list of uiop component into this secondary system.
:pathname "uiop"
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:components #.(getf (read-file-form (subpathname *load-pathname* "uiop/uiop.asd") :at 2) :components))
#+asdf3
(defsystem "asdf/defsystem"
:licence "MIT"
:description "The defsystem part of ASDF"
:long-name "Another System Definition Facility"
:description "The portable defsystem for Common Lisp"
:long-description "ASDF/DEFSYSTEM is the de facto standard DEFSYSTEM facility for Common Lisp,
a successor to Dan Barlow's ASDF and Francois-Rene Rideau's ASDF2.
For bootstrap purposes, it comes bundled with UIOP in a single file, asdf.lisp."
:homepage "http://common-lisp.net/projects/asdf/"
:bug-tracker "https://launchpad.net/asdf/"
:mailto "asdf-devel@common-lisp.net"
:source-control (:git "git://common-lisp.net/projects/asdf/asdf.git")
:version (:read-file-form "version.lisp-expr")
:build-operation monolithic-concatenate-source-op
:build-pathname "build/asdf" ;; our target
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:depends-on ("asdf/prelude" "asdf/driver")
:encoding :utf-8
:components
((:file "upgrade")
(:file "session" :depends-on ("upgrade"))
(:file "component" :depends-on ("session"))
(:file "operation" :depends-on ("session"))
(:file "system" :depends-on ("component"))
(:file "system-registry" :depends-on ("system"))
(:file "action" :depends-on ("session" "system" "operation"))
(:file "lisp-action" :depends-on ("action"))
(:file "find-component" :depends-on ("component"))
(:file "forcing" :depends-on ("operation" "system-registry"))
(:file "plan" :depends-on ("lisp-action" "find-component" "forcing"))
(:file "operate" :depends-on ("plan"))
(:file "find-system" :depends-on ("system-registry" "operate"))
(:file "parse-defsystem" :depends-on ("system-registry" "lisp-action" "operate"
"find-system"))
(:file "bundle" :depends-on ("lisp-action" "parse-defsystem"))
(:file "concatenate-source" :depends-on ("bundle"))
(:file "package-inferred-system" :depends-on ("parse-defsystem"))
(:file "output-translations" :depends-on ("operate"))
(:file "source-registry" :depends-on ("find-system"))
(:file "backward-internals" :depends-on ("find-system" "parse-defsystem"))
(:file "backward-interface" :depends-on ("output-translations"))
(:file "interface" :depends-on
("parse-defsystem" "concatenate-source"
"output-translations" "source-registry" "package-inferred-system"
"backward-interface" "backward-internals"))
(:file "user" :depends-on ("interface"))
(:file "footer" :depends-on ("user"))))
(defsystem "asdf"
:author ("Daniel Barlow")
:maintainer ("Robert Goldman")
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.3.7.3" ;; to be automatically updated by make bump-version
:depends-on ()
:components ((:module "build" :components ((:file "asdf"))))
. #-asdf3 () #+asdf3
(:encoding :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
;; For most purposes, asdf itself specially counts as a builtin system.
;; If you want to link it or do something forbidden to builtin systems,
;; specify separate dependencies on uiop (aka asdf/driver) and asdf/defsystem.
:builtin-system-p t
:in-order-to ((prepare-op (monolithic-concatenate-source-op "asdf/defsystem")))))
This diff is collapsed.
This diff is collapsed.
;;;; -------------------------------------------------------------------------
;;; Backward-compatible interfaces
(uiop/package:define-package :asdf/backward-interface
(:recycle :asdf/backward-interface :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/session
:asdf/component :asdf/system :asdf/system-registry :asdf/operation :asdf/action
:asdf/lisp-action :asdf/plan :asdf/operate
:asdf/find-system :asdf/parse-defsystem :asdf/output-translations :asdf/bundle)
(:export
#:*asdf-verbose*
#:operation-error #:compile-error #:compile-failed #:compile-warned
#:error-component #:error-operation #:traverse
#:component-load-dependencies
#:enable-asdf-binary-locations-compatibility
#:operation-on-failure #:operation-on-warnings #:on-failure #:on-warnings
#:component-property
#:run-shell-command
#:system-definition-pathname #:system-registered-p #:require-system
#:explain
#+ecl #:make-build))
(in-package :asdf/backward-interface)
;; NB: the warning status of these functions may have to be distinguished later,
;; as some get removed faster than the others in client code.
(with-asdf-deprecation (:style-warning "3.2" :warning "3.4")
;; These conditions from ASDF 1 and 2 are used by many packages in Quicklisp;
;; but ASDF3 replaced them with somewhat different variants of uiop:compile-condition
;; that do not involve ASDF actions.
;; TODO: find the offenders and stop them.
(progn
(define-condition operation-error (error) ;; Bad, backward-compatible name
;; Used by SBCL, cffi-tests, clsql-mysql, clsql-uffi, qt, elephant, uffi-tests, sb-grovel
((component :reader error-component :initarg :component)
(operation :reader error-operation :initarg :operation))
(:report (lambda (c s)
(format s (compatfmt "~@<~A while invoking ~A on ~A~@:>")
(type-of c) (error-operation c) (error-component c)))))
(define-condition compile-error (operation-error) ())
(define-condition compile-failed (compile-error) ())
(define-condition compile-warned (compile-error) ()))
;; In Quicklisp 2015-05, still used by lisp-executable, staple, repl-utilities, cffi
(defun component-load-dependencies (component) ;; from ASDF 2.000 to 2.26
"DEPRECATED. Please use COMPONENT-SIDEWAY-DEPENDENCIES instead; or better,
define your operations with proper use of SIDEWAY-OPERATION, SELFWARD-OPERATION,
or define methods on PREPARE-OP, etc."
;; Old deprecated name for the same thing. Please update your software.
(component-sideway-dependencies component))
;; These old interfaces from ASDF1 have never been very meaningful
;; but are still used in obscure places.
;; In Quicklisp 2015-05, still used by cl-protobufs and clx.
(defgeneric operation-on-warnings (operation)
(:documentation "DEPRECATED. Please use UIOP:*COMPILE-FILE-WARNINGS-BEHAVIOUR* instead."))
(defgeneric operation-on-failure (operation)
(:documentation "DEPRECATED. Please use UIOP:*COMPILE-FILE-FAILURE-BEHAVIOUR* instead."))
(defgeneric (setf operation-on-warnings) (x operation)
(:documentation "DEPRECATED. Please SETF UIOP:*COMPILE-FILE-WARNINGS-BEHAVIOUR* instead."))
(defgeneric (setf operation-on-failure) (x operation)
(:documentation "DEPRECATED. Please SETF UIOP:*COMPILE-FILE-FAILURE-BEHAVIOUR* instead."))
(progn
(defmethod operation-on-warnings ((o operation))
*compile-file-warnings-behaviour*)
(defmethod operation-on-failure ((o operation))
*compile-file-failure-behaviour*)
(defmethod (setf operation-on-warnings) (x (o operation))
(setf *compile-file-warnings-behaviour* x))
(defmethod (setf operation-on-failure) (x (o operation))
(setf *compile-file-failure-behaviour* x)))
;; Quicklisp 2015-05: Still used by SLIME's swank-asdf (!), common-lisp-stat,
;; js-parser, osicat, babel, staple, weblocks, cl-png, plain-odbc, autoproject,
;; cl-blapack, com.informatimago, cells-gtk3, asdf-dependency-grovel,
;; cl-glfw, cffi, jwacs, montezuma
(defun system-definition-pathname (x)
;; As of 2.014.8, we mean to make this function obsolete,
;; but that won't happen until all clients have been updated.
"DEPRECATED. This function used to expose ASDF internals with subtle
differences with respect to user expectations, that have been refactored
away since. We recommend you use ASDF:SYSTEM-SOURCE-FILE instead for a
mostly compatible replacement that we're supporting, or even
ASDF:SYSTEM-SOURCE-DIRECTORY or ASDF:SYSTEM-RELATIVE-PATHNAME
if that's whay you mean." ;;)
(system-source-file x))
;; TRAVERSE is the function used to compute a plan in ASDF 1 and 2.
;; It was never officially exposed but some people still used it.
(defgeneric traverse (operation component &key &allow-other-keys)
(:documentation
"DEPRECATED. Use MAKE-PLAN and PLAN-ACTIONS, or REQUIRED-COMPONENTS,
or some other supported interface instead.
Generate and return a plan for performing OPERATION on COMPONENT.
The plan returned is a list of dotted-pairs. Each pair is the CONS
of ASDF operation object and a COMPONENT object. The pairs will be
processed in order by OPERATE."))
(progn
(define-convenience-action-methods traverse (operation component &key)))
(defmethod traverse ((o operation) (c component) &rest keys &key plan-class &allow-other-keys)
(plan-actions (apply 'make-plan plan-class o c keys)))
;; ASDF-Binary-Locations compatibility
;; This remains supported for legacy user, but not recommended for new users.
;; We suspect there are no more legacy users in 2016.
(defun enable-asdf-binary-locations-compatibility
(&key
(centralize-lisp-binaries nil)
(default-toplevel-directory
;; Use ".cache/common-lisp/" instead ???
(subpathname (user-homedir-pathname) ".fasls/"))
(include-per-user-information nil)
(map-all-source-files (or #+(or clasp clisp ecl mkcl) t nil))
(source-to-target-mappings nil)
(file-types `(,(compile-file-type)
"build-report"
#+clasp (compile-file-type :output-type :object)
#+ecl (compile-file-type :type :object)
#+mkcl (compile-file-type :fasl-p nil)
#+clisp "lib" #+sbcl "cfasl"
#+sbcl "sbcl-warnings" #+clozure "ccl-warnings")))
"DEPRECATED. Use asdf-output-translations instead."
#+(or clasp clisp ecl mkcl)
(when (null map-all-source-files)
(error "asdf:enable-asdf-binary-locations-compatibility doesn't support :map-all-source-files nil on CLISP, ECL and MKCL"))
(let* ((patterns (if map-all-source-files (list *wild-file*)
(loop :for type :in file-types
:collect (make-pathname :type type :defaults *wild-file*))))
(destination-directory
(if centralize-lisp-binaries
`(,default-toplevel-directory
,@(when include-per-user-information
(cdr (pathname-directory (user-homedir-pathname))))
:implementation ,*wild-inferiors*)
`(:root ,*wild-inferiors* :implementation))))
(initialize-output-translations
`(:output-translations
,@source-to-target-mappings
#+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname))
#+abcl (#p"/___jar___file___root___/**/*.*" (,@destination-directory))
,@(loop :for pattern :in patterns
:collect `((:root ,*wild-inferiors* ,pattern)
(,@destination-directory ,pattern)))
(t t)
:ignore-inherited-configuration))))
(progn
(defmethod operate :before (operation-class system &rest args &key &allow-other-keys)
(declare (ignore operation-class system args))
(when (find-symbol* '#:output-files-for-system-and-operation :asdf nil)
(error "ASDF 2 is not compatible with ASDF-BINARY-LOCATIONS, which you are using.
ASDF 2 now achieves the same purpose with its builtin ASDF-OUTPUT-TRANSLATIONS,
which should be easier to configure. Please stop using ASDF-BINARY-LOCATIONS,
and instead use ASDF-OUTPUT-TRANSLATIONS. See the ASDF manual for details.
In case you insist on preserving your previous A-B-L configuration, but
do not know how to achieve the same effect with A-O-T, you may use function
ASDF:ENABLE-ASDF-BINARY-LOCATIONS-COMPATIBILITY as documented in the manual;
call that function where you would otherwise have loaded and configured A-B-L."))))
;; run-shell-command from ASDF 2, lightly fixed from ASDF 1, copied from MK-DEFSYSTEM. Die!
(defun run-shell-command (control-string &rest args)
"PLEASE DO NOT USE. This function is not just DEPRECATED, but also dysfunctional.
Please use UIOP:RUN-PROGRAM instead."
#-(and ecl os-windows)
(let ((command (apply 'format nil control-string args)))
(asdf-message "; $ ~A~%" command)
(let ((exit-code
(ignore-errors
(nth-value 2 (run-program command :force-shell t :ignore-error-status t
:output *verbose-out*)))))
(typecase exit-code
((integer 0 255) exit-code)
(t 255))))
#+(and ecl os-windows)
(not-implemented-error "run-shell-command" "for ECL on Windows."))
;; HOW do we get rid of variables??? With a symbol-macro that issues a warning?
;; In Quicklisp 2015-05, cl-protobufs still uses it, but that should be fixed in next version.
(progn
(defvar *asdf-verbose* nil)) ;; backward-compatibility with ASDF2 only. Unused.
;; Do NOT use in new code. NOT SUPPORTED.
;; NB: When this goes away, remove the slot PROPERTY in COMPONENT.
;; In Quicklisp 2014-05, it's still used by yaclml, amazon-ecs, blackthorn-engine, cl-tidy.
;; See TODO for further cleanups required before to get rid of it.
(defgeneric component-property (component property))
(defgeneric (setf component-property) (new-value component property))
(defmethod component-property ((c component) property)
(cdr (assoc property (slot-value c 'properties) :test #'equal)))
(defmethod (setf component-property) (new-value (c component) property)
(let ((a (assoc property (slot-value c 'properties) :test #'equal)))
(if a
(setf (cdr a) new-value)
(setf (slot-value c 'properties)
(acons property new-value (slot-value c 'properties)))))
new-value)
;; This method survives from ASDF 1, but really it is superseded by action-description.
(defgeneric explain (operation component)
(:documentation "Display a message describing an action.
DEPRECATED. Use ASDF:ACTION-DESCRIPTION and/or ASDF::FORMAT-ACTION instead."))
(progn
(define-convenience-action-methods explain (operation component)))
(defmethod explain ((o operation) (c component))
(asdf-message (compatfmt "~&~@<; ~@;~A~:>~%") (action-description o c))))
(with-asdf-deprecation (:style-warning "3.3")
(defun system-registered-p (name)
"DEPRECATED. Return a generalized boolean that is true if a system of given NAME was registered already.
NAME is a system designator, to be normalized by COERCE-NAME.
The value returned if true is a pair of a timestamp and a system object."
(if-let (system (registered-system name))
(cons (if-let (primary-system (registered-system (primary-system-name name)))
(component-operation-time 'define-op primary-system))
system)))
(defun require-system (system &rest keys &key &allow-other-keys)
"Ensure the specified SYSTEM is loaded, passing the KEYS to OPERATE, but do not update the
system or its dependencies if it has already been loaded."
(declare (ignore keys))
(unless (component-loaded-p system)
(load-system system))))
;;; This function is for backward compatibility with ECL only.
#+ecl
(with-asdf-deprecation (:style-warning "3.2" :warning "9999")
(defun make-build (system &rest args
&key (monolithic nil) (type :fasl) (move-here nil move-here-p)
prologue-code epilogue-code no-uiop
prefix-lisp-object-files postfix-lisp-object-files extra-object-files
&allow-other-keys)
(let* ((operation (asdf/bundle::select-bundle-operation type monolithic))
(move-here-path (if (and move-here
(typep move-here '(or pathname string)))
(ensure-pathname move-here :namestring :lisp :ensure-directory t)
(system-relative-pathname system "asdf-output/")))
(extra-build-args (remove-plist-keys
'(:monolithic :type :move-here
:prologue-code :epilogue-code :no-uiop
:prefix-lisp-object-files :postfix-lisp-object-files
:extra-object-files)
args))
(build-system (if (subtypep operation 'image-op)
(eval `(defsystem "asdf.make-build"
:class program-system
:source-file nil
:pathname ,(system-source-directory system)
:build-operation ,operation
:build-pathname ,(subpathname move-here-path
(file-namestring (first (output-files operation system))))
:depends-on (,(coerce-name system))
:prologue-code ,prologue-code
:epilogue-code ,epilogue-code
:no-uiop ,no-uiop
:prefix-lisp-object-files ,prefix-lisp-object-files
:postfix-lisp-object-files ,postfix-lisp-object-files
:extra-object-files ,extra-object-files
:extra-build-args ,extra-build-args))
system))
(files (output-files operation build-system)))
(operate operation build-system)
(if (or move-here
(and (null move-here-p) (member operation '(program-op image-op))))
(loop :with dest-path = (resolve-symlinks* (ensure-directories-exist move-here-path))
:for f :in files
:for new-f = (make-pathname :name (pathname-name f)
:type (pathname-type f)
:defaults dest-path)
:do (rename-file-overwriting-target f new-f)
:collect new-f)
files))))
;;;; -------------------------------------------------------------------------
;;; Internal hacks for backward-compatibility
(uiop/package:define-package :asdf/backward-internals
(:recycle :asdf/backward-internals :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade :asdf/find-system)
(:export #:load-sysdef))
(in-package :asdf/backward-internals)
(with-asdf-deprecation (:style-warning "3.2" :warning "3.4")
(defun load-sysdef (name pathname)
(declare (ignore name pathname))
;; Needed for backward compatibility with swank-asdf from SLIME 2015-12-01 or older.
(error "Use asdf:load-asd instead of asdf::load-sysdef")))
#!/bin/sh
# write the highest tag to standard output
# exit code is 1 if it cannot be found
tag=`git describe --tags`
if [ "$tag" == "" ]; then
exit 1
fi
echo $tag
exit 0
#!/bin/sh
# create tarball and tagged asdf.lisp file in tmp/ using the most recent
# annotated tag
tag=`git describe --tags`
if [ "$tag" == "" ]; then
echo "Unable to find most recent tag, exiting"
exit 1
fi
if [ -d "tmp" ]; then
rm -r tmp
fi
mkdir tmp
archive_file="tmp/asdf-$tag.tar.gz"
echo "Create tmp/asdf.tar.gz with tag $tag"
git archive $tag --prefix="asdf/" --format=tar | \
gzip > $archive_file
echo "Extract tmp/asdf.lisp"
tar --to-stdout -zxf $archive_file asdf/asdf.lisp > tmp/asdf.lisp
#! /usr/bin/env perl
use FindBin;
use Getopt::Long;
our $old;
our $new;
our $usage = 0;
&GetOptions("help"=>\$usage,
"usage"=>\$usage);
if ($usage) {
print "$0 [old-version] [new-version]\n";
print "\tIf only one argument, treat it as the new version argument.\n";
print "\tIf two arguments treat the first as old version number and second as new.\n";
print "\n\tBumps the version numbers in all the relevant files.\n";
exit 0;
}
our $asdf_dir = $FindBin::RealBin . "/../";
our $file = $asdf_dir . "version.lisp-expr";
our @transform_ref =
(
[ "version.lisp-expr", "\"", "\"" ],
[ "uiop/version.lisp", "(defparameter *uiop-version* \"", "\")" ],
[ "asdf.asd", " :version \"", "\" ;; to be automatically updated by make bump-version" ],
[ "header.lisp", "This is ASDF ", ": Another System Definition Facility." ],
[ "upgrade.lisp", "(asdf-version \"", "\")" ],
[ "doc/asdf.texinfo", "Manual for Version ", "" ], );
if ($#ARGV == 1) {
$old = $ARGV[0];
$new = $ARGV[1];
} elsif ($#ARGV == 0) {
$new = $ARGV[0];
$old = read_asdf_version();
} else {
$old = read_asdf_version();
$new = bump_asdf_version($old);
}
print STDERR "Bumping from $old to $new\n";
transform_files();
sub read_asdf_version {
open(FILE, $file);
my $str = <FILE>;
chomp $str;
print STDERR "Read version string $str from $file\n";
close FILE;
$str =~ s/"//g;
return $str;
}
sub bump_asdf_version {
my $oldver = shift;
my @fields = split/\./, $oldver;
$fields[$#fields]++;
return join('.', @fields);
}
sub transform_files {
foreach my $entryptr (@transform_ref) {
my @entry = @{$entryptr};
my $file = $entry[0];
print STDERR "Modifying file $file\n";
print STDERR "Prefix is $entry[1], suffix is $entry[2]\n";
my $regex = "(" . quotemeta($entry[1]) . ")" . "((\\d+\\.)+\\d+)" . "(" . quotemeta($entry[2]) .")";
my $filename = $asdf_dir . $file;
my $data = read_text($filename);
my $count = ($data =~ s/$regex/$1$new$4/g);
if ($count == 0) {
die "Unable to replace $regex with $1$new$4";
}
# print STDERR "Writing $data to $filename\n";
write_text($filename, $data);
}
}
# can't reliably find File::Slurper, or File::Slurp, so do it
# old school.
sub read_text ($) {
my $fn = shift;
local $/ = undef;
open READFILE, $fn or die "Couldn't open file: $fn";
binmode READFILE;
my $string = <READFILE>;
close READFILE;
return $string;
}
sub write_text ($$) {
my $fn = shift;
my $data = shift;
open WRITEFILE, "> $fn" or die "Couldn't open $fn for writing.";
print WRITEFILE $data;
close WRITEFILE;
return 1;
}