maint.mk: detect incorrect GFDL usage
authorEric Blake <ebb9@byu.net>
Thu, 7 Jan 2010 03:47:08 +0000 (20:47 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 7 Jan 2010 03:47:08 +0000 (20:47 -0700)
Similar to the existing sc_GPL_version.  Fortunately, the two licenses
have enough distinction in wording so that neither regexp is a false
positive for the other license.  This won't catch files that line wrap
differently than expected; as it was, the GFDL needed two regexp to
handle the use of GFDL in the m4 project.

* top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
top/maint.mk

index d9e6c44..92973cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-06  Eric Blake  <ebb9@byu.net>
+
+       maint.mk: detect incorrect GFDL usage
+       * top/maint.mk (_GFDL_regexp, sc_GFDL_version): New rule.
+
 2010-01-06  Jim Meyering  <meyering@redhat.com>
        and Eric Blake  <ebb9@byu.net>
 
index 084a177..d1f0ccd 100644 (file)
@@ -495,6 +495,13 @@ sc_GPL_version:
        @re='either ''version [^3]' msg='GPL vN, N!=3'                  \
          $(_prohibit_regexp)
 
+# Require the latest GFDL.  Two regexp, since some .texi files end up
+# line wrapping between 'Free Documentation License,' and 'Version'.
+_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
+sc_GFDL_version:
+       @re='$(_GFDL_regexp)' msg='GFDL vN, N!=3'                       \
+         $(_prohibit_regexp)
+
 cvs_keywords = \
   Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State