progname=$0
package=gnulib
-cvsdatestamp='$Date: 2005-10-17 15:44:51 $'
+cvsdatestamp='$Date: 2005-12-02 13:37:34 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
echo "\
Usage: gnulib-tool --list
gnulib-tool --import [module1 ... moduleN]
+ gnulib-tool --update
gnulib-tool --create-testdir --dir=directory module1 ... moduleN
gnulib-tool --create-megatestdir --dir=directory [module1 ... moduleN]
gnulib-tool --test --dir=directory module1 ... moduleN
--import | --impor | --impo | --imp | --im | --i )
mode=import
shift ;;
+ --update | --updat | --upda | --upd | --up | --u )
+ mode=update
+ shift ;;
--create-testdir | --create-testdi | --create-testd | --create-test | --create-tes | --create-te | --create-t )
mode=create-testdir
shift ;;
--dry-run )
doit=false
shift ;;
- -s | --symbolic | --symlink )
+ -s | --symbolic | --symboli | --symbol | --symbo | --symb | --symlink | --symlin | --symli | --syml | --sym | --sy )
symbolic=true
shift ;;
--help | --hel | --he | --h )
esac
done
+ if test "$mode" = update; then
+ if test $# != 0; then
+ echo "gnulib-tool: too many arguments in 'update' mode" 1>&2
+ echo "Try 'gnulib-tool --help' for more information." 1>&2
+ echo "If you really want to modify the gnulib configuration of your project," 1>&2
+ echo "you need to use 'gnulib --import' - at your own risk!" 1>&2
+ exit 1
+ fi
+ if test -n "$libname" || test -n "$sourcebase" || test -n "$m4base" \
+ || test -n "$testsbase" || test -n "$auxdir" || test -n "$inctests" \
+ || test -n "$avoidlist" || test -n "$lgpl" || test -n "$macro_prefix"; then
+ echo "gnulib-tool: invalid options for 'update' mode" 1>&2
+ echo "Try 'gnulib-tool --help' for more information." 1>&2
+ echo "If you really want to modify the gnulib configuration of your project," 1>&2
+ echo "you need to use 'gnulib --import' - at your own risk!" 1>&2
+ exit 1
+ fi
+ do_changelog=false
+ fi
+
# Remove trailing slashes from the directory names. This is necessary for
# m4base (to avoid an error in func_import) and optional for the others.
sed_trimtrailingslashes='s,\([^/]\)//*$,\1,'
for module in $modules; do
license=`func_get_license $module`
case $license in
- LGPL | 'public domain' | 'unlimited') ;;
+ LGPL | 'GPLed build tool' | 'public domain' | 'unlimited') ;;
*) func_fatal_error "incompatible license on module $module: $license" ;;
esac
done
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
lib/*) g=`echo "$f" | sed -e "s,^lib/,$cached_sourcebase/,"` ;;
m4/*) g=`echo "$f" | sed -e "s,^m4/,$cached_m4base/,"` ;;
+ tests/*) g=`echo "$f" | sed -e "s,^tests/,$cached_testsbase/,"` ;;
*) g="$f" ;;
esac
echo "$g""$delimiter""$f"
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
lib/*) g=`echo "$f" | sed -e "s,^lib/,$sourcebase/,"` ;;
m4/*) g=`echo "$f" | sed -e "s,^m4/,$m4base/,"` ;;
+ tests/*) g=`echo "$f" | sed -e "s,^tests/,$testsbase/,"` ;;
*) g="$f" ;;
esac
echo "$g""$delimiter""$f"
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
lib/*) g=`echo "$f" | sed -e "s,^lib/,$sourcebase/,"` ;;
m4/*) g=`echo "$f" | sed -e "s,^m4/,$m4base/,"` ;;
+ tests/*) g=`echo "$f" | sed -e "s,^tests/,$testsbase/,"` ;;
*) g="$f" ;;
esac
func_add_or_update
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
lib/*) g=`echo "$f" | sed -e "s,^lib/,$sourcebase/,"` ;;
m4/*) g=`echo "$f" | sed -e "s,^m4/,$m4base/,"` ;;
+ tests/*) g=`echo "$f" | sed -e "s,^tests/,$testsbase/,"` ;;
*) g="$f" ;;
esac
func_add_or_update
echo "# \"Check for header files, types and library functions\"."
echo "AC_DEFUN([${macro_prefix}_INIT],"
echo "["
+ if test -z "$libtool"; then
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [false])"
+ else
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
+ fi
for module in $modules; do
func_verify_module
if test -n "$module"; then
echo "gl_USE_SYSTEM_EXTENSIONS"
echo
fi
+ if test -z "$libtool"; then
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [false])"
+ else
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
+ fi
# We don't have explicit ordering constraints between the various
# autoconf snippets. It's cleanest to put those of the library before
# those of the tests.
echo "gl_USE_SYSTEM_EXTENSIONS"
echo
fi
+ if test -z "$libtool"; then
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [false])"
+ else
+ echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
+ fi
for module in $modules; do
func_verify_nontests_module
if test -n "$module"; then
func_all_modules
;;
- import )
+ import | update )
+
# Where to import.
if test -z "$destdir"; then
destdir=.