diff options
author | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2011-07-19 15:24:48 +0100 |
---|---|---|
committer | Vivek Dasmohapatra <vivek@collabora.co.uk> | 2011-07-22 12:11:52 +0100 |
commit | a29cf172aca42414af59e634a78833e947886d25 (patch) | |
tree | 11175d070c9296750393171f52e59bc1255323ec | |
parent | 0cfe51094842b0b05d70e83b83f9cf677bc7e7ac (diff) | |
download | telepathy-mission-control-a29cf172aca42414af59e634a78833e947886d25.tar.gz |
Checks for unbalanced G_BEGIN/END_DECLS macros
-rw-r--r-- | libmcclient/Makefile.am | 5 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | tools/header-checks.am | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/libmcclient/Makefile.am b/libmcclient/Makefile.am index 4a64e3df..7a085963 100644 --- a/libmcclient/Makefile.am +++ b/libmcclient/Makefile.am @@ -204,3 +204,8 @@ _gen/svc-%.c _gen/svc-%.h: _gen/%.xml \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ --allow-unstable \ $< Mc_Svc_ + +include ../tools/header-checks.am + +check-local: header-decl-macro-check + diff --git a/src/Makefile.am b/src/Makefile.am index dbc10d3d..9637fbd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -358,3 +358,7 @@ _gen/svc-%.c _gen/svc-%.h: _gen/%.xml \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ --allow-unstable \ $< Mc_Svc_ + +include ../tools/header-checks.am + +check-local: header-decl-macro-check diff --git a/tools/header-checks.am b/tools/header-checks.am new file mode 100644 index 00000000..af94dda3 --- /dev/null +++ b/tools/header-checks.am @@ -0,0 +1,9 @@ +header-decl-macro-check: $(filter %.h,$(DIST_SOURCES)) + @(for H in $^; \ + do \ + if [ x"$$(grep -l G_BEGIN_DECLS $$H)" != x"$$(grep -l G_END_DECLS $$H)" ]; \ + then \ + echo Unbalanced G_\*_DECL macros in $$H; \ + exit 1; \ + fi;\ + done) |