From ea42025c70bf2b63f5fb688d441d8bee7c720265 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 1 Mar 2007 11:05:35 +0100 Subject: [PATCH] Make "make syntax-check" rules less coreutils-specific. * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT. (sc_cast_of_alloca_return_value): Likewise. (sc_root_tests): Do nothing if there is no check-root target in tests/Makefile.am. --- ChangeLog | 6 ++++++ Makefile.maint | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dcea044db..2b01c56f8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-03-01 Jim Meyering + Make "make syntax-check" rules less coreutils-specific. + * Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT. + (sc_cast_of_alloca_return_value): Likewise. + (sc_root_tests): Do nothing if there is no check-root target + in tests/Makefile.am. + Run the writable-files check only for release-building targets. * Makefile.maint (local-checks-available): Remove writable-files. (alpha beta major): Put it here, instead. diff --git a/Makefile.maint b/Makefile.maint index 23386c28b3..fece10c6bc 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -103,16 +103,12 @@ sc_cast_of_argument_to_free: exit 1; } || : sc_cast_of_x_alloc_return_value: - @grep -nE --exclude=$(srcdir)/lib/xalloc.h \ - --exclude=$(srcdir)/lib/regex.c \ - '\*\) *x(m|c|re)alloc\>' \ - $(srcdir)/{lib,src}/*.[chy] && \ + @grep -nE '\*\) *x(m|c|re)alloc\>' $$($(CVS_LIST_EXCEPT)) && \ { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \ exit 1; } || : sc_cast_of_alloca_return_value: - @grep -nE '\*\) *alloca\>' \ - $(srcdir)/src/*.[chy] && \ + @grep -nE '\*\) *alloca\>' $$($(CVS_LIST_EXCEPT)) && \ { echo '$(ME): don'\''t cast alloca return value' 1>&2; \ exit 1; } || : @@ -212,7 +208,9 @@ sc_prohibit_jm_in_m4: 1>&2; exit 1; } || : sc_root_tests: - @t1=sc-root.expected; t2=sc-root.actual; \ + @if test -d tests \ + && grep check-root tests/Makefile.am>/dev/null 2>&1; then \ + t1=sc-root.expected; t2=sc-root.actual; \ grep -nl '^PRIV_CHECK_ARG=require-root' \ $$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \ sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \ @@ -221,7 +219,8 @@ sc_root_tests: rm -f $$t1 $$t2; \ test "$$diff" \ && { echo 'tests/Makefile.am: missing check-root action'>&2; \ - exit 1; } || : + exit 1; } || :; \ + fi headers_with_interesting_macro_defs = \ exit.h \ -- 2.47.2