Makefile 6.42 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
lisp ?= sbcl
Gary King's avatar
Gary King committed
22

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

37
38
# website, tag, install

39
40
header_lisp := header.lisp
driver_lisp := package.lisp compatibility.lisp utility.lisp pathname.lisp stream.lisp os.lisp image.lisp run-program.lisp lisp-build.lisp configuration.lisp backward-driver.lisp driver.lisp
41
42
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 output-translations.lisp source-registry.lisp backward-internals.lisp defsystem.lisp bundle.lisp concatenate-source.lisp backward-interface.lisp interface.lisp footer.lisp

43
# Making ASDF itself should be our first, default, target:
44
45
build/asdf.lisp: $(wildcard *.lisp)
	mkdir -p build
46
	cat $(header_lisp) $(driver_lisp) $(asdf_lisp) > $@
47

48
# This quickly locates such mistakes as unbalanced parentheses:
49
50
51
52
load: build/asdf.lisp
	rlwrap sbcl \
	`for i in $(driver_lisp) $(asdf_lisp) ; do echo --load $$i ; done` \
	--eval '(in-package :asdf)'
53

54
55
install: archive-copy

56
bump: bump-version
57
bump-version: build/asdf.lisp
58
	./bin/asdf-builder bump-version
59

60
61
62
driver-files:
	@echo $(driver_lisp)

63
64
65
archive: build/asdf.lisp
	#${SBCL} --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
	#	--eval "(rewrite-license)" --eval "(quit)"
66
	./bin/asdf-builder make-tarballs
67

68
archive-copy: archive build/asdf.lisp
69
	git checkout release
70
	bin/rsync-cp build/asdf*.tar.gz $(webhome_private)/archives
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
71
	bin/link-tarball $(clnet_home)
72
	bin/rsync-cp build/asdf.lisp $(webhome_private)
73
	${MAKE} push
74
	git checkout master
75

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

83
84
85
86
87
push:
	git status
	git push --tags cl.net release master
	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

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
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
111
	${MAKE} -C doc clean
112

113
114
115
mrproper: clean
	rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap

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

119
120
test-clean-load: build/asdf.lisp
	./test/run-tests.sh -c ${lisp}
121

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

125
test: test-lisp test-clean-load doc
126

127
test-all-lisps:
128
	@for lisp in ${lisps} ; do \
129
		${MAKE} test-lisp test-upgrade lisp=$$lisp || exit 1 ; \
Gary King's avatar
Gary King committed
130
	done
131

132
133
134
135
136
137
# 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

138
139
140
141
142
test-all-upgrade:
	@for lisp in ${lisps} ; do \
		${MAKE} test-upgrade lisp=$$lisp || exit 1 ; \
	done

143
test-all: test-forward-references doc test-all-lisps
144

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

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

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

161
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
162
163
164
# Delete wrongful tags from local repository
fix-local-git-tags:
	for i in ${WRONGFUL_TAGS} ; do git tag -d $$i ; done
165
	git tag 1.37 c7738c62 # restore the *correct* 1.37 tag.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
166
167

# Delete wrongful tags from remote repository
168
fix-remote-git-tags:
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
169
170
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

171
172
173
174
175
176
177
release-push:
	git checkout master
	git merge release
	git checkout release
	git merge master
	git checkout master

178
179
180
181
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
182

183
.PHONY: install archive archive-copy push doc website clean mrproper \
184
	test-forward-references test test-lisp test-upgrade test-forward-references \
185
	test-all test-all-lisps test-all-noupgrade \
186
	debian-package release \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
187
	replace-sbcl-asdf replace-ccl-asdf \
188
	fix-local-git-tags fix-remote-git-tags wc wc-driver wc-asdf
189
190
191
192
193
194
195
196
197

# 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.