diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..869f9fb --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | clean: | ||
| 2 | make -C src clean | ||
| 3 | cd src; phpize --clean | ||
| 4 | |||
| 5 | debug: | ||
| 6 | cd src; phpize | ||
| 7 | export CFLAGS="-Wall -Wextra -g3 -ggdb -Wno-unused-function"; cd src; ./configure --enable-snuffleupagus --enable-debug | ||
| 8 | make -C src | ||
| 9 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test | ||
| 10 | |||
| 11 | coverage: | ||
| 12 | cd src; phpize | ||
| 13 | export CFLAGS="--coverage -fprofile-arcs -ftest-coverage -O0"; export LDFLAGS="--coverage"; cd src; ./configure --enable-snuffleupagus --enable-coverage | ||
| 14 | make -C src | ||
| 15 | lcov --base-directory src --directory ./src --zerocounters -q --rc lcov_branch_coverage=1 | ||
| 16 | rm -Rf src/COV.html | ||
| 17 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test | ||
| 18 | lcov --base-directory ./src --directory src -c -o ./src/COV.info --rc lcov_branch_coverage=1 2>/dev/null 1>/dev/null | ||
| 19 | lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 2>/dev/null 1>/dev/null | ||
| 20 | genhtml -o src/COV.html ./src/COV.info --branch-coverage | ||
| 21 | |||
| 22 | tests: joomla | ||
| 23 | |||
| 24 | joomla: | ||
| 25 | if [ -nd "joomla-cms" ]; then git clone --depth 1 git@github.com:joomla/joomla-cms.git; fi | ||
| 26 | cd joomla-cms; composer install | ||
| 27 | cd joomla-cms; libraries/vendor/phpunit/phpunit/phpunit -d extension=./src/modules/snuffleupagus.so | ||
| 28 | |||
| 29 | packages: debian | ||
| 30 | |||
| 31 | debian: | ||
| 32 | dpkg-buildpackage -i -us -uc -tc -I -rfakeroot | ||
