Makefile 709 Bytes
Newer Older
1 2 3 4 5 6
# use something like "VERSION=0.2 make" to override the VERSION on the command line
VERSION ?= svn
SVN_BASE = https://pycam.svn.sourceforge.net/svnroot/pycam
RELEASE_PREFIX = pycam-
EXPORT_DIR = $(RELEASE_PREFIX)$(VERSION)
EXPORT_FILE_PREFIX = $(EXPORT_DIR)
lode_leroy's avatar
lode_leroy committed
7 8


9
.PHONY: zip tgz svn_export tag
lode_leroy's avatar
lode_leroy committed
10

11 12 13
dist: zip tgz
	@# remove the tmp directory when everything is done
	@rm -rf "$(EXPORT_DIR)"
lode_leroy's avatar
lode_leroy committed
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28
clean:
	@rm -rf "$(EXPORT_DIR)"

svn_export: clean
	svn export --quiet "$(SVN_BASE)/trunk" "$(EXPORT_DIR)"

zip: svn_export
	zip -9rq "$(EXPORT_FILE_PREFIX).zip" "$(EXPORT_DIR)"

tgz: svn_export
	tar czf "$(EXPORT_FILE_PREFIX).tar.gz" "$(EXPORT_DIR)"

tag:
	svn cp "$(SVN_BASE)/trunk" "$(SVN_BASE)/tags/release-$(VERSION)"
lode_leroy's avatar
lode_leroy committed
29