Makefile 5.28 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
lisps ?= ccl clisp sbcl ecl cmucl abcl scl allegro
## occasionally tested by not me: allegromodern lispworks xcl
9
## FAIL: gclcvs (COMPILER BUGS!!!)
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
	${MAKE} push
29
	git checkout master
30 31 32 33 34 35 36

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

38 39 40
doc:
	${MAKE} -C doc

41
website:
42
	${MAKE} -C doc website
43 44

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

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
47
clean:
48 49 50 51 52 53 54 55 56 57 58
	@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
59
	rm -rf tmp/ LICENSE test/try-reloading-dependency.asd
60
	${MAKE} -C doc clean
61

62 63 64
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
65 66 67
test-upgrade:
	if [ -f /usr/lib/sbcl/sbcl-dist.core ] ; then \
		SBCL="/usr/bin/sbcl --core /usr/lib/sbcl/sbcl-dist.core" ; fi ; \
68
	mkdir -p tmp/fasls/sbcl/ ; \
69 70 71 72 73 74
        fa=tmp/fasls/sbcl/upasdf.fasl ; \
        ll="(handler-bind ((sb-kernel:redefinition-warning #'muffle-warning)) (load \"asdf.lisp\"))" ; \
	cf="(handler-bind ((warning #'muffle-warning)) (compile-file \"asdf.lisp\" :output-file \"$$fa\" :verbose nil :print nil))" ; \
        lf="(handler-bind ((sb-kernel:redefinition-warning #'muffle-warning)) (load \"$$fa\"))" ; \
        te="(quit-on-error $$l (push #p\"${sourceDirectory}/test/\" asdf:*central-registry*) (asdf:oos 'asdf:load-op :test-module-depend :verbose nil))" ; \
        sb="$${SBCL:-sbcl} --noinform --load test/script-support" ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
75
	for tag in 1.37 1.97 1.369 `git tag -l '2.0??'` ; do \
76
	  lo="(handler-bind ((warning #'muffle-warning)) (load \"tmp/asdf-$${tag}.lisp\"))" ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
77 78
	  echo "Testing upgrade from ASDF $${tag}" ; \
	  git show $${tag}:asdf.lisp > tmp/asdf-$${tag}.lisp ; \
79 80 81 82 83 84
          rm -f $$fa ; \
          ( set -x ; $$sb --eval "$$lo" --eval "$$ll" --eval "$$te" && \
          $$sb --eval "$$lo" --eval "$$cf" --eval "$$lf" --eval "$$te" && \
          $$sb --eval "$$lo" --eval "$$lf" --eval "$$te" && \
          $$sb --eval "$$lf" --eval "$$te" ) || { echo "upgrade FAILED" ; exit 1 ;}; \
        done
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
85 86

test-forward-references:
87 88
	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

89
do-test:
90
	@cd test; ${MAKE} clean;./run-tests.sh ${lisp} ${test-glob}
Gary King's avatar
Gary King committed
91

92
test: do-test test-forward-references doc
93

94
do-test-all:
95
	@for lisp in ${lisps} ; do \
96
		${MAKE} do-test lisp=$$lisp || exit 1 ; \
Gary King's avatar
Gary King committed
97
	done
98

99
test-all: test-forward-references doc test-upgrade do-test-all
100

Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
101 102
# 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
103
debian-package: mrproper
104
	: $${RELEASE:="$$(git tag -l '2.0[0-9][0-9]' | tail -n 1)"} ; \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
105
	git-buildpackage --git-debian-branch=release --git-upstream-branch=$$RELEASE --git-tag --git-retag --git-ignore-branch
106

107
# Replace SBCL's ASDF with the current one. -- Not recommended now that SBCL has ASDF2.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
108
# for casual users, just use (asdf:load-system :asdf)
109 110 111
replace-sbcl-asdf:
	sbcl --eval '(compile-file "asdf.lisp" :output-file (format nil "~Aasdf/asdf.fasl" (sb-int:sbcl-homedir-pathname)))' --eval '(quit)'

112
# Replace CCL's ASDF with the current one. -- Not recommended now that CCL has ASDF2.
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
113
# for casual users, just use (asdf:load-system :asdf)
114 115 116
replace-ccl-asdf:
	ccl --eval '(progn(compile-file "asdf.lisp" :output-file (format nil "~Atools/asdf.lx64fsl" (ccl::ccl-directory)))(quit))'

117
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
118 119 120 121 122
# 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
123
fix-remote-git-tags:
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
124 125
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

126 127 128 129 130 131 132
release-push:
	git checkout master
	git merge release
	git checkout release
	git merge master
	git checkout master

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

138
.PHONY: install archive archive-copy push doc website clean mrproper \
139
	upgrade-test test-forward-references test do-test test-all do-test-all \
140
	test-upgrade test-forward-references \
141
	debian-package release \
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
142 143
	replace-sbcl-asdf replace-ccl-asdf \
	fix-local-git-tags fix-remote-git-tags