aboutsummaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
Diffstat (limited to 'Rules')
-rw-r--r--Rules17
1 files changed, 16 insertions, 1 deletions
diff --git a/Rules b/Rules
index e08a28d9f3..222dba6dcb 100644
--- a/Rules
+++ b/Rules
@@ -82,7 +82,8 @@ $(common-objpfx)dummy.c:
common-generated += dummy.o dummy.c
ifneq "$(headers)" ""
-# Special test of all the installed headers in this directory.
+# Test that all of the headers installed by this directory can be compiled
+# in isolation.
tests-special += $(objpfx)check-installed-headers-c.out
libof-check-installed-headers-c := testsuite
$(objpfx)check-installed-headers-c.out: \
@@ -93,6 +94,8 @@ $(objpfx)check-installed-headers-c.out: \
$(evaluate-test)
ifneq "$(CXX)" ""
+# If a C++ compiler is available, also test that they can be compiled
+# in isolation as C++.
tests-special += $(objpfx)check-installed-headers-cxx.out
libof-check-installed-headers-cxx := testsuite
$(objpfx)check-installed-headers-cxx.out: \
@@ -103,12 +106,24 @@ $(objpfx)check-installed-headers-cxx.out: \
$(evaluate-test)
endif # $(CXX)
+# Test that a wrapper header exists in include/ for each non-sysdeps header.
+# This script does not need $(py-env).
tests-special += $(objpfx)check-wrapper-headers.out
$(objpfx)check-wrapper-headers.out: \
$(..)scripts/check-wrapper-headers.py $(headers)
$(PYTHON) $< --root=$(..) --subdir=$(subdir) $(headers) > $@; \
$(evaluate-test)
+# Test that none of the headers installed by this directory use certain
+# obsolete constructs (e.g. legacy BSD typedefs superseded by stdint.h).
+# This script does not need $(py-env).
+tests-special += $(objpfx)check-obsolete-constructs.out
+libof-check-obsolete-constructs := testsuite
+$(objpfx)check-obsolete-constructs.out: \
+ $(..)scripts/check-obsolete-constructs.py $(headers)
+ $(PYTHON) $^ > $@ 2>&1; \
+ $(evaluate-test)
+
endif # $(headers)
# This makes all the auxiliary and test programs.