X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gnulib-tool;h=9461027fe76155045496dc420b853bfde0a935af;hb=cf418aef267b88e25ada0c00890e34efb065ad72;hp=cb643a7cd7471b5bd62e40d0c6e45b1219f0d99d;hpb=92074aac5a16846cd07e964d11275c5ef8e4ac78;p=gnulib.git diff --git a/gnulib-tool b/gnulib-tool index cb643a7cd..9461027fe 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2002-2010 Free Software Foundation, Inc. +# Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -123,24 +123,12 @@ fi # outputs to stdout the --help usage message. func_usage () { - # This use of bold display can be removed on 2011-01-01. - if case "$TERM" in - xterm*) test -t 1;; - *) false;; - esac; then - # Assume xterm compatible escape sequences. - bold_on=`printf '\x1b[1m'` - bold_off=`printf '\x1b[0m'` - else - bold_on= - bold_off= - fi echo "\ Usage: gnulib-tool --list - gnulib-tool --find filename${bold_on} + gnulib-tool --find filename gnulib-tool --import [module1 ... moduleN] gnulib-tool --add-import [module1 ... moduleN] - gnulib-tool --remove-import [module1 ... moduleN]${bold_off} + gnulib-tool --remove-import [module1 ... moduleN] gnulib-tool --update gnulib-tool --create-testdir --dir=directory [module1 ... moduleN] gnulib-tool --create-megatestdir --dir=directory [module1 ... moduleN] @@ -165,14 +153,14 @@ Usage: gnulib-tool --list Operation modes: --list print the available module names - --find find the modules which contain the specified file${bold_on} + --find find the modules which contain the specified file --import import the given modules into the current package --add-import augment the list of imports from gnulib into the current package, by adding the given modules; if no modules are specified, update the current package from the current gnulib --remove-import reduce the list of imports from gnulib into the - current package, by removing the given modules${bold_off} + current package, by removing the given modules --update update the current package, restore files omitted from version control --create-testdir create a scratch package with the given modules @@ -2228,6 +2216,7 @@ func_get_automake_snippet () # automake will generate a useless dependency; this is harmless. case "$1" in relocatable-prog-wrapper) ;; + pt_chown) ;; *) func_filter_filelist extra_files "$nl" "$extra_files" '' '.c' '' '' if test -n "$extra_files"; then @@ -2930,6 +2919,18 @@ func_emit_lib_Makefile_am () echo "EXTRA_${libname}_${libext}_SOURCES =" if test "$libtool" = true; then echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)" + echo "${libname}_${libext}_LDFLAGS += -no-undefined" + # Synthesize an ${libname}_${libext}_LDFLAGS augmentation by combining + # the link dependencies of all modules. + for module in $modules; do + func_verify_nontests_module + if test -n "$module"; then + func_get_link_directive "$module" + fi + done \ + | LC_ALL=C sed -e '/^$/d' -e 's/ when linking with libtool.*//' \ + | LC_ALL=C sort -u \ + | LC_ALL=C sed -e 's/^/'"${libname}_${libext}"'_LDFLAGS += /' fi echo if test -n "$pobase"; then @@ -3842,11 +3843,16 @@ s,^\(.................................................[^ ]*\) *, yes | 3) sed_transform_main_lib_file=$sed_transform_main_lib_file' s/GNU General/GNU Lesser General/g + s/General Public License/Lesser General Public License/g + s/Lesser Lesser General Public License/Lesser General Public License/g ' ;; 2) sed_transform_main_lib_file=$sed_transform_main_lib_file' s/GNU General/GNU Lesser General/g + s/General Public License/Lesser General Public License/g + s/Lesser Lesser General Public License/Lesser General Public License/g + s/version [23]\([ ,]\)/version 2.1\1/g ' ;; @@ -3856,7 +3862,11 @@ s,^\(.................................................[^ ]*\) *, # Update license. sed_transform_main_lib_file=$sed_transform_main_lib_file' s/GNU Lesser General/GNU General/g + s/Lesser General Public License/General Public License/g + s/GNU Library General/GNU General/g + s/Library General Public License/General Public License/g + s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g ' fi @@ -3868,7 +3878,11 @@ s,^\(.................................................[^ ]*\) *, # Update license. sed_transform_build_aux_file=$sed_transform_build_aux_file' s/GNU Lesser General/GNU General/g + s/Lesser General Public License/General Public License/g + s/GNU Library General/GNU General/g + s/Library General Public License/General Public License/g + s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g ' fi @@ -3879,7 +3893,11 @@ s,^\(.................................................[^ ]*\) *, # Update license. sed_transform_testsrelated_lib_file=$sed_transform_testsrelated_lib_file' s/GNU Lesser General/GNU General/g + s/Lesser General Public License/General Public License/g + s/GNU Library General/GNU General/g + s/Library General Public License/General Public License/g + s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g ' fi @@ -4571,7 +4589,7 @@ s,//*$,/,' # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is # created using libtool, because libtool already handles the dependencies. if test "$libtool" != true; then - libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'` + libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'` echo " ${libname_upper}_LIBDEPS=\"\$gl_libdeps\"" echo " AC_SUBST([${libname_upper}_LIBDEPS])" echo " ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\"" @@ -4951,6 +4969,11 @@ func_create_testdir () echo "File list:" echo "$files" | sed -e 's/^/ /' fi + # Add files for which the copy in gnulib is newer than the one that + # "automake --add-missing --copy" would provide. + files="$files build-aux/config.guess" + files="$files build-aux/config.sub" + files=`for f in $files; do echo $f; done | LC_ALL=C sort -u` rewritten='%REWRITTEN%' sed_rewrite_files="\ @@ -5123,6 +5146,12 @@ func_create_testdir () *) func_get_autoconf_snippet "$module" \ | sed -e "$sed_replace_build_aux" + if test "$module" = 'alloca' && test "$libtool" = true; then + echo 'changequote(,)dnl' + echo 'LTALLOCA=`echo "$ALLOCA" | sed -e '"'"'s/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'"'"'`' + echo 'changequote([, ])dnl' + echo 'AC_SUBST([LTALLOCA])' + fi ;; esac fi @@ -5139,7 +5168,7 @@ func_create_testdir () # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is # created using libtool, because libtool already handles the dependencies. if test "$libtool" != true; then - libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'` + libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'` echo " ${libname_upper}_LIBDEPS=\"\$gl_libdeps\"" echo " AC_SUBST([${libname_upper}_LIBDEPS])" echo " ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\"" @@ -5245,13 +5274,19 @@ func_create_testdir () if test -n "$module"; then func_get_autoconf_snippet "$module" \ | sed -e "$sed_replace_build_aux" + if test "$module" = 'alloca' && test "$libtool" = true; then + echo 'changequote(,)dnl' + echo 'LTALLOCA=`echo "$ALLOCA" | sed -e '"'"'s/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'"'"'`' + echo 'changequote([, ])dnl' + echo 'AC_SUBST([LTALLOCA])' + fi fi done func_emit_initmacro_end $macro_prefix # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is # created using libtool, because libtool already handles the dependencies. if test "$libtool" != true; then - libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'` + libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'` echo " ${libname_upper}_LIBDEPS=\"\$gl_libdeps\"" echo " AC_SUBST([${libname_upper}_LIBDEPS])" echo " ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\"" @@ -5324,7 +5359,7 @@ func_create_testdir () ) || func_exit 1 fi # Need to run configure and make once, to create built files that are to be - # distributed (such as getdate.c). + # distributed (such as parse-datetime.c). sed_remove_make_variables='s,[$]([A-Za-z0-9_]*),,g' # Extract the value of "CLEANFILES += ..." and "MOSTLYCLEANFILES += ...". cleaned_files=`sed -e "$sed_remove_backslash_newline" < "$testdir/$sourcebase/Makefile.am" \