]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: ensure emit_mandatory_arg_note() used if needed
authorPádraig Brady <P@draigBrady.com>
Tue, 15 Dec 2015 17:10:10 +0000 (17:10 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 15 Dec 2015 17:44:45 +0000 (17:44 +0000)
* cfg.mk (sc_emit_mandatory_arg_note): Add new syntax check.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 656035bf5fffc688fead22eecfb6705476e23eb3..23f166189a9cee428dbe0f85664f0c0b4d4d22f8 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -140,6 +140,14 @@ sc_prohibit_colon_redirection:
               exit 1; }  \
          || :
 
+# Ensure emit_mandatory_arg_note() is called if required
+sc_ensure_emit_mandatory_arg_note:
+       @cd $(srcdir)/src && GIT_PAGER= git \
+         grep -l -- '^ *-[^-].*--.*[^[]=' *.c \
+         | xargs grep -L emit_mandatory_arg_note | grep . \
+         && { echo '$(ME): '"emit_mandatory_arg_note() missing" 1>&2; \
+              exit 1; } || :
+
 # Create a list of regular expressions matching the names
 # of files included from system.h.  Exclude a couple.
 .re-list: