summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-13 14:26:50 +0200
committerBruno Haible <bruno@clisp.org>2023-04-13 14:26:50 +0200
commit78e5c144edb7a5edab8638f663bb83ac329924f9 (patch)
tree9a781332ae7fa75d4c561f243d0bb8d9f754245a /Makefile
parentd9ed3c73e18a547a1a7c2d45755fa3bde5f65209 (diff)
downloadgnulib-78e5c144edb7a5edab8638f663bb83ac329924f9.tar.gz
ialloc, gethrxtime: Restore GCC diagnostics options.
* lib/ialloc.h: Invoke _GL_INLINE_HEADER_END. * lib/xtime.h: Likewise. * Makefile (sc_check_GL_INLINE_HEADER_use): New rule.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 76e3b5cc54..d0906b2315 100644
--- a/Makefile
+++ b/Makefile
@@ -227,6 +227,19 @@ sc_check_config_h_reminder:
exit $$fail
+# Ensure that .h files that invoke _GL_INLINE_HEADER_BEGIN also invoke
+# _GL_INLINE_HEADER_END. Otherwise, some GCC diagnostics remain turned off
+# for the rest of the compilation unit.
+sc_check_GL_INLINE_HEADER_use:
+ fail=0; \
+ for file in `grep -l -F -w _GL_INLINE_HEADER_BEGIN lib/*.h lib/*/*.h`; do \
+ grep -l -F -w _GL_INLINE_HEADER_END $$file >/dev/null \
+ || { echo "File $$file lacks an invocation of _GL_INLINE_HEADER_END."; \
+ fail=1; \
+ }; \
+ done; \
+ exit $$fail
+
# Ensure that the copyright statements in files and in the module descriptions
# are consistent.
sc_check_copyright: