added a make test target which also checks for copyright headers

This commit is contained in:
Michael Zanetti 2014-05-03 02:11:37 +02:00
parent 265d734ab8
commit 96c37dbd91
2 changed files with 15 additions and 1 deletions

View File

@ -8,4 +8,9 @@ tests.depends = libguh
doc.depends = libguh server
doc.commands = cd $$top_srcdir/doc; qdoc config.qdocconf
QMAKE_EXTRA_TARGETS += doc
licensecheck.commands = $$top_srcdir/tests/auto/checklicenseheaders.sh $$top_srcdir
test.depends = licensecheck check
QMAKE_EXTRA_TARGETS += licensecheck doc test

View File

@ -0,0 +1,9 @@
results=`licensecheck -r -c '\.(cpp|h)$' $1 | grep -v "GPL (v2)"`
if test -z "$results"; then
exit 0
else
echo "*** License check failed. Offending files:"
licensecheck -r -c '\.(cpp|h)$' $1 | grep -v "GPL (v2)"
exit 1
fi