]> rtime.felk.cvut.cz Git - omk.git/blob - Makefile
omkbuild.py: Makefile.rules are constructed by replacing include directives in snippets
[omk.git] / Makefile
1
2 .PHONY: all split test tests release buildrules doc
3
4 all: buildrules
5
6 buildrules:
7         $(MAKE) -C snippets $@
8
9 split:
10         $(MAKE) -C snippets $@ RULES_TO_SPLIT=../Makefile.rules
11
12 test tests:
13         $(MAKE) -C tests
14
15 doc:
16         $(MAKE) -C doc
17
18 VERSION:=$(shell git describe|sed -e 's/^v//')
19 export VERSION                  # Export for doc/
20 RELEASE_DIR := omk-$(VERSION)
21 release: tag-check doc buildrules
22         -rm -rf $(RELEASE_DIR)
23         mkdir -p $(RELEASE_DIR)
24         cp -a rules $(RELEASE_DIR)
25         for i in $(RELEASE_DIR)/rules/*; do cp leaf-makefile/Makefile $$i; done
26         mkdir -p $(RELEASE_DIR)/doc
27         cp -a doc/omk-manual.txt doc/omk-manual.html doc/omk-manual.pdf $(RELEASE_DIR)/doc
28         cp COPYING $(RELEASE_DIR)
29         tar czf $(RELEASE_DIR).tar.gz $(RELEASE_DIR)
30         rm -rf $(RELEASE_DIR)
31         gpg -sba $(RELEASE_DIR).tar.gz
32
33 tag-check:
34         @test -n "$(VERSION)" || (echo "To create a release, please tag the repository with the tag 'vX.Y...'"; exit 1)