diff --git a/Makefile b/Makefile index 21952e67..ad59bd17 100755 --- a/Makefile +++ b/Makefile @@ -51,6 +51,20 @@ release: built-docs VERSION .PHONY: snapshot snapshot: release +.PHONY: test +test: + @for PHP in htdocs/*.php inc/*.php; do php5 -l $${PHP} | grep -v 'No syntax errors detected' >> test-syntax; done; \ + if [ -s test-syntax ]; then \ + cat test-syntax >&2; \ + rm test-syntax; \ + exit 1; \ + else \ + rm test-syntax; \ + exit 0; \ + fi + + + .PHONY: clean clean: rm -f built-docs built-po