3 # Copyright (C) 2011-2019 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 for module
in `./gnulib-tool --list`; do
21 module_license
=`./gnulib-tool --extract-license $module`
22 if test "$module_license" = 'GPLed build tool'; then
25 for file in `./gnulib-tool --extract-filelist $module | grep '^\(lib\|build-aux\)/'`; do
26 if grep 'GNU General Public' $file > /dev
/null
; then
27 if grep 'version 3 or later' $file > /dev
/null \
28 ||
grep 'either version 3' $file > /dev
/null
; then
31 if grep 'version 2 or later' $file > /dev
/null \
32 ||
grep 'either version 2' $file > /dev
/null
; then
39 if grep 'Lesser General' $file > /dev
/null
; then
40 if grep 'version 3 or later' $file > /dev
/null \
41 ||
grep 'either version 3' $file > /dev
/null
; then
44 if grep 'version 2 or later' $file > /dev
/null \
45 ||
grep 'version 2 of the License, or' $file > /dev
/null \
46 ||
grep 'version 2\.1 of the License, or' $file > /dev
/null
; then
47 file_license
='LGPLv2+'
56 if test "$file_license" != "$module_license"; then
57 if test $error = 0; then
58 echo "Module License File License File name"
59 echo "============== ============== ====================================="
61 printf '%-14s %-14s %s\n' "$module_license" "$file_license" "$file"