Makefile 7.49 KB
Newer Older
1
system	 	:= "asdf"
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
2
webhome_private := common-lisp.net:/project/asdf/public_html/
3 4 5 6
webhome_public	:= "http://common-lisp.net/project/asdf/"
clnet_home      := "/project/asdf/public_html/"
sourceDirectory := $(shell pwd)

7 8 9
#### 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
10 11 12
ifdef ASDF_TEST_LISPS
lisps ?= ${ASDF_TEST_LISPS}
else
13
lisps ?= ccl clisp sbcl ecl ecl_bytecodes cmucl abcl scl allegro lispworks allegromodern xcl gcl
14
endif
15 16 17 18 19
## NOT SUPPORTED BY OUR AUTOMATED TESTS:
##	cormancl genera lispworks-personal-edition mkcl rmcl
## Some are manually tested once in a while.
## MAJOR FAIL: gclcvs -- Compiler bug fixed upstream, but gcl fails to compile on modern Linuxen.
## grep for #+/#- features in the test/ directory to see plenty of disabled tests.
20 21 22
ifdef ASDF_TEST_SYSTEMS
s ?= ${ASDF_TEST_SYSTEMS}
endif
23

24
ifdef ASDF_DEVEL_SOURCE_REGISTRY
25
export CL_SOURCE_REGISTRY = ${ASDF_DEVEL_SOURCE_REGISTRY}
26 27
endif

28
l ?= sbcl
29

30 31 32
ABCL ?= abcl
ALLEGRO ?= alisp
ALLEGROMODERN ?= mlisp
33 34
CCL ?= ccl
CLISP ?= clisp
35
CMUCL ?= cmucl
36
ECL ?= ecl
37 38
GCL ?= gcl
LISPWORKS ?= lispworks
39
MKCL ?= mkcl
40
SBCL ?= sbcl
41
SCL ?= scl
42
XCL ?= xcl
43

44 45
# website, tag, install

46
header_lisp := header.lisp
47
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
48
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 backward-internals.lisp defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp backward-interface.lisp source-registry.lisp interface.lisp user.lisp footer.lisp
49
all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
50

51
# Making ASDF itself should be our first, default, target:
52
build/asdf.lisp: $(all_lisp)
53
	mkdir -p build
54
	cat $(all_lisp) > $@
55

56
# This quickly locates such mistakes as unbalanced parentheses:
57 58
load: build/asdf.lisp
	./test/run-tests.sh -t $l $(all_lisp)
59

60
install: archive
61

62
bump: bump-version
63
bump-version: build/asdf.lisp
64
	./bin/asdf-builder bump-version ${v}
65

66 67 68
driver-files:
	@echo $(driver_lisp)

69 70 71
defsystem-files:
	@echo $(defsystem_lisp)

72
archive: build/asdf.lisp
73
	./bin/asdf-builder make-and-publish-archive
74

75
### Count lines separately for asdf-driver and asdf itself:
76
wc:
77
	@wc $(driver_lisp) | sort -n ; echo ; \
78
	wc $(header_lisp) $(defsystem_lisp) | sort -n ; \
79
	echo ; \
80
	wc $(header_lisp) $(driver_lisp) $(defsystem_lisp) | tail -n 1
81

82 83 84
push:
	git status
	git push --tags cl.net release master
85
	git push --tags github release master
86 87
	git fetch
	git status
88

89 90 91
doc:
	${MAKE} -C doc

92
website:
93
	${MAKE} -C doc website
94 95

clean_dirs = $(sourceDirectory)
96
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl ufasl o bak x86f vbin amd64f sparcf sparc64f hpf hp64f
97

98
clean:
99 100 101 102 103 104 105 106 107 108 109
	@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
110
	rm -rf build/ LICENSE test/try-reloading-dependency.asd test/hello-world-example asdf.lisp
111
	rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap
112
	${MAKE} -C doc clean
113

114 115
mrproper:
	git clean -xfd
116

117
test-upgrade: build/asdf.lisp
118 119
	./test/run-tests.sh -u ${l}
u: test-upgrade
120

121
test-clean-load: build/asdf.lisp
122
	./test/run-tests.sh -c ${l}
123

124
# test-glob has been replaced by t, and lisp by l, easier to type
125
test-lisp: build/asdf.lisp
126
	@cd test; ./run-tests.sh ${l} ${t}
127
t: test-lisp
128

129 130
test: test-lisp test-clean-load test-load-systems doc

131
test-load-systems: build/asdf.lisp
132
	./test/run-tests.sh -l ${l} ${s}
133

134
test-all-lisps:
135
	${MAKE} test-load-systems
136
	@for lisp in ${lisps} ; do \
137
		${MAKE} test-lisp test-upgrade test-clean-load l=$$lisp || exit 1 ; \
138
	done
139

140
# test upgrade is a very long run... This does just the regression tests
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
141
test-all-no-upgrade:
142
	@for lisp in ${lisps} ; do \
143
		${MAKE} test-lisp test-clean-load l=$$lisp || exit 1 ; \
144 145
	done

146 147
test-all-upgrade:
	@for lisp in ${lisps} ; do \
148
		${MAKE} test-upgrade l=$$lisp || exit 1 ; \
149 150
	done

151 152 153 154
test-all: doc test-all-lisps

test-all-no-stop:
	-make doc ; for l in ${lisps} ; do make t l=$$l ; make u l=$$l ; done ; true
155

156
extract: extract-all-tagged-asdf
157
extract-all-tagged-asdf: build/asdf.lisp
158 159
	./test/run-tests.sh -H

160 161
# 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
162
debian-package: mrproper
163
	: $${RELEASE:="$$(git tag -l '3.[0-9].[0-9]' | tail -n 1)"} ; echo building package version $$RELEASE ; \
164
	git-buildpackage --git-debian-branch=release --git-upstream-branch=release --git-upstream-tag=$$RELEASE --git-tag --git-retag --git-ignore-branch
165

166 167 168 169 170
debian-package-from-master: mrproper
	: $${RELEASE:="$$(git tag -l '3.[0-9].[0-9]' | tail -n 1)"} ; echo building package version $$RELEASE ; \
	git-buildpackage --git-debian-branch=master --git-upstream-branch=master --git-upstream-tag=$$RELEASE --git-tag --git-retag --git-ignore-branch


171
# Replace SBCL's ASDF with the current one. -- NOT recommended now that SBCL has ASDF2.
172
# for casual users, just use (asdf:load-system :asdf)
173
replace-sbcl-asdf: build/asdf.lisp
174
	${SBCL} --eval '(compile-file "$<" :output-file (format nil "~Aasdf/asdf.fasl" (sb-int:sbcl-homedir-pathname)))' --eval '(quit)'
175

176
# Replace CCL's ASDF with the current one. -- NOT recommended now that CCL has ASDF2.
177
# for casual users, just use (asdf:load-system :asdf)
178
replace-ccl-asdf: build/asdf.lisp
179
	${CCL} --eval '(progn(compile-file "$<" :output-file (compile-file-pathname (format nil "~Atools/asdf.lisp" (ccl::ccl-directory))))(quit))'
180

181
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE # It's not 1.37, it's 1.85! 1.37 is for the README.
182 183 184 185 186
# 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
187
fix-remote-git-tags:
188 189
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

190 191 192 193 194 195 196
release-push:
	git checkout master
	git merge release
	git checkout release
	git merge master
	git checkout master

197 198 199 200
TODO:
	exit 2

release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists
201

202
.PHONY: install archive push doc website clean mrproper \
203
	test-forward-references test test-lisp test-upgrade test-forward-references \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
204
	test-all test-all-lisps test-all-no-upgrade \
205
	debian-package release \
206
	replace-sbcl-asdf replace-ccl-asdf \
207
	fix-local-git-tags fix-remote-git-tags wc wc-driver wc-asdf
208

209
# RELEASE or PUSH checklist:
210
# make test-all
211 212
# make test-load-systems s=fare-all
# make bump v=3.0
213
# edit debian/changelog # RELEASE only...
214 215
# git commit
# git tag 3.0 # for example ...
216 217 218
# git push
# git push origin 3.0 # for example...
# everything from here for RELEASE only
219
# make debian-package
220
# make release-push archive website debian-package
221 222 223
# dput mentors ../*.changes
# send debian mentors request
# send announcement to asdf-announce, asdf-devel, etc.
224 225 226 227
#
## 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