diff options
| -rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
| @@ -1,22 +1,25 @@ | |||
| 1 | clean: | 1 | .DEFAULT_GOAL=help |
| 2 | .PHONY=help | ||
| 3 | |||
| 4 | clean: ## clean everything | ||
| 2 | make -C src clean | 5 | make -C src clean |
| 3 | cd src; phpize --clean | 6 | cd src; phpize --clean |
| 4 | 7 | ||
| 5 | release: | 8 | release: ## 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 | ||
| 10 | install: release | 13 | install: release ## compile and install snuffleupagus |
| 11 | make -C install | 14 | make -C install |
| 12 | 15 | ||
| 13 | debug: | 16 | debug: ## 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 | ||
| 19 | coverage: | 22 | coverage: ## 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 | ||
| 29 | tests: joomla | 32 | bench: joomla ## run the benchmark |
| 30 | 33 | ||
| 31 | joomla: | 34 | joomla: |
| 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 | ||
| 41 | packages: debian | 44 | packages: debian ## produce packages |
| 42 | 45 | ||
| 43 | debian: | 46 | debian: |
| 44 | dpkg-buildpackage -i -us -uc -tc -I -rfakeroot | 47 | dpkg-buildpackage -i -us -uc -tc -I -rfakeroot |
| 48 | |||
| 49 | help: | ||
| 50 | @awk -F ':|##' '/^[^\t].+?:.*?##/ { printf "\033[36m%-30s\033[0m %s\n", $$1, $$NF }' $(MAKEFILE_LIST) | ||
