X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/b4c8dea64315e18434d85e9d5af57e8a2b23a977..3a14ee805269f9de8031c60ea44d90dfbe193f86:/Makefile diff --git a/Makefile b/Makefile index 54200ba..c2af419 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,36 @@ -.PHONY: all split +.PHONY: all split test tests release buildrules doc -all: +all: buildrules + +buildrules: + chmod +x omkbuild.py ./omkbuild.py --all split: - ./omkbuild.py --split=Makefile.rules \ No newline at end of file + chmod +x omkbuild.py + cd snippets; ../omkbuild.py --split=../Makefile.rules + +test tests: + $(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)