#
# OpenRPG Makefile
#
# Copyright (C) 2009 David Vrabel
#

PACKAGE := openrpg
VERSION := $(shell python orpg/orpg_version.py)

all:

dir := $(PACKAGE)-$(VERSION)
zip := $(dir).zip

dist:
	@if [ -e $(zip) ]; then echo "Error: $(zip) already exists"; exit 1; fi
	tar cvf - --exclude="*.pyc" --exclude "*~" --exclude ".hg*" --exclude "*.zip" . \
		| ( mkdir -p $(dir) && cd $(dir) && tar xf - )
	zip -r $(zip) $(dir)
	rm -r $(dir)
