]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make "make syntax-check" rules less coreutils-specific.
authorJim Meyering <jim@meyering.net>
Thu, 1 Mar 2007 10:05:35 +0000 (11:05 +0100)
committerJim Meyering <jim@meyering.net>
Thu, 1 Mar 2007 10:05:35 +0000 (11:05 +0100)
* 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
Makefile.maint

index 0dcea044db3c3c608109a6e8ae46353d30a25ef5..2b01c56f8e8da16cbb526a2e595eb65b78f0a002 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-03-01  Jim Meyering  <jim@meyering.net>
 
+       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.
index 23386c28b3b3b70014a29104c0e5c4bcc63550ec..fece10c6bc8dd685fda954dbb6761855a13d2a48 100644 (file)
@@ -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       \