From: Osier Yang Date: Wed, 17 Apr 2013 10:19:18 +0000 (+0800) Subject: syntax-check: Don't include public headers in internal source X-Git-Tag: v1.0.5-rc1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d69c6334bf8f8b6bebd609e7bc25d547bcb5196;p=thirdparty%2Flibvirt.git syntax-check: Don't include public headers in internal source 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. --- diff --git a/cfg.mk b/cfg.mk index dd67816e40..5f422de21a 100644 --- 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$$) diff --git a/daemon/remote.c b/daemon/remote.c index 45c50f316f..c559d6f40c 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -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" diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c index 11da2f3503..fb19584d2a 100644 --- a/src/libvirt-qemu.c +++ b/src/libvirt-qemu.c @@ -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