# HG changeset patch # User Bruno Haible # Date 1163623628 0 # Node ID e81480bd2f39fa68d05dc6a1f2fc65da23cedcfb # Parent ac08d168626035b1b6cb7458d6566bc9fef3074c Add license compatibility check in --create-testdir. diff -r ac08d1686260 -r e81480bd2f39 ChangeLog --- a/ChangeLog Wed Nov 15 18:13:04 2006 +0000 +++ b/ChangeLog Wed Nov 15 20:47:08 2006 +0000 @@ -1,3 +1,8 @@ +2006-11-15 Yoann Vandoorselaere + Bruno Haible + + * gnulib-tool (func_create_testdir): Add license consistency check. + 2006-11-15 Eric Blake * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a diff -r ac08d1686260 -r e81480bd2f39 gnulib-tool --- a/gnulib-tool Wed Nov 15 18:13:04 2006 +0000 +++ b/gnulib-tool Wed Nov 15 20:47:08 2006 +0000 @@ -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