PACKAGE		:= pld-builder
VERSION		:= 0.6
SNAP		:= $(shell date +%Y%m%d)

all: compile

compile:
	python -c "import compileall, sys; sys.exit(0 if compileall.compile_dir('.') else 1)"

clean:
	find -name '*.pyc' | xargs rm -f
	rm -f *.tar.bz2

dist: $(PACKAGE)-$(VERSION).$(SNAP).tar.bz2
	test ! -x ./dropin || ./dropin $<

%.tar.bz2: %.tar
	bzip2 -9 $<

%.tar:
	git archive --prefix=$(patsubst %.tar,%,$@)/ HEAD -o $@
