X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=gnulib-tool;h=9375f97d44781584dba38c585e55eeb9365f09f2;hb=88418d5fd24c99aac393d3e2f564f6939e4e2fe3;hp=2951b6af6c5491df0fa19bf092d5b6199bbd8e98;hpb=412cf3c34301809c117f7e8bf5e479ebb626445c;p=gnulib.git diff --git a/gnulib-tool b/gnulib-tool index 2951b6af6..9375f97d4 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 @@ -163,6 +163,7 @@ Usage: gnulib-tool --list gnulib-tool --copy-file file [destination] Operation modes: + --list print the available module names --find find the modules which contain the specified file${bold_on} --import import the given modules into the current package @@ -199,6 +200,7 @@ Operation modes: --copy-file copy a file that is not part of any module General options: + --dir=DIRECTORY Specify the target directory. For --import, this specifies where your configure.ac can be found. Defaults to current @@ -210,10 +212,13 @@ General options: --verbose Increase verbosity. May be repeated. --quiet Decrease verbosity. May be repeated. -Options for --import, --update: +Options for --import, --add/remove-import, --update: + --dry-run Only print what would have been done. -Options for --import, --create-[mega]testdir, --[mega]test: +Options for --import, --add/remove-import, + --create-[mega]testdir, --[mega]test: + --with-tests Include unit tests for the included modules. --with-obsolete Include obsolete modules when they occur among the dependencies. By default, dependencies to obsolete @@ -233,7 +238,8 @@ Options for --import, --create-[mega]testdir, --[mega]test: --libtool Use libtool rules. --no-libtool Don't use libtool rules. -Options for --import: +Options for --import, --add/remove-import: + --lib=LIBRARY Specify the library name. Defaults to 'libgnu'. --source-base=DIRECTORY Directory relative to --dir where source code is @@ -248,7 +254,7 @@ Options for --import: Directory relative to --dir where unit tests are placed (default \"tests\"). --aux-dir=DIRECTORY Directory relative to --dir where auxiliary build - tools are placed (default \"build-aux\"). + tools are placed (default comes from configure.ac). --lgpl[=2|=3] Abort if modules aren't available under the LGPL. Also modify license template from GPL to LGPL. The version number of the LGPL can be specified; @@ -266,6 +272,7 @@ Options for --import: --no-changelog Don't update or create ChangeLog files. Options for --create-[mega]testdir, --[mega]test: + --without-c++-tests Exclude unit tests for C++ interoperability. --without-longrunning-tests Exclude unit tests that are long-runners. @@ -274,12 +281,15 @@ Options for --create-[mega]testdir, --[mega]test: --without-unportable-tests Exclude unit tests that fail on some platforms. -Options for --import, --update, --create-[mega]testdir, --[mega]test: +Options for --import, --add/remove-import, --update, + --create-[mega]testdir, --[mega]test: + -s, --symbolic, --symlink Make symbolic links instead of copying files. --local-symlink Make symbolic links instead of copying files, only for files from the local override directory. -Options for --import, --update: +Options for --import, --add/remove-import, --update: + -S, --more-symlinks Make symbolic links instead of copying files, and don't replace copyright notices. @@ -2218,6 +2228,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 @@ -2920,6 +2931,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 @@ -4561,7 +4584,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\"" @@ -4941,6 +4964,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="\ @@ -5113,6 +5141,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 @@ -5129,7 +5163,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\"" @@ -5235,13 +5269,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\"" @@ -5314,7 +5354,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" \