diff options
Diffstat (limited to 'Makefile.maint')
-rw-r--r-- | Makefile.maint | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Makefile.maint b/Makefile.maint index f62c080e0..45c7c0d99 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -50,19 +50,35 @@ release_archive_dir ?= ../release # new ChangeLog entries. local-check = \ po-check copyright-check writable-files m4-check author_mark_check \ - changelog-check strftime-check xalloc-check makefile_path_separator_check \ + changelog-check strftime-check syntax-check makefile_path_separator_check \ makefile-check .PHONY: $(local-check) # Make sure C source files in src/ don't include xalloc.h directly, # since they all already include it via sys2.h. # It's not a big deal -- just aesthetics. -xalloc-check: +syntax-check: if test -f $(srcdir)/src/sys2.h; then \ if grep 'xalloc\.h' $(srcdir)/src/*.c; then \ exit 1; \ fi; \ fi + @grep -E '[ ] ' --exclude=$(srcdir)/lib/regex.c \ + $(srcdir)/{lib,src}/*.[chy] \ + $(find -name Makefile.am) && \ + { echo 'Makefile.maint: found SPACE-TAB sequence; remove the SPACE' \ + 1>&2; \ + exit 1; } || : + @grep -E --exclude=$(srcdir)/lib/regex.c \ + '\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \ + { echo 'Makefile.maint: don'\''t cast x*alloc return value' 1>&2; \ + exit 1; } || : + +# grep -E '^# *include <(string|stdlib)\.h>' \ +# $(srcdir)/{lib,src}/*.[chy] && \ +# { echo 'Makefile.maint: FIXME' 1>&2; \ +# exit 1; } || : +# FIXME: don't allow `#include .strings\.h' anywhere # Ensure that date's --help output stays in sync with the info # documentation for GNU strftime. The only exception is %N, |