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 committed 2014-12-16 21:53:49 +01:00
1 parent 269a24dbb5
commit 4ee8c6d663
1 file changed
+14
+14
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