bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rules, rules, and more (code policy) rules


From: Jim Meyering
Subject: Re: rules, rules, and more (code policy) rules
Date: Sat, 11 Feb 2006 08:42:15 +0100

Paul Eggert <address@hidden> wrote:
> 2006-02-10  Paul Eggert  <address@hidden>
>       * Makefile.maint (CVS_LIST): Don't assume cvsu is available.
>       (CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
>       Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
...

Thanks for the clean-up!

>       (syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
>       go away? was that an accident?)

It certainly was.
As penance, I've finally removed that list altogether.
It was annoying always to have to add each new rule
name to the list of all syntax-check rules.
Now, you just create a new rule, and as long as its name starts
with `sc_' it'll be used:

2006-02-11  Jim Meyering  <address@hidden>

        * Makefile.maint (syntax-check-rules): Automatically derive this
        list of sc_-prefixed rule names.

Index: Makefile.maint
===================================================================
RCS file: /fetish/cu/Makefile.maint,v
retrieving revision 1.228
retrieving revision 1.230
diff -u -p -r1.228 -r1.230
--- Makefile.maint      11 Feb 2006 06:05:23 -0000      1.228
+++ Makefile.maint      11 Feb 2006 07:38:25 -0000      1.230
@@ -91,30 +91,9 @@ local-checks-available = \
 
 local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
 
+# Collect the names of rules starting with `sc_'.
+syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
 .PHONY: $(syntax-check-rules)
-syntax-check-rules = \
-  sc_cast_of_argument_to_free \
-  sc_cast_of_x_alloc_return_value \
-  sc_cast_of_alloca_return_value \
-  sc_changelog \
-  sc_dd_max_sym_length \
-  sc_error_exit_success \
-  sc_file_system \
-  sc_no_if_have_config_h \
-  sc_obsolete_symbols \
-  sc_prohibit_atoi_atof \
-  sc_prohibit_jm_in_m4 \
-  sc_prohibit_assert_without_use \
-  sc_require_config_h \
-  sc_root_tests \
-  sc_space_tab \
-  sc_sun_os_names \
-  sc_system_h_headers \
-  sc_tight_scope \
-  sc_trailing_blank \
-  sc_two_space_separator_in_usage \
-  sc_unmarked_diagnostics \
-  sc_useless_cpp_parens
 
 syntax-check: $(syntax-check-rules)
 #      @grep -nE '#  *include <(limits|std(def|arg|bool))\.h>'         \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]