Makefile 6.51 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
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
defsystem_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
42

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) $(defsystem_lisp) > $@
47

48
# This quickly locates such mistakes as unbalanced parentheses:
49 50
load: build/asdf.lisp
	rlwrap sbcl \
51
	`for i in $(driver_lisp) $(defsystem_lisp) ; do echo --load $$i ; done` \
52
	--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
defsystem-files:
	@echo $(defsystem_lisp)

66 67 68
archive: build/asdf.lisp
	#${SBCL} --userinit /dev/null --sysinit /dev/null --load bin/make-helper.lisp \
	#	--eval "(rewrite-license)" --eval "(quit)"
69
	./bin/asdf-builder make-and-publish-archive
70

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

79
### Count lines separately for asdf-driver and asdf itself:
80
wc:
81
	@wc $(driver_lisp) | sort -n ; echo ; \
82
	wc $(header_lisp) $(defsystem_lisp) | sort -n ; \
83
	echo ; \
84
	wc $(header_lisp) $(driver_lisp) $(defsystem_lisp) | tail -n 1
85

86 87 88 89 90
push:
	git status
	git push --tags cl.net release master
	git fetch
	git status
91

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

95
website:
96
	${MAKE} -C doc website
97 98

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

101
clean:
102 103 104 105 106 107 108 109 110 111 112
	@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
113
	rm -rf build/ LICENSE test/try-reloading-dependency.asd
114
	${MAKE} -C doc clean
115

116 117 118
mrproper: clean
	rm -rf .pc/ build-stamp debian/patches/ debian/debhelper.log debian/cl-asdf/ # debian crap

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

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

125
test-lisp: build/asdf.lisp
126
	@cd test; ${MAKE} clean;./run-tests.sh ${lisp} ${test-glob}
127

128
test: test-lisp test-clean-load doc
129

130
test-all-lisps:
131
	@for lisp in ${lisps} ; do \
132
		${MAKE} test-lisp test-upgrade lisp=$$lisp || exit 1 ; \
133
	done
134

135 136 137 138 139 140
# 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

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

146
test-all: test-forward-references doc test-all-lisps
147

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

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

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

164
WRONGFUL_TAGS := 1.37 1.1720 README RELEASE STABLE
165 166 167
# Delete wrongful tags from local repository
fix-local-git-tags:
	for i in ${WRONGFUL_TAGS} ; do git tag -d $$i ; done
168
	git tag 1.37 c7738c62 # restore the *correct* 1.37 tag.
169 170

# Delete wrongful tags from remote repository
171
fix-remote-git-tags:
172 173
	for i in ${WRONGFUL_TAGS} ; do git push $${REMOTE:-cl.net} :refs/tags/$$i ; done

174 175 176 177 178 179 180
release-push:
	git checkout master
	git merge release
	git checkout release
	git merge master
	git checkout master

181 182 183 184
TODO:
	exit 2

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

186
.PHONY: install archive archive-copy push doc website clean mrproper \
187
	test-forward-references test test-lisp test-upgrade test-forward-references \
188
	test-all test-all-lisps test-all-noupgrade \
189
	debian-package release \
190
	replace-sbcl-asdf replace-ccl-asdf \
191
	fix-local-git-tags fix-remote-git-tags wc wc-driver wc-asdf
192 193 194 195 196 197 198 199 200

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