Commit | Line | Data |
---|---|---|
3716d925 FB |
1 | ################################################################################ |
2 | # definitions | |
3 | ||
4 | VERSNUM := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//") | |
5 | VERSTAG := $(shell grep VERSION ChangeLog | head -1 | grep 'XX' > /dev/null 2> /dev/null && echo 'beta') | |
6 | VERSION = $(VERSNUM)$(VERSTAG) | |
7 | ||
8 | ################################################################################ | |
9 | # global targets | |
10 | ||
11 | all: build | |
12 | ||
13 | build: include/version.inc.php | |
14 | ||
ee25884c | 15 | test: |
536fc7f7 | 16 | phpunit pltestsuite classes/pltestsuite.php |
ee25884c | 17 | |
3716d925 FB |
18 | clean: |
19 | -rm include/version.inc.php | |
20 | ||
21 | q: | |
22 | @echo -e "Code statistics\n" | |
23 | @sloccount $(wildcard */) 2> /dev/null | egrep '^[a-z]*:' | |
24 | ||
38cbb20a FB |
25 | doc: |
26 | @doxygen doc/doxygen.cfg | |
27 | ||
3716d925 FB |
28 | ################################################################################ |
29 | # targets | |
30 | ||
31 | %: %.in Makefile ChangeLog | |
32 | sed -e 's,@VERSION@,$(VERSION),g' $< > $@ | |
33 | ||
34 | include/version.inc.php: Makefile ChangeLog | |
35 | echo '<?php define("PLATAL_CORE_VERSION", "${VERSION}"); ?>' > $@ | |
36 | ||
38cbb20a | 37 | .PHONY: build dist clean q test doc |