X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gnulib-tool;h=3a87d2fe13f74ef5bd3901c827bc67002b237bf9;hb=4567197dc951483c44be91345e38bc1736e5b7f8;hp=a6b81eb9aca2147994592bd490c70a2c400d89a9;hpb=d6424b2f5a692d3e7a933f50df7ee9b3fa911a0c;p=gnulib.git diff --git a/gnulib-tool b/gnulib-tool index a6b81eb9a..3a87d2fe1 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2003-01-13 21:57:21 $' +cvsdatestamp='$Date: 2003-09-17 18:30:23 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` @@ -57,6 +57,7 @@ Usage: gnulib-tool --list gnulib-tool --extract-autoconf-snippet module gnulib-tool --extract-automake-snippet module gnulib-tool --extract-include-directive module + gnulib-tool --extract-maintainer module Operation modes: --list print the available module names @@ -65,19 +66,20 @@ Operation modes: --create-megatestdir create a mega scratch package with the given modules one by one and all together --test test the combination of the given modules - (recommended to use CC="gcc -Wall -Werror" here) + (recommended to use CC=\"gcc -Wall\" here) --megatest test the given modules one by one and all together - (recommended to use CC="gcc -Wall -Werror" here) + (recommended to use CC=\"gcc -Wall\" here) --extract-description extract the description --extract-filelist extract the list of files --extract-dependencies extract the dependencies --extract-autoconf-snippet extract the snippet for configure.ac --extract-automake-snippet extract the snippet for lib/Makefile.am --extract-include-directive extract the #include directive + --extract-maintainer report the maintainer(s) inside gnulib Options: --dir=DIRECTORY specify the target directory - --lib=libRARY specify the library name + --lib=LIBRARY specify the library name --no-changelog don't update or create ChangeLog files Report bugs to ." @@ -195,7 +197,7 @@ case "$0" in fi ;; esac -while test -L "$self_abspathname"; do +while test -h "$self_abspathname"; do # Resolve symbolic link. sedexpr1='s, -> ,#%%#,' sedexpr2='s,^.*#%%#\(.*\)$,\1,p' @@ -229,11 +231,16 @@ func_verify_module () fi } -tags_regexp='\(Description\|Files\|Depends-on\|configure\.ac\|Makefile\.am\|Include\)' sed_extract_prog=':[ ]*$/ { :a n - s/^'"$tags_regexp"':[ ]*$// + s/^Description:[ ]*$// + s/^Files:[ ]*$// + s/^Depends-on:[ ]*$// + s/^configure\.ac:[ ]*$// + s/^Makefile\.am:[ ]*$// + s/^Include:[ ]*$// + s/^Maintainer:[ ]*$// tb p ba @@ -279,6 +286,12 @@ func_get_include_directive () sed -e 's/^\(["<]\)/#include \1/' } +# func_get_maintainer module +func_get_maintainer () +{ + sed -n -e "/^Maintainer$sed_extract_prog" < "$gnulib_dir/modules/$1" +} + # func_create_testdir testdir modules func_create_testdir () { @@ -292,6 +305,11 @@ func_create_testdir () for module in $modules; do func_verify_module if test -n "$module"; then + # Duplicate dependenies are harmless, but Jim wants a warning. + duplicated_deps=`func_get_dependencies $module | sort | uniq -d` + if test -n "$duplicated_deps"; then + echo "warning: module $module has duplicated dependencies: "`echo $duplicated_deps` 1>&2 + fi xmodules="$xmodules $module "`func_get_dependencies $module` fi done @@ -413,6 +431,10 @@ func_create_testdir () echo "AC_GNU_SOURCE" echo fi + if grep gl_USE_SYSTEM_EXTENSIONS "$testdir"/m4/*.m4 > /dev/null; then + echo "gl_USE_SYSTEM_EXTENSIONS" + echo + fi for module in $modules; do func_verify_module if test -n "$module"; then @@ -636,6 +658,16 @@ case $mode in done ;; + extract-maintainer ) + for module + do + func_verify_module + if test -n "$module"; then + func_get_maintainer "$module" + fi + done + ;; + * ) func_fatal_error "unknown operation mode --$mode" ;; esac