diff options
author | Jim Meyering <jim@meyering.net> | 2005-11-13 15:05:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-11-13 15:05:45 +0000 |
commit | 68943d27f8a4e67e8e34c767f9884a8d6a60fb9d (patch) | |
tree | 5e15d97359f61a83b9b2f7ed04ab23031918e04b | |
parent | 13e06b32432b4765322d3cc802e8bdbd369306b8 (diff) | |
download | coreutils-68943d27f8a4e67e8e34c767f9884a8d6a60fb9d.tar.xz |
Require that most .c files include <config.h>.
(sc_require_config_h): New rule.
(syntax-check-rules): Add it.
-rw-r--r-- | Makefile.maint | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.maint b/Makefile.maint index a996f219a..df3c2e7b6 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 <config.h>. +sc_require_config_h: + @( $(CVS_LIST) ) > /dev/null 2>&1 || : && \ + grep -L '^# *include <config\.h>' \ + $$($(CVS_LIST) | grep '\.c$$' | grep -vEf .x-$@ ) \ + | grep . && \ + { echo '$(ME): the above files do not include <config.h>' \ + 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)) \ |