]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: Don't include public headers in internal source
authorOsier Yang <jyang@redhat.com>
Wed, 17 Apr 2013 10:19:18 +0000 (18:19 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 18 Apr 2013 03:24:46 +0000 (11:24 +0800)
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
daemon/remote.c
src/libvirt-qemu.c

diff --git a/cfg.mk b/cfg.mk
index dd67816e40cf7eb641d1284352a4ef7b70acf7f5..5f422de21ae43a7e01728dd68efcaf5ac562632e 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -746,6 +746,13 @@ sc_prohibit_duplicate_header:
          { echo "$(ME)": avoid duplicate headers >&2; exit 1; }        \
        fi;
 
+# Don't include "libvirt/*.h" in "" form.
+sc_prohibit_include_public_headers:
+       @prohibit='# *include *"libvirt/.*\.h"'                         \
+       in_vc_files='\.[chx]$$'                                         \
+       halt='Do not include libvirt/*.h in internal source'            \
+         $(_sc_search_regexp)
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
 
@@ -899,3 +906,6 @@ 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_public_headers = \
+  ^(src/internal\.h$$|python/|tools/|examples/|include/libvirt/libvirt-(qemu|lxc)\.h$$)
index 45c50f316f4cbe4e45e71cb481af126345afb17d..c559d6f40c744e7ba72a85c8bc5ebe2766502083 100644 (file)
@@ -38,8 +38,6 @@
 #include "virutil.h"
 #include "stream.h"
 #include "viruuid.h"
-#include "libvirt/libvirt-qemu.h"
-#include "libvirt/libvirt-lxc.h"
 #include "vircommand.h"
 #include "intprops.h"
 #include "virnetserverservice.h"
index 11da2f350394ee006a2380c3750e2fd235957c5d..fb19584d2a81e8d9d9b430020e12df7be04e80ac 100644 (file)
@@ -26,7 +26,6 @@
 #include "virerror.h"
 #include "virlog.h"
 #include "datatypes.h"
-#include "libvirt/libvirt-qemu.h"
 
 #define VIR_FROM_THIS VIR_FROM_NONE