From: Jim Meyering Date: Mon, 21 Apr 2008 10:09:07 +0000 (+0000) Subject: Enable 'make syntax-check's sc_changelog rule. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=95a7adf3e637d5d5ad5a06760fea6c2573840f12;p=libvirt.git Enable 'make syntax-check's sc_changelog rule. * Makefile.maint (sc_changelog): Adapt to work with legacy ChangeLog entry header lines. * Makefile.cfg (local-checks-to-skip): Remove sc_changelog. --- diff --git a/ChangeLog b/ChangeLog index 8bb5e98b3e..67e8d6f9fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-21 Jim Meyering + + Enable 'make syntax-check's sc_changelog rule. + * Makefile.maint (sc_changelog): Adapt to work with legacy + ChangeLog entry header lines. + * Makefile.cfg (local-checks-to-skip): Remove sc_changelog. + Fri Apr 18 14:30:12 EST 2008 Daniel P. Berrange Work around Python.h name-space pollution. diff --git a/Makefile.cfg b/Makefile.cfg index 7e8ddcfb2d..e0d5528722 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -32,7 +32,6 @@ local-checks-to-skip = \ sc_GPL_version \ sc_always_defined_macros \ sc_cast_of_alloca_return_value \ - sc_changelog \ sc_dd_max_sym_length \ sc_error_exit_success \ sc_file_system \ diff --git a/Makefile.maint b/Makefile.maint index 4e41134575..b864455b4b 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -166,8 +166,12 @@ sc_obsolete_symbols: # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ # Each nonempty line must start with a year number, or a TAB. +# Or day-of-week+space. +changelog_entry_header_regexp = \ + ([12][0-9][0-9][0-9]| .|(Mon|Tue|Wed|Thu|Fri|Sat|Sun) ) sc_changelog: - @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \ + @grep -Evn '(^$$|^$(changelog_entry_header_regexp))' \ + $$(find . -maxdepth 2 -name ChangeLog) && \ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ exit 1; } || :