all: dist/latexpand.zip

dist/latexpand/README: latexpand
	pod2text latexpand > $@

.PHONY: all force
dist/latexpand.zip: force
	-$(RM) -r dist/
	mkdir -p dist/latexpand
	@$(MAKE) dist/latexpand/README
	@echo "latexpand version $$(git rev-parse HEAD).\n\
Commited on $$(git show -s HEAD --pretty=format:'%cd')." > dist/latexpand/version.txt
	git ls-files | grep -v '\.gitignore' | tar -cf - -T - | (cd dist/latexpand/ && tar xf -)
	cd dist && zip -r latexpand.zip latexpand/
force:
