diff options
author | Jim Meyering <jim@meyering.net> | 2003-08-13 07:03:09 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-08-13 07:03:09 +0000 |
commit | 046557715cf56fa5d032117b4d49b6348426c53c (patch) | |
tree | 6a1a158fe78e56996f1c4259109b6a3391f5fb5d | |
parent | 4f9e9c540a53e26b4df6efe5728f142a59fff394 (diff) | |
download | coreutils-046557715cf56fa5d032117b4d49b6348426c53c.tar.xz |
(syntax checks): Use cvsu more (so we check only
version-controlled files), rather than hard-coding exclusions
for generated files like cppi.c.
-rw-r--r-- | Makefile.maint | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/Makefile.maint b/Makefile.maint index afd384eff..07fdb93d7 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -106,12 +106,11 @@ sc_cast_of_x_alloc_return_value: exit 1; } || : sc_space_tab: - @grep -E '[ ] ' --exclude=$(srcdir)/lib/regex.c \ - $(srcdir)/{lib,src}/*.[chly] \ - $(find -name Makefile.am) && \ + @( cvsu --list ) > /dev/null 2>&1 || : && \ + grep '[ ] ' $$(cvsu --list \ + | grep -vE 'configure|config\.(guess|sub)') && \ { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ - 1>&2; \ - exit 1; } || : + 1>&2; exit 1; } || : # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use `0' instead. @@ -121,6 +120,7 @@ sc_error_exit_success: { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ exit 1; } || : +# FIXME: merge this with sc_system_h_headers below. # xalloc.h is included via system.h, so should not be included # directly by any file in src/. sc_xalloc_h_in_src: @@ -130,6 +130,8 @@ sc_xalloc_h_in_src: fi; \ fi +# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ + # Each nonempty line must start with a year number, or a TAB. sc_changelog: @grep '^[^12 ]' $$(find . -name ChangeLog -maxdepth 2) && \ @@ -162,10 +164,11 @@ h_re := $(shell echo '$(header_regexp)'|tr -d ' ') # Get list of candidates with this: # grep -h include src/sys*.h|sed 's/.*include //'|sort - sc_system_h_headers: - @grep -E '^# *include ["<]($(h_re))\.h[">]' \ - $(srcdir)/src/*.c && \ - { echo '$(ME): the above are already included via system.h' 1>&2; \ - exit 1; } || : + @( cvsu --list ) > /dev/null 2>&1 || : && \ + grep -E '^# *include ["<]($(h_re))\.h[">]' \ + $$(cvsu --list src | grep -Ev 'sys(2|tem)\.h$$') \ + && { echo '$(ME): the above are already included via system.h'\ + 1>&2; exit 1; } || : sc_sun_os_names: @( cvsu --list ) > /dev/null 2>&1 || : && \ @@ -205,6 +208,15 @@ changelog-check: exit 1; \ fi +cvs-diff-check: + if $(CVS) diff >cvs-diffs; then \ + rm cvs-diffs; \ + else \ + echo "Some files are locally modified:" 1>&2; \ + cat cvs-diffs; \ + exit 1; \ + fi + m4-check: @grep 'AC_DEFUN([^[]' m4/*.m4 \ && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \ |