Source

qct / Makefile

ui_qctDialog.py : qctDialog.ui
	pyuic4 $< > $@

clean:
	$(RM) ui_qctDialog.py *.pyc
	$(RM) -r build
	$(RM) qct-*.tar.gz 

#
# Distribution logic
#

# Files not revisioned which are distributed
EXTRAS := ui_qctDialog.py

# Revisioned files which are not distributed
PRUNE  := .hgtags .hgignore

VER := $(shell python setup.py --version)
DIST_NAME  := qct-$(VER)
PRUNE_LIST := $(foreach file, $(PRUNE), $(DIST_NAME)/$(file))

dist: ui_qctDialog.py
	hg archive --rev=$(VER) --type=files $(DIST_NAME)
	cp $(EXTRAS) $(DIST_NAME)
	$(RM) $(PRUNE_LIST)
	tar czf $(DIST_NAME).tar.gz $(DIST_NAME)/
	$(RM) -r $(DIST_NAME)/