about summary refs log tree commit diff
path: root/Rules
diff options
context:
space:
mode:
Diffstat (limited to 'Rules')
-rw-r--r--Rules23
1 files changed, 23 insertions, 0 deletions
diff --git a/Rules b/Rules
index 8306d36a07..342d659408 100644
--- a/Rules
+++ b/Rules
@@ -80,6 +80,29 @@ $(common-objpfx)dummy.c:
 	(echo 'extern void __dummy__ (void);'; \
 	 echo 'void __dummy__ (void) { }') > $@
 common-generated += dummy.o dummy.c
+
+ifneq "$(headers)" ""
+# Special test of all the installed headers in this directory.
+tests-special += $(objpfx)check-installed-headers-c.out
+libof-check-installed-headers-c := nonlib
+$(objpfx)check-installed-headers-c.out: \
+    $(..)scripts/check-installed-headers.sh $(headers)
+	$(SHELL) $(..)scripts/check-installed-headers.sh c \
+	  "$(CC) $(filter-out -std=%,$(CFLAGS)) -D_ISOMAC $(+includes)" \
+	  $(headers) > $@; \
+	$(evaluate-test)
+
+ifneq "$(CXX)" ""
+tests-special += $(objpfx)check-installed-headers-cxx.out
+libof-check-installed-headers-cxx := nonlib
+$(objpfx)check-installed-headers-cxx.out: \
+    $(..)scripts/check-installed-headers.sh $(headers)
+	$(SHELL) $(..)scripts/check-installed-headers.sh c++ \
+	  "$(CXX) $(filter-out -std=%,$(CXXFLAGS)) -D_ISOMAC $(+includes)" \
+	  $(headers) > $@; \
+	$(evaluate-test)
+endif
+endif
 
 # This makes all the auxiliary and test programs.