diff options
author | Daniel Mack <github@zonque.org> | 2016-03-14 16:55:04 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2016-03-14 16:55:04 +0100 |
commit | ca9bc74bd0c80492af1f1b59f34094eddbea3c33 (patch) | |
tree | 38e987faebaffdec15b4079a528450dfe7397250 /Makefile.am | |
parent | 70e43ee7be6ee8d1e8aa4b2984a72baa25709c2e (diff) | |
parent | e0c0b07da191f152db116ba38c352b21004f1c93 (diff) |
Merge pull request #2827 from keszybz/public-headers
ANSI C compatibility for public headers
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 9cee98ec5a..0f1f79e62d 100644 --- a/Makefile.am +++ b/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 && \ |