From 68943d27f8a4e67e8e34c767f9884a8d6a60fb9d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 13 Nov 2005 15:05:45 +0000 Subject: [PATCH] Require that most .c files include . (sc_require_config_h): New rule. (syntax-check-rules): Add it. --- Makefile.maint | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile.maint b/Makefile.maint index a996f21..df3c2e7 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -79,6 +79,7 @@ syntax-check-rules = \ sc_obsolete_symbols \ sc_prohibit_atoi_atof \ sc_prohibit_jm_in_m4 \ + sc_require_config_h \ sc_root_tests \ sc_space_tab \ sc_sun_os_names \ @@ -163,6 +164,15 @@ sc_no_if_have_config_h: { echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \ 1>&2; exit 1; } || : +# Nearly all .c files must include . +sc_require_config_h: + @( $(CVS_LIST) ) > /dev/null 2>&1 || : && \ + grep -L '^# *include ' \ + $$($(CVS_LIST) | grep '\.c$$' | grep -vEf .x-$@ ) \ + | grep . && \ + { echo '$(ME): the above files do not include ' \ + 1>&2; exit 1; } || : + sc_obsolete_symbols: @( $(CVS_LIST) ) > /dev/null 2>&1 || : && \ grep -E '\<(HAVE_FCNTL_H)\>' \ @@ -487,6 +497,7 @@ announcement: NEWS ChangeLog $(rel-files) --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --release-archive-directory=$(release_archive_dir) \ + --gpg-key-id=$(gpg_key_ID) \ --news=NEWS \ $(addprefix --url-dir=, $(url_dir_list)) \ -- 2.7.4