Makefile 8.81 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
ifdef ASDF_TEST_LISPS
lisps ?= ${ASDF_TEST_LISPS}
else
10
lisps ?= ccl clisp sbcl ecl ecl_bytecodes cmucl abcl scl allegro lispworks allegromodern xcl gcl
11
12
endif

13
export ASDF_OUTPUT_TRANSLATIONS := (:output-translations (t ("${sourceDirectory}/build/fasls" :implementation)) :ignore-inherited-configuration)
14
export CL_SOURCE_REGISTRY := (:source-registry (:tree "${sourceDirectory}") :ignore-inherited-configuration)
15

16
## MAJOR FAIL: gclcvs -- COMPILER BUG! Upstream fixed it, but upstream fails to compile.
17
## NOT SUPPORTED BY OUR TESTS: cormancl genera lispworks-personal-edition mkcl rmcl. Manually tested once in a while.
Gary King's avatar
Gary King committed
18

19
lisp ?= sbcl
Gary King's avatar
Gary King committed
20

21
22
23
ABCL ?= abcl
ALLEGRO ?= alisp
ALLEGROMODERN ?= mlisp
24
25
CCL ?= ccl
CLISP ?= clisp
26
CMUCL ?= cmucl
27
ECL ?= ecl
28
29
GCL ?= gcl
LISPWORKS ?= lispworks
30
MKCL ?= mkcl
31
SBCL ?= sbcl
32
SCL ?= scl
33
XCL ?= xcl
34

35
36
# website, tag, install

37
38
default: test

39
40
install: archive-copy

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
41
archive:
42
	${SBCL} --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
43
		--eval "(rewrite-license)" --eval "(quit)"
44
	bin/make-tarball
45

46
archive-copy: archive build/asdf.lisp
47
	git checkout release
48
	bin/rsync-cp build/asdf*.tar.gz $(webhome_private)/archives
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
49
	bin/link-tarball $(clnet_home)
50
	bin/rsync-cp build/asdf.lisp $(webhome_private)
51
	${MAKE} push
52
	git checkout master
53

54
55
driver_lisp := header.lisp package.lisp compatibility.lisp utility.lisp pathname.lisp stream.lisp os.lisp image.lisp run-program.lisp lisp-build.lisp driver.lisp
asdf_lisp := upgrade.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp configuration.lisp output-translations.lisp source-registry.lisp backward-internals.lisp defsystem.lisp bundle.lisp concatenate-source.lisp backward-interface.lisp interface.lisp footer.lisp
56

57
58
build/asdf.lisp: $(wildcard *.lisp)
	mkdir -p build
59
60
61
62
63
64
65
66
67
68
	cat $(driver_lisp) $(asdf_lisp) > $@

wc:
	wc $(driver_lisp) $(asdf_lisp) | sort -n

wc-driver:
	wc $(driver_lisp)

wc-asdf:
	wc $(asdf_lisp)
69

70
71
72
73
74
push:
	git status
	git push --tags cl.net release master
	git fetch
	git status
75

76
77
78
doc:
	${MAKE} -C doc

79
website:
80
	${MAKE} -C doc website
81
82

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

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
85
clean:
86
87
88
89
90
91
92
93
94
95
96
	@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
97
	rm -rf build/ LICENSE test/try-reloading-dependency.asd
98
	${MAKE} -C doc clean
99

100
101
102
mrproper: clean
	rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap

103
test-upgrade: build/asdf.lisp
104
105
106
107
	# 1.37 is the last release by Daniel Barlow
	# 1.97 is the last release before Gary King takes over
	# 1.369 is the last release by Gary King
	# 2.000 to 2.019 and 2.20 to 2.27 and beyond are Faré's "stable" releases
108
	fasl=fasl ; \
109
110
111
112
	use_ccl () { li="${CCL} --no-init --quiet" ; ev="--eval" ; } ; \
	use_clisp () { li="${CLISP} -norc -ansi --quiet --quiet" ; ev="-x" ; } ; \
	use_sbcl () { li="${SBCL} --noinform --no-userinit" ; ev="--eval" ; } ; \
	use_ecl () { li="${ECL} -norc" ; ev="-eval" ; } ; \
113
	use_ecl_bytecodes () { li="${ECL} -norc -eval (ext::install-bytecodes-compiler)" ; ev="-eval" ; } ; \
114
	use_mkcl () { li="${MKCL} -norc" ; ev="-eval" ; } ; \
115
116
	use_cmucl () { li="${CMUCL} -noinit" ; ev="-eval" ; } ; \
	use_abcl () { li="${ABCL} --noinit --nosystem --noinform" ; ev="--eval" ; } ; \
117
	use_xcl () { li="${XCL} --noinit --nosystem --noinform" ; ev="--eval" ; } ; \
118
	use_scl () { li="${SCL} -noinit" ; ev="-eval" ; } ; \
119
	use_gcl () { li="env GCL_ANSI=t ${GCL}" ; ev="-eval" ; } ; \
120
121
122
	use_allegro () { li="${ALLEGRO} -q" ; ev="-e" ; } ; \
	use_allegromodern () { li="${ALLEGROMODERN} -q" ; ev="-e" ; } ; \
	use_lispworks () { li="${LISPWORKS} -siteinit - -init -" ; ev="-eval" ; } ; \
123
	use_${lisp} ; \
124
	su=test/script-support.lisp ; lu="(load\"$$su\")" ; \
125
	lv="$$li $$ev $$lu $$ev" ; \
126
	for tag in 1.37 1.97 1.369 `git tag -l '2.0??'` `git tag -l '2.??'` ; do \
127
	  rm -f $$fa ; \
128
	  for x in load-system load-lisp load-lisp-compile-load-fasl load-fasl just-load-fasl ; do \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
129
	    lo="(asdf-test::load-old-asdf \"$${tag}\")" ; \
130
	    echo "Testing upgrade from ASDF $${tag} using method $$x" ; \
131
	    git show $${tag}:asdf.lisp > build/asdf-$${tag}.lisp ; \
132
	    case ${lisp}:$$tag:$$x in \
133
	      abcl:2.0[01][1-9]:*|abcl:2.2[1-2]:*) \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
134
		: Skip, because it is so damn slow ;; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
135
136
137
138
	      ccl:1.*|ccl:2.0[01]*) \
		: Skip, because ccl broke old asdf ;; \
	      cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-4]:*) \
		: Skip, CMUCL has problems before 2.014.7 due to source-registry upgrade ;; \
139
	      ecl*:1.*|ecl*:2.0[01]*|ecl*:2.20:*) \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
140
		: Skip, because of various ASDF issues ;; \
141
	      gcl:1.*|gcl:2.0*|gcl:2.2[0-6]*) : Skip old versions that do not support GCL 2.6 ;; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
142
143
	      mkcl:1.*|mkcl:2.0[01]*|mkcl:2.2[0-3]:*) \
		: Skip, because MKCL is only supported starting with 2.24 ;; \
144
145
	      xcl:1.*|xcl:2.00*|xcl:2.01[0-4]:*|xcl:*) \
		: XCL support starts with ASDF 2.014.2 - It also hangs badly during upgrade. ;; \
146
	      *) (set -x ; \
147
                  case $$x in \
148
149
150
151
152
153
154
		    load-system) l="$$lo (asdf-test::load-asdf-system)" ;; \
		    load-lisp) l="$$lo (asdf-test::load-asdf-lisp)" ;; \
		    load-lisp-compile-load-fasl) l="$$lo (asdf-test::compile-load-asdf)" ;; \
		    load-fasl) l="$$lo (asdf-test::load-asdf-fasl)" ;; \
		    just-load-fasl) l="(asdf-test::load-asdf-fasl)" ;; \
		    *) echo "WTF?" ; exit 2 ;; esac ; \
		  $$lv "(asdf-test::test-asdf $$l)" ) || \
155
		{ echo "upgrade FAILED" ; exit 1 ;} ;; esac ; \
156
	done ; done 2>&1 | tee build/results/${lisp}-upgrade.text
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
157

158
159
test-forward-references: build/asdf.lisp
	${SBCL} --noinform --no-userinit --no-sysinit --load build/asdf.lisp --load test/script-support.lisp --eval '(asdf-test::exit-lisp 0)' 2>&1 | cmp - /dev/null
160

161
test-lisp: build/asdf.lisp
162
	@cd test; ${MAKE} clean;./run-tests.sh ${lisp} ${test-glob}
Gary King's avatar
Gary King committed
163

164
test: test-lisp test-forward-references doc
165

166
test-all-lisps:
167
	@for lisp in ${lisps} ; do \
168
		${MAKE} test-lisp test-upgrade lisp=$$lisp || exit 1 ; \
Gary King's avatar
Gary King committed
169
	done
170

171
172
173
174
175
176
# test upgrade is a very long run... This does just the regression tests
test-all-noupgrade:
	@for lisp in ${lisps} ; do \
		${MAKE} test-lisp lisp=$$lisp || exit 1 ; \
	done

177
178
179
180
181
test-all-upgrade:
	@for lisp in ${lisps} ; do \
		${MAKE} test-upgrade lisp=$$lisp || exit 1 ; \
	done

182
test-all: test-forward-references doc test-all-lisps
183

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
184
185
# 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
186
debian-package: mrproper
187
	: $${RELEASE:="$$(git tag -l '2.[0-9][0-9]' | tail -n 1)"} ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
188
	git-buildpackage --git-debian-branch=release --git-upstream-branch=$$RELEASE --git-tag --git-retag --git-ignore-branch
189

190
# Replace SBCL's ASDF with the current one. -- Not recommended now that SBCL has ASDF2.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
191
# for casual users, just use (asdf:load-system :asdf)
192
replace-sbcl-asdf: build/asdf.lisp
193
	${SBCL} --eval '(compile-file "$<" :output-file (format nil "~Aasdf/asdf.fasl" (sb-int:sbcl-homedir-pathname)))' --eval '(quit)'
194

195
# Replace CCL's ASDF with the current one. -- Not recommended now that CCL has ASDF2.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
196
# for casual users, just use (asdf:load-system :asdf)
197
replace-ccl-asdf: build/asdf.lisp
198
	${CCL} --eval '(progn(compile-file "$<" :output-file (compile-file-pathname (format nil "~Atools/asdf.lisp" (ccl::ccl-directory))))(quit))'
199

200
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
201
202
203
204
205
# 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
206
fix-remote-git-tags:
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
207
208
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

209
210
211
212
213
214
215
release-push:
	git checkout master
	git merge release
	git checkout release
	git merge master
	git checkout master

216
217
218
219
TODO:
	exit 2

release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
220

221
.PHONY: install archive archive-copy push doc website clean mrproper \
222
	test-forward-references test test-lisp test-upgrade test-forward-references \
223
	test-all test-all-lisps test-all-noupgrade \
224
	debian-package release \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
225
	replace-sbcl-asdf replace-ccl-asdf \
226
	fix-local-git-tags fix-remote-git-tags wc wc-driver wc-asdf
227
228
229
230
231
232
233
234
235

# RELEASE checklist:
# make test-all
# ./bin/bump-version 2.27
# edit debian/changelog
# make release-push archive-copy website debian-package
# dput mentors ../*.changes
# send debian mentors request
# send announcement to asdf-announce, asdf-devel, etc.