Makefile 4.41 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
lisps ?= ccl clisp sbcl ecl abcl xcl scl allegro
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
8
## occasionally tested by not me: allegromodern cmucl lispworks
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
9
## FAIL: gclcvs (condition handling)
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
10
## tentatively supported by asdf, not supported by our tests: cormancl mcl genera
Gary King's avatar
Gary King committed
11

12
lisp ?= sbcl
Gary King's avatar
Gary King committed
13

14
15
16
17
# website, tag, install

install: archive-copy

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
18
archive:
19
20
	sbcl --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
		--eval "(rewrite-license)" --eval "(quit)"
21
	bin/make-tarball
22
23

archive-copy: archive
24
	git checkout release
25
	bin/rsync-cp tmp/asdf*.tar.gz $(webhome_private)/archives
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
26
	bin/link-tarball $(clnet_home)
27
	bin/rsync-cp tmp/asdf.lisp $(webhome_private)
28
29
30
31
32
33
34
35
	${MAKE} push

push:
	git status
	git push --tags cl.net release master
	git push --tags xcvb release master
	git fetch
	git status
36

37
38
website:
	make -C doc website
39
40

clean_dirs = $(sourceDirectory)
41
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl ufasl o bak x86f
42

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
43
clean:
44
45
46
47
48
49
50
51
52
53
54
	@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
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
55
	rm -rf tmp/ LICENSE test/try-reloading-dependency.asd
56
	make -C doc clean
57

58
59
60
mrproper: clean
	rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
61
62
63
test-upgrade:
	if [ -f /usr/lib/sbcl/sbcl-dist.core ] ; then \
		SBCL="/usr/bin/sbcl --core /usr/lib/sbcl/sbcl-dist.core" ; fi ; \
64
	mkdir -p tmp/ ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
65
66
67
68
69
70
71
72
	for tag in 1.37 1.97 1.369 `git tag -l '2.0??'` ; do \
	  echo "Testing upgrade from ASDF $${tag}" ; \
	  git show $${tag}:asdf.lisp > tmp/asdf-$${tag}.lisp ; \
	  $${SBCL:-sbcl} --noinform --eval \
	'(progn (handler-bind ((t #'"'"'muffle-warning)) (load "tmp/asdf-'$${tag}'.lisp")) (handler-bind ((sb-kernel:redefinition-warning #'"'"'muffle-warning)((or warning error) (lambda (c) (format t "~A~%" c) #|(defparameter *c* c) (break)|# (sb-ext:quit :unix-status 1)))) (load "asdf.lisp") (format t "Successfully upgraded from '$${tag}'~%") (sb-ext:quit :unix-status 0)))' || \
	{ echo "FAILED" ; exit 1 ; } ; done

test-forward-references:
73
74
	if [ -f /usr/lib/sbcl/sbcl-dist.core ] ; then SBCL="/usr/bin/sbcl --core /usr/lib/sbcl/sbcl-dist.core" ; fi ; $${SBCL:-sbcl} --noinform --load ~/cl/asdf/asdf.lisp --eval '(sb-ext:quit)' 2>&1 | cmp - /dev/null

75
do-test:
76
	@cd test; make clean;./run-tests.sh ${lisp} ${test-glob}
Gary King's avatar
Gary King committed
77

78
79
test: do-test test-forward-references

80
do-test-all:
81
	@for lisp in ${lisps} ; do \
82
		make do-test lisp=$$lisp || exit 1 ; \
Gary King's avatar
Gary King committed
83
	done
84

85
86
test-all: test-forward-references test-upgrade do-test-all

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
87
88
# 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
89
debian-package: mrproper
90
	: $${RELEASE:="$$(git tag -l '2.0[0-9][0-9]' | tail -n 1)"} ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
91
	git-buildpackage --git-debian-branch=release --git-upstream-branch=$$RELEASE --git-tag --git-retag --git-ignore-branch
92
93

# Replace SBCL's ASDF with the current one.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
94
# for casual users, just use (asdf:load-system :asdf)
95
96
97
98
replace-sbcl-asdf:
	sbcl --eval '(compile-file "asdf.lisp" :output-file (format nil "~Aasdf/asdf.fasl" (sb-int:sbcl-homedir-pathname)))' --eval '(quit)'

# Replace CCL's ASDF with the current one.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
99
# for casual users, just use (asdf:load-system :asdf)
100
101
102
replace-ccl-asdf:
	ccl --eval '(progn(compile-file "asdf.lisp" :output-file (format nil "~Atools/asdf.lx64fsl" (ccl::ccl-directory)))(quit))'

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
103
104
105
106
107
108
WRONGFUL_TAGS := 1.1720 README RELEASE STABLE
# 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
109
fix-remote-git-tags:
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
110
111
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

112
113
114
115
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
116

117
.PHONY: install archive archive-copy push website clean mrproper \
118
119
	upgrade-test test-forward-references test do-test test-all do-test-all \
	debian-package release \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
120
121
	replace-sbcl-asdf replace-ccl-asdf \
	fix-local-git-tags fix-remote-git-tags