[libvirt] [PATCH 6/6] syntax-check: Don't include libvirt.h and virterror.h

Osier Yang jyang at redhat.com
Mon Apr 15 06:28:44 UTC 2013


Except for "internal.h" and the public headers
---
 cfg.mk | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 9cf4cff..0f07abd 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -736,6 +736,20 @@ sc_prohibit_duplicate_header:
 	else :;								\
 	fi
 
+# Don't include "libvirt/libvirt.h".
+sc_prohibit_include_libvirt_h:
+	@prohibit='^# *include "libvirt/libvirt.h"'			\
+	in_vc_files='\.[ch]$$'						\
+	halt='Do not include libvirt/libvirt.h'				\
+	  $(_sc_search_regexp)
+
+# Don't include "libvirt/virterror.h".
+sc_prohibit_include_virterror_h:
+	@prohibit='^# *include "libvirt/virterror.h"'			\
+	in_vc_files='\.[ch]$$'						\
+	halt='Do not include libvirt/virterror.h'			\
+	  $(_sc_search_regexp)
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
@@ -888,3 +902,9 @@ exclude_file_name_regexp--sc_correct_id_types = \
   (^src/locking/lock_protocol.x$$)
 
 exclude_file_name_regexp--sc_m4_quote_check = m4/virt-lib.m4
+
+exclude_file_name_regexp--sc_prohibit_include_libvirt_h = \
+    ^(src/internal\.h)|(include/libvirt/libvirt-(lxc|qemu)\.h)|(python/libvirt-override\.c)|(python/typewrappers\.h)$$
+
+exclude_file_name_regexp--sc_prohibit_include_virterror_h = \
+    ^(src/internal\.h)|(python/libvirt-|(lxc|qemu)-override\.c)|(python/typewrappers\.h)$$
-- 
1.8.1.4




More information about the libvir-list mailing list