mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
Require that most .c files include <config.h>.
(sc_require_config_h): New rule. (syntax-check-rules): Add it.
This commit is contained in:
1 parent
13e06b3243
commit
68943d27f8
1 file changed
+11
@@ -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)) \
|
||||
|
||||
|
||||
Reference in new issue
Block a user