diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-12-04 10:37:37 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-12-04 10:37:37 +0000 |
commit | 71e6807de7f96addf2338f87a34674f0abff4c2c (patch) | |
tree | 9b4e2a6dea03024d97ba3995e9a301ea8a0dfd62 /tools | |
parent | 3e85a441be6bf2135b6a38cda737a7fff08774d8 (diff) |
Sync check-coding-style.mk etc. from telepathy-glib (add check-misc.sh, adjust for being in tools/ dir)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 1 | ||||
-rw-r--r-- | tools/check-c-style.sh | 2 | ||||
-rw-r--r-- | tools/check-coding-style.mk | 6 | ||||
-rw-r--r-- | tools/check-misc.sh | 13 |
4 files changed, 19 insertions, 3 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index f02406143..150b66b6c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -3,6 +3,7 @@ EXTRA_DIST = \ c-interfaces-generator.xsl \ check-coding-style.mk \ check-c-style.sh \ + check-misc.sh \ check-whitespace.sh \ doc-generator.xsl \ genginterface.py \ diff --git a/tools/check-c-style.sh b/tools/check-c-style.sh index 793d34b82..357fdb365 100644 --- a/tools/check-c-style.sh +++ b/tools/check-c-style.sh @@ -1,7 +1,7 @@ #!/bin/sh fail=0 -/bin/sh "${top_srcdir}"/check-whitespace.sh "$@" || fail=$? +( . "${tools_dir}"/check-misc.sh ) || fail=$? if grep -n '^ *GError *\*[[:alpha:]_][[:alnum:]_]* *;' "$@" then diff --git a/tools/check-coding-style.mk b/tools/check-coding-style.mk index b69c63839..1499f2f05 100644 --- a/tools/check-coding-style.mk +++ b/tools/check-coding-style.mk @@ -1,11 +1,13 @@ check-local:: @fail=0; \ if test -n "$(check_misc_sources)"; then \ - top_srcdir=$(top_srcdir) sh $(top_srcdir)/check-whitespace.sh \ + tools_dir=$(top_srcdir)/tools \ + sh $(top_srcdir)/tools/check-misc.sh \ $(check_misc_sources) || fail=1; \ fi; \ if test -n "$(check_c_sources)"; then \ - top_srcdir=$(top_srcdir) sh $(top_srcdir)/check-c-style.sh \ + tools_dir=$(top_srcdir)/tools \ + sh $(top_srcdir)/tools/check-c-style.sh \ $(check_c_sources) || fail=1; \ fi;\ if test yes = "$(ENABLE_CODING_STYLE_CHECKS)"; then \ diff --git a/tools/check-misc.sh b/tools/check-misc.sh new file mode 100644 index 000000000..89e8e871a --- /dev/null +++ b/tools/check-misc.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +fail=0 + +( . "${tools_dir}"/check-whitespace.sh ) || fail=$? + +if egrep '(Free\s*Software\s*Foundation.*02139|02111-1307)' "$@" +then + echo "^^^ The above files contain the FSF's old address in GPL headers" + fail=1 +fi + +exit $fail |