[libvirt] [PATCH 06/10] syntax-check: Don't include "libvirt.h" and "virterror.h" in "" form

Osier Yang jyang at redhat.com
Tue Apr 16 13:41:48 UTC 2013


Directories python/tools/examples should include them in <> form,
though this patch allows "" form in these directories by excluding
them, a later patch will do the cleanup.
---
 cfg.mk | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 71f7ee4..cb8079c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -744,6 +744,20 @@ sc_prohibit_duplicate_header:
 	  }' $$i || { echo "Duplicate header(s) in $$i"; exit 1; };	\
 	done
 
+# Don't include "libvirt/libvirt.h" in "" form.
+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" in "" form.
+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
 
@@ -897,3 +911,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