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.
This commit is contained in:
parent
42c85435d6
commit
f71e1a8ddb
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue