File: Makefile

package info (click to toggle)
zope-zattachmentattribute 2.21-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 324 kB
  • ctags: 238
  • sloc: sh: 1,365; python: 1,311; makefile: 89
file content (60 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL = /bin/sh
VERSION := $(shell cat version.txt)
CVS_TAG := v$(shell sed "s/\./_/g" version.txt)
PRODUCT := $(shell cat product.txt)
PRODUCT_NAME := ${PRODUCT}
MODULE := ${PRODUCT}
CVS_URL := :ext:$(USER)@cvs.sourceforge.net:/cvsroot/ingeniweb
PYTHON := $(shell which python)
SCP_SERVER := $(USER)@shell.sourceforge.net:/home/groups/i/in/ingeniweb/htdocs/Products

default:
	echo "Nothing to do by default."
	echo .
	echo "Use 'make test' to check against unit tests."
	echo "Use 'make dist' to make a distribution if you are in the CVS."
	echo .
	echo "This Makefile requires cvs2cl.pl script which can be found at http://www.red-bean.com/cvs2cl/cvs2cl.pl"

test:
	echo "If tests fail, please refer to test/runtests.sh script to check your PYTHON_PATH."
	(cd tests ; ./runtests.sh)

changelogfile:
	echo "Refreshing ChangeLog"
	./cvs2cl.pl

apidoc:
	echo "Refreshing API doc"
	mkdir -p doc
	cd doc && $(PYTHON) ./py2htmldoc.py $(PRODUCT_NAME) ..

commit:apidoc changelogfile www
	cvs update
	cvs commit

www:apidoc changelogfile
	scp CHANGES ChangeLog README* ${SCP_SERVER}/${PRODUCT}/
	scp doc/*html ${SCP_SERVER}/${PRODUCT}/api/ || echo ""

dist:version.txt
	echo .
	echo ${VERSION}
	echo ${CVS_TAG}
	echo ${PRODUCT}

	# Updating
	./cvs2cl.pl
	mkdir dist || echo ""
	echo "When updating, be careful about the '?' files : they must NOT be part of your distribution."
	echo "If you feel that one '?'-tagged file should be in your distribution, add it to the cvs before running 'make dist'."
	cvs update -dP

	# Tagging and archiving
	cvs tag -c ${CVS_TAG}
	(cd dist ; cvs -d${CVS_URL} export -r${CVS_TAG} ${MODULE})
	cp ChangeLog dist/${MODULE}
	(cd dist ; tar -czvf ${PRODUCT}-${VERSION}.tar.gz ${MODULE})
	(cd dist ; rm -rf ${MODULE})