For test modules, use the license of the main module.
authorBruno Haible <bruno@clisp.org>
Sun, 14 Jan 2007 23:00:12 +0000 (23:00 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 14 Jan 2007 23:00:12 +0000 (23:00 +0000)
ChangeLog
gnulib-tool

index 633ad49..8313686 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-01-14  Bruno Haible  <bruno@clisp.org>
 
+       * gnulib-tool (func_get_license): For test modules, use the license of
+       the main module.
+
+2007-01-14  Bruno Haible  <bruno@clisp.org>
+
        * modules/iconv (Include): Clarify that <iconv.h> can only be included
        if iconv is found to exist.
 
index 147190f..bac9bd9 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2007-01-14 20:45:45 $'
+cvsdatestamp='$Date: 2007-01-14 23:00:12 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -1020,7 +1020,9 @@ func_get_include_directive ()
 # - local_gnulib_dir  from --local-dir
 func_get_license ()
 {
-  func_lookup_file "modules/$1"
+  # ${module}-tests always implicitly has the same license as ${module}.
+  sed_drop_tests_suffix='s/-tests$//'
+  func_lookup_file "modules/"`echo "$1" | sed -e "$sed_drop_tests_suffix"`
   sed -n -e "/^License$sed_extract_prog" < "$lookedup_file"
 }