1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

build-sys: add check that our headers are ANSI compatible

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-03-11 13:33:43 -05:00
parent 5d331c192f
commit 7f495b9848

View File

@ -6161,7 +6161,6 @@ DISTCHECK_CONFIGURE_FLAGS += \
endif
.PHONY: dist-check-help
dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
for i in $(abspath $^); do \
if $$i --help | grep -v 'default:' | grep -E -q '.{80}.' ; then \
@ -6170,6 +6169,18 @@ dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
exit 1; \
fi; done
include_compilers = "$(CC)" "$(CC) -ansi" "$(CC) -std=iso9899:1990"
public_headers = $(filter-out src/systemd/_sd-common.h, $(pkginclude_HEADERS) $(include_HEADERS))
.PHONY: dist-check-includes
dist-check-includes: $(public_headers)
@res=0; \
for i in $(abspath $^); do \
for cc in $(include_compilers); do \
echo "$$cc -o/dev/null -c -x c -include "$$i" - </dev/null"; \
$$cc -o/dev/null -c -x c -include "$$i" - </dev/null || res=1; \
done; \
done; exit $$res
.PHONY: hwdb-update
hwdb-update:
( cd $(top_srcdir)/hwdb && \