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:
parent
5d331c192f
commit
7f495b9848
13
Makefile.am
13
Makefile.am
@ -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 && \
|
||||
|
Loading…
Reference in New Issue
Block a user