summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2017-09-27 17:19:27 +0200
committerjvoisin2017-09-27 17:19:27 +0200
commitdd7a6c1de6b11ecaf24337c50689aeba9eb94567 (patch)
treef8ffb989afa24b04a83c481673ce5b829bfb393f
parent3040b02639bd71dbcd936311546ef9296165aea5 (diff)
Add some auto-documentation to the makefile
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index a6d9a90..7b0d40b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,25 @@
1clean: 1.DEFAULT_GOAL=help
2.PHONY=help
3
4clean: ## clean everything
2 make -C src clean 5 make -C src clean
3 cd src; phpize --clean 6 cd src; phpize --clean
4 7
5release: 8release: ## compile with releases flags
6 cd src; phpize 9 cd src; phpize
7 cd src; ./configure --enable-snuffleupagus 10 cd src; ./configure --enable-snuffleupagus
8 make -C src 11 make -C src
9 12
10install: release 13install: release ## compile and install snuffleupagus
11 make -C install 14 make -C install
12 15
13debug: 16debug: ## compile a debug build
14 cd src; phpize 17 cd src; phpize
15 export CFLAGS="-g3 -ggdb -O1 -g"; cd src; ./configure --enable-snuffleupagus --enable-debug 18 export CFLAGS="-g3 -ggdb -O1 -g"; cd src; ./configure --enable-snuffleupagus --enable-debug
16 make -C src 19 make -C src
17 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test 20 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
18 21
19coverage: 22coverage: ## compile snuffleugpaus, and run the testsuite with coverage
20 cd src; phpize 23 cd src; phpize
21 cd src; ./configure --enable-snuffleupagus --enable-coverage 24 cd src; ./configure --enable-snuffleupagus --enable-coverage
22 make -C src 25 make -C src
@@ -26,7 +29,7 @@ coverage:
26 lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 29 lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1
27 genhtml -o src/COV.html ./src/COV.info --branch-coverage 30 genhtml -o src/COV.html ./src/COV.info --branch-coverage
28 31
29tests: joomla 32bench: joomla ## run the benchmark
30 33
31joomla: 34joomla:
32 if [ ! -d "joomla-cms" ]; then \ 35 if [ ! -d "joomla-cms" ]; then \
@@ -38,7 +41,10 @@ joomla:
38 echo "\nWithout snuffleupagus:" 41 echo "\nWithout snuffleupagus:"
39 cd joomla-cms; time libraries/vendor/phpunit/phpunit/phpunit --no-coverage >/dev/null 42 cd joomla-cms; time libraries/vendor/phpunit/phpunit/phpunit --no-coverage >/dev/null
40 43
41packages: debian 44packages: debian ## produce packages
42 45
43debian: 46debian:
44 dpkg-buildpackage -i -us -uc -tc -I -rfakeroot 47 dpkg-buildpackage -i -us -uc -tc -I -rfakeroot
48
49help:
50 @awk -F ':|##' '/^[^\t].+?:.*?##/ { printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF }' $(MAKEFILE_LIST)