tools: add a copy of library headers in tools/include
authorJuergen Gross <jgross@suse.com>
Sun, 23 Aug 2020 08:00:11 +0000 (10:00 +0200)
committerWei Liu <wl@xen.org>
Thu, 27 Aug 2020 12:59:46 +0000 (12:59 +0000)
commitbc44e2fb3199ecd8461bbdd093806f76ee61776a
tree96bbf1a916b074d7288559e388bfa8ffb32427bc
parent725ef89164e38349c9e6210f720e0cdc0c52e69e
tools: add a copy of library headers in tools/include

The headers.chk target in tools/Rules.mk tries to compile all headers
stand alone for testing them not to include any internal header.

Unfortunately the headers tested against are not complete, as any
header for a Xen library is not included in the include path of the
test compile run, resulting in a failure in case any of the tested
headers in including an official Xen library header.

Fix that by copying the official headers located in
tools/libs/*/include to tools/include.

In order to support libraries with header name other than xen<lib>.h
or with multiple headers add a LIBHEADER make variable a lib specific
Makefile can set in that case.

Move the headers.chk target from Rules.mk to libs.mk as it is used
for libraries in tools/libs only.

Add NO_HEADERS_CHK variable to skip checking headers as this will be
needed e.g. for libxenctrl.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wl@xen.org>
.gitignore
tools/Rules.mk
tools/libs/libs.mk