From: Michal Sojka Date: Wed, 23 Apr 2008 20:42:00 +0000 (+0000) Subject: Added release target to OMK makefile X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk/sssa.git/commitdiff_plain/a798a5c954b00e9d6a841e92abd80eb6f98de495 Added release target to OMK makefile darcs-hash:20080423204204-f2ef6-2215b765179837a154ad51ad8199e8ecaefc61ba.gz --- diff --git a/Makefile b/Makefile index 24e4679..c2af419 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ -.PHONY: all split test tests +.PHONY: all split test tests release buildrules doc -all: +all: buildrules + +buildrules: chmod +x omkbuild.py ./omkbuild.py --all @@ -10,4 +12,25 @@ split: cd snippets; ../omkbuild.py --split=../Makefile.rules test tests: - $(MAKE) -C tests \ No newline at end of file + $(MAKE) -C tests + +doc: + $(MAKE) -C doc + +VERSION:=$(shell darcs changes --last=1|sed -ne '/tagged/ s/^ *tagged v\(.*\)/\1/p') +export VERSION # Export for doc/ +RELEASE_DIR := omk-$(VERSION) +release: tag-check doc buildrules + -rm -rf $(RELEASE_DIR) + mkdir -p $(RELEASE_DIR) + cp -a rules $(RELEASE_DIR) + for i in $(RELEASE_DIR)/rules/*; do cp leaf-makefile/Makefile $$i; done + mkdir -p $(RELEASE_DIR)/doc + cp -a doc/omk-manual.txt doc/omk-manual.html doc/omk-manual.pdf $(RELEASE_DIR)/doc + cp COPYING $(RELEASE_DIR) + tar czf $(RELEASE_DIR).tar.gz $(RELEASE_DIR) + rm -rf $(RELEASE_DIR) + gpg -sba $(RELEASE_DIR).tar.gz + +tag-check: + @test -n "$(VERSION)" || (echo "To create a release, please tag the repository with the tag 'vX.Y...'"; exit 1)