File: Makefile

package info (click to toggle)
cl-xmls 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 720 kB
  • sloc: xml: 7,639; lisp: 1,084; perl: 101; makefile: 39
file content (47 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
system		:= xmls
webhome_dir	:= /project/${system}/public_html/
webhome_private := common-lisp.net:${webhome_dir}
webhome_public	:= "http://common-lisp.net/project/${system}/"
sourceDirectory := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
webfiles	:= web-page/clnet-page.shtml web-page/styles.css README.html
ifeq (${user},)
userat :=
else
userat := ${user}@
endif
website:=${userat}common-lisp.net:/project/${system}/public_html/
version := $(shell cat "version.lisp-expr")
XMLSDIR := "${system}-$(version)"
TARBALL := "build/${XMLSDIR}.tar.gz"



.PHONY: archive publish-archive website publish-latest

archive: ;
	mkdir -p build
	svn export . build/$(XMLSDIR) 
	tar zcf ${TARBALL} -C build $(XMLSDIR)
	gpg -o ${TARBALL}.asc --sign ${TARBALL}
	md5sum --binary ${TARBALL} > ${TARBALL}.md5

# must be done after archive
publish-archive:
	$(eval GPGSIG := ${TARBALL}.asc)
	$(eval MD5SUM := ${TARBALL}.md5)
	rsync --times --chmod=a+rX,ug+w ${TARBALL} ${GPGSIG} ${MD5SUM}  ${website}

# must be done after archive
publish-latest:
	rsync --times --recursive --chmod=a+rX,ug+w build/${XMLSDIR} ${website}
	ssh common-lisp.net "cd ${webhome_dir}; ln -sf ${XMLSDIR} latest;"

website: ;
	rsync -lt --no-g ${webfiles} ${website}
	ssh common-lisp.net "cd ${webhome_dir}; cp clnet-page.shtml index.shtml;"

publish: archive publish-archive publish-latest website

clean:
	rm -r build