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.
This commit is contained in:
Osier Yang 2013-04-17 18:19:18 +08:00
parent 83d801a7e6
commit 1d69c6334b
3 changed files with 10 additions and 3 deletions

10
cfg.mk
View File

@ -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$$)

View 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"

View 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