Mercurial > hg > octave-lojdl > gnulib-hg
changeset 7660:7aa6fbd6b3b7
Add license compatibility check in --create-testdir.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 15 Nov 2006 20:47:08 +0000 |
parents | e2febe678452 |
children | bf2c99d395bd |
files | ChangeLog gnulib-tool |
diffstat | 2 files changed, 30 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-15 Yoann Vandoorselaere <yoann.v@prelude-ids.com> + Bruno Haible <bruno@clisp.org> + + * gnulib-tool (func_create_testdir): Add license consistency check. + 2006-11-15 Eric Blake <ebb9@byu.net> * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
--- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-11-14 09:37:20 $' +cvsdatestamp='$Date: 2006-11-15 20:47:09 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -2247,6 +2247,30 @@ fi modules=`for m in $modules; do echo $m; done | LC_ALL=C sort -u` + # Check that the license of every module is consistent with the license of + # its dependencies. + saved_modules="$modules" + for requested_module in $saved_modules; do + requested_license=`func_get_license "$requested_module"` + if test "$requested_license" != GPL; then + # Here we use func_modules_transitive_closure, not just + # func_get_dependencies, so that we also detect weird situations like + # an LGPL module which depends on a GPLed build tool module which depends + # on a GPL module. + modules="$requested_module" + func_modules_transitive_closure + for module in $modules; do + license=`func_get_license "$module"` + case $license in + LGPL | 'GPLed build tool') ;; + 'public domain' | 'unlimited' | 'unmodifiable license text') ;; + *) echo "warning: module $requested_module depends on a module with an incompatible license: $module" 1>&2 ;; + esac + done + fi + done + modules="$saved_modules" + # Subdirectory names. sourcebase=gllib m4base=glm4