test for basic syntax errors in php files

This would have prevented the need for 1.1.3.1
This commit is contained in:
Florian Schlichting 2014-10-20 23:38:26 +02:00
parent 269a24dbb5
commit 4ee8c6d663

View File

@ -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