diff options
author | Pedro Alves <palves@redhat.com> | 2014-01-13 19:36:38 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-01-13 19:36:38 +0000 |
commit | f71e1a8ddb5a41dddb0dea92aefe694e26d4c174 (patch) | |
tree | 2f76315042d7c0e511ef01c3412bbd0c91eca57a | |
parent | 42c85435d662ce7e355bb7d2b9c14675ebb6a1a1 (diff) | |
download | binutils-f71e1a8ddb5a41dddb0dea92aefe694e26d4c174.zip binutils-f71e1a8ddb5a41dddb0dea92aefe694e26d4c174.tar.gz binutils-f71e1a8ddb5a41dddb0dea92aefe694e26d4c174.tar.bz2 |
New "make check-headers" rule.
Tries to compile each header in isolation, thus ensuring headers are
self-contained.
Defaults to checking all $HFILES_NO_SRCDIR headers.
Do:
make check-headers CHECK_HEADERS="header.h list.h"
to check specific headers.
gdb/
2014-01-13 Pedro Alves <palves@redhat.com>
* Makefile.in (CHECK_HEADERS): New variable.
(check-headers:): New rule.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/Makefile.in | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6cdafcc..18ed4d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-01-13 Pedro Alves <palves@redhat.com> + + * Makefile.in (CHECK_HEADERS): New variable. + (check-headers:): New rule. + 2014-01-13 Tom Tromey <tromey@redhat.com> * cli/cli-setshow.c (do_set_command): Update. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 824b26b..9811cbe 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1050,6 +1050,28 @@ check//%: force "$$target"; \ else true; fi +# The set of headers checked by 'check-headers' by default. +CHECK_HEADERS = $(HFILES_NO_SRCDIR) + +# Try to compile each header in isolation, thus ensuring headers are +# self-contained. +# +# Defaults to checking all $HFILES_NO_SRCDIR headers. +# +# Do: +# +# make check-headers CHECK_HEADERS="header.h list.h" +# +# to check specific headers. +# +check-headers: + @echo Checking headers. + for i in $(CHECK_HEADERS) ; do \ + $(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \ + -include defs.h $(srcdir)/$$i ; \ + done +.PHONY: check-headers + info install-info clean-info dvi pdf install-pdf html install-html: force @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do |