Debian Codegraph @

Makefile

raw
1 system := xmls
2 webhome_dir := /project/${system}/public_html/
3 webhome_private := common-lisp.net:${webhome_dir}
4 webhome_public := "http://common-lisp.net/project/${system}/"
5 sourceDirectory := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
6 webfiles := web-page/clnet-page.shtml web-page/styles.css README.html
7 ifeq (${user},)
8 userat :=
9 else
10 userat := ${user}@
11 endif
12 website:=${userat}common-lisp.net:/project/${system}/public_html/
13 version := $(shell cat "version.lisp-expr")
14 XMLSDIR := "${system}-$(version)"
15 TARBALL := "build/${XMLSDIR}.tar.gz"
16
17
18
19 .PHONY: archive publish-archive website publish-latest
20
21 archive: ;
22 mkdir -p build
23 git archive --output ${TARBALL} --prefix 'xmls/' HEAD
24 gpg -o ${TARBALL}.asc --sign ${TARBALL}
25 md5sum --binary ${TARBALL} > ${TARBALL}.md5
26
27 # must be done after archive
28 publish-archive:
29 $(eval GPGSIG := ${TARBALL}.asc)
30 $(eval MD5SUM := ${TARBALL}.md5)
31 rsync --times --chmod=a+rX,ug+w ${TARBALL} ${GPGSIG} ${MD5SUM} ${website}
32 ssh common-lisp.net "cd ${webhome_dir}; ln -sf ${TARBALL} latest.tar.gz; ln -sf ${GPGSIG} latest.tar.gz.asc; ln -sf ${MD5SUM} latest.tar.gz.md5;"
33
34 # must be done after archive
35 publish-latest:
36 rsync --times --recursive --chmod=a+rX,ug+w build/${XMLSDIR} ${website}
37 ssh common-lisp.net "cd ${webhome_dir}; ln -sf ${XMLSDIR} latest;"
38
39 website: ;
40 rsync -lt --no-g ${webfiles} ${website}
41 ssh common-lisp.net "cd ${webhome_dir}; cp clnet-page.shtml index.shtml;"
42
43 publish: archive publish-archive publish-latest website
44
45 clean:
46 rm -r build
47