summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 78aefe2..e7b0a1c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,15 +8,29 @@ clean: ## clean everything
8release: ## compile with releases flags 8release: ## compile with releases flags
9 cd src; phpize 9 cd src; phpize
10 cd src; ./configure --enable-snuffleupagus 10 cd src; ./configure --enable-snuffleupagus
11 make -C src 11 make -C src -j4 clean all
12 12
13install: release ## compile and install snuffleupagus 13install: release ## compile and install snuffleupagus
14 make -C src install 14 make -C src install
15 15
16compile_debug: ## compile a debug build 16compile_debug: ## compile a debug build
17 cd src; phpize 17 cd src; if [[ ! -f configure ]]; then phpize; fi; \
18 export CFLAGS="-g3 -ggdb -O1 -g"; cd src; ./configure --enable-snuffleupagus --enable-debug 18 ./configure --enable-snuffleupagus --enable-debug --enable-debug-stderr
19 make -C src 19 make -C src -j4 clean all
20
21DOCKER_IMAGE := php:latest
22docker: ## start docker container with current PHP
23 @echo "starting new docker container with snuffleupagus bind-mounted to /sp"
24 docker run -it -v "$$(pwd)":/sp $(DOCKER_IMAGE) /bin/bash
25
26linked-clone:
27 @if [[ "$(CLONE)" == "" ]]; then echo "Please provide clone name, e.g.\n make linked-clone CLONE=php8.1"; exit 1; fi
28 @if [[ -d "src-$(CLONE)" ]]; then echo "Clone '$(CLONE)' already exists."; exit 1; fi
29 @echo "creating linked clone in 'src-$(CLONE)'..."
30 mkdir "src-$(CLONE)"; cd "src-$(CLONE)"; \
31 SRC=../src; ln -s $$SRC/*.[hc] $$SRC/config.m4 $$SRC/snuffleupagus.php $$SRC/Makefile.frag $$SRC/*.re .; \
32 cp -r $$SRC/tests .
33 @echo "done. go ahead and do phpize/configure/make"
20 34
21tests: release ## compile a release build and run the testsuite 35tests: release ## compile a release build and run the testsuite
22 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 SP_SKIP_OLD_PHP_CHECK=1 make -C src test 36 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 SP_SKIP_OLD_PHP_CHECK=1 make -C src test