Makefile 4.63 KB
Newer Older
1 2 3
# -*- Makefile -*- This minimal Makefile delegates most work to the asdf-tools script
#
# End-Users, all you need to do is:
4 5
#   make
#
6 7 8
# If you want a list of all of the new targets, use
#   make help
#
9 10
# Vendors, you may want to test your implementation with:
#   make test l=sbcl
11 12 13 14 15
# BUT you first need have installed the development-time external dependencies of ASDF,
# which will be done automatically if you are using quicklisp,
# which you can do manually with your favorite tools (e.g. clbuild or git), or
# which you can do using `git submodule update` which is also available as:
#   make ext
16
#
17 18
# Other targets are for maintainer use only.
#
Gary King's avatar
Gary King committed
19

20
l ?= sbcl
Gary King's avatar
Gary King committed
21

22 23 24 25
# Default action: bootstrap asdf.lisp
# That's the only thing that we really need before we may invoke asdf-builder.
all: build/asdf.lisp
	@: # This dummy action is necessary so the all target does not invoke the fallback action.
26

27 28
# Download all the development-time dependencies of ASDF:
ext:
29
	git submodule update --init
30

31 32 33 34
# Remove all the development-time dependencies of ASDF:
noext:
	for i in $$(git submodule foreach 'echo $$path') ; do git submodule deinit $$i ; done

35
header_lisp := header.lisp
36
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/image.lisp uiop/run-program.lisp uiop/lisp-build.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
37
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 backward-internals.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp backward-interface.lisp package-inferred-system.lisp interface.lisp user.lisp footer.lisp
38

39
# Making ASDF itself should be our first, default, target:
40
build/asdf.lisp: $(header_lisp) $(driver_lisp) $(defsystem_lisp)
41
	mkdir -p build
42
	rm -f $@
43
	cat $^ > $@
44

45
# These targets are used during tests to ensure the Makefile is in synch with the .asd files.
46 47 48
driver-files:
	@echo $(driver_lisp)

49 50 51
defsystem-files:
	@echo $(defsystem_lisp)

52 53
### exclude source files from fallback rule.
%.lisp:
54
	@:
55
Makefile:
56
	@:
57

58
### Default fall back rule: delegate to asdf-tools.
59 60 61 62 63 64 65 66 67 68
# 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.
69 70 71
# 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).
72 73 74 75 76 77 78 79
# 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
#   ./tools/asdf-tools env v=3.2.1 bump
80 81
# or
#   v=3.2.1 ./tools/asdf-tools bump
82
%: build/asdf.lisp
83
	./tools/asdf-tools env l='$l' L='$L' u='$u' U='$u' v='$v' s='$s' t='$t' $@
84

85
# This is the list of phony targets from this file
86
.PHONY: all driver-files defsystem-files ext force
87 88 89

# The text below was automaticaly generated by `make --silent makefile-targets`
# then manually inserted here to provide for completion:
90
archive build-asdf bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc 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-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
91
	./tools/asdf-tools env l='$l' L='$L' u='$u' U='$u' v='$v' s='$s' t='$t' $@