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

[Libvir] [PATCH] Enable 'make syntax-check's sc_changelog rule.



I went ahead and wrote the change:

	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.

---
 Makefile.cfg   |    1 -
 Makefile.maint |    6 +++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile.cfg b/Makefile.cfg
index 7e8ddcf..e0d5528 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 a357d74..65d6fc2 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; } || :

--
1.5.5.rc2.7.g144a


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