tools: Arrange to check public headers for ANSI compatiblity

Using the same rune as we use for the Xen public headers, except we do
not need stdint.h here.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Ian Campbell committed 2016-01-22 12:21:39 +00:00
1 parent b7f76a699d
commit aae392b46c
4 files changed
+17 -2

No files matched your search

+2
View File
@@ -87,6 +87,8 @@ tools/config.cache
config/Tools.mk
config/Stubdom.mk
config/Docs.mk
tools/libs/toollog/headers.chk
tools/libs/evtchn/headers.chk
tools/blktap2/daemon/blktapctrl
tools/blktap2/drivers/img2qcow
tools/blktap2/drivers/lock-util
+8
View File
@@ -176,6 +176,14 @@ INSTALL_PYTHON_PROG = \
%.opic: %.S
$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) $(CFLAGS.opic) -fPIC -c -o $@ $< $(APPEND_CFLAGS)
headers.chk:
for i in $(filter %.h,$^); do \
$(CC) -x c -ansi -Wall -Werror $(CFLAGS_xeninclude) \
-S -o /dev/null $$i || exit 1; \
echo $$i; \
done >$@.new
mv $@.new $@
subdirs-all subdirs-clean subdirs-install subdirs-distclean: .phony
@set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
$(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
+3 -1
View File
@@ -32,8 +32,9 @@ build:
$(MAKE) libs
.PHONY: libs
libs: $(LIB)
libs: headers.chk $(LIB)
headers.chk: $(wildcard include/*.h)
libxenevtchn.a: $(LIB_OBJS)
$(AR) rc $@ $^
@@ -64,6 +65,7 @@ TAGS:
clean:
rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
rm -f libxenevtchn.so.$(MAJOR).$(MINOR) libxenevtchn.so.$(MAJOR)
rm -f headers.chk
.PHONY: distclean
distclean: clean
+4 -1
View File
@@ -27,7 +27,9 @@ build:
$(MAKE) libs
.PHONY: libs
libs: $(LIB)
libs: headers.chk $(LIB)
headers.chk: $(wildcard include/*.h)
libxentoollog.a: $(LIB_OBJS)
$(AR) rc $@ $^
@@ -58,6 +60,7 @@ TAGS:
clean:
rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
rm -f libxentoollog.so.$(MAJOR).$(MINOR) libxentoollog.so.$(MAJOR)
rm -f headers.chk
.PHONY: distclean
distclean: clean
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.