last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
--extract-maintainer report the maintainer(s) inside gnulib
--extract-tests-module report the unit test module, if it exists
--extract-maintainer report the maintainer(s) inside gnulib
--extract-tests-module report the unit test module, if it exists
For --import, this specifies where your
configure.ac can be found. Defaults to current
directory.
For --import, this specifies where your
configure.ac can be found. Defaults to current
directory.
- Directory relative --dir where source code is
- placed (default \"lib\"), for --import.
- --m4-base=DIRECTORY Directory relative --dir where *.m4 macros are
- placed (default \"m4\"), for --import.
+ Directory relative to --dir where source code is
+ placed (default \"lib\").
+ --m4-base=DIRECTORY Directory relative to --dir where *.m4 macros are
+ placed (default \"m4\").
+ --doc-base=DIRECTORY Directory relative to --dir where doc files are
+ placed (default \"doc\").
- Directory relative --dir where unit tests are
- placed (default \"tests\"), for --import.
- --aux-dir=DIRECTORY Directory relative --dir where auxiliary build
+ 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\").
--with-tests Include unit tests for the included modules.
--avoid=MODULE Avoid including the given MODULE. Useful if you
tools are placed (default \"build-aux\").
--with-tests Include unit tests for the included modules.
--avoid=MODULE Avoid including the given MODULE. Useful if you
This option can be repeated.
--lgpl Abort if modules aren't available under the LGPL.
Also modify license template from GPL to LGPL.
This option can be repeated.
--lgpl Abort if modules aren't available under the LGPL.
Also modify license template from GPL to LGPL.
--macro-prefix=PREFIX Specify the prefix of the macros 'gl_EARLY' and
'gl_INIT'. Default is 'gl'.
--no-changelog don't update or create ChangeLog files
--macro-prefix=PREFIX Specify the prefix of the macros 'gl_EARLY' and
'gl_INIT'. Default is 'gl'.
--no-changelog don't update or create ChangeLog files
--dry-run For --import, only print what would have been done.
-s, --symbolic, --symlink Make symbolic links instead of copying files.
--dry-run For --import, only print what would have been done.
-s, --symbolic, --symlink Make symbolic links instead of copying files.
# - libname, supplied_libname from --lib
# - sourcebase from --source-base
# - m4base from --m4-base
# - libname, supplied_libname from --lib
# - sourcebase from --source-base
# - m4base from --m4-base
# - testsbase from --tests-base
# - auxdir from --aux-dir
# - inctests true if --with-tests was given, blank otherwise
# - avoidlist list of modules to avoid, from --avoid
# - lgpl true if --lgpl was given, blank otherwise
# - libtool true if --libtool was given, blank otherwise
# - testsbase from --tests-base
# - auxdir from --aux-dir
# - inctests true if --with-tests was given, blank otherwise
# - avoidlist list of modules to avoid, from --avoid
# - lgpl true if --lgpl was given, blank otherwise
# - libtool true if --libtool was given, blank otherwise
# - do_changelog false if --no-changelog was given, : otherwise
# - doit : if actions shall be executed, false if only to be printed
{
# - do_changelog false if --no-changelog was given, : otherwise
# - doit : if actions shall be executed, false if only to be printed
{
- || test -n "$testsbase" || test -n "$auxdir" || test -n "$inctests" \
- || test -n "$avoidlist" || test -n "$lgpl" || test -n "$macro_prefix"; then
+ || test -n "$docbase" || test -n "$testsbase" || test -n "$auxdir" \
+ || test -n "$inctests" || test -n "$avoidlist" || test -n "$lgpl" \
+ || test -n "$macro_prefix" || test -n "$autoconf_minversion"; 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 "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
# 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,'
# 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,'
func_verify_nontests_module
if test -n "$module"; then
# Extract the value of "lib_SOURCES += ...".
func_verify_nontests_module
if test -n "$module"; then
# Extract the value of "lib_SOURCES += ...".
- for file in `func_get_automake_snippet "$module" | sed -e "$sed_remove_backslash_newline" | sed -n -e 's,^lib_SOURCES[ ]*+=\([^#]*\).*$,\1,p'`; do
+ for file in `func_get_automake_snippet "$module" | sed -e "$sed_remove_backslash_newline" | sed -n -e 's,^lib_SOURCES[ ]*+=\([^#]*\).*$,\1,p'`; do
if test -n "$module"; then
func_get_automake_snippet "$module" > amsnippet.tmp
# Skip the contents if its entirely empty.
if test -n "$module"; then
func_get_automake_snippet "$module" > amsnippet.tmp
# Skip the contents if its entirely empty.
# - libname library name
# - sourcebase directory relative to destdir where to place source code
# - m4base directory relative to destdir where to place *.m4 macros
# - libname library name
# - sourcebase directory relative to destdir where to place source code
# - m4base directory relative to destdir where to place *.m4 macros
# - testsbase directory relative to destdir where to place unit test code
# - auxdir directory relative to destdir where to place build aux files
# - inctests true if --with-tests was given, blank otherwise
# - testsbase directory relative to destdir where to place unit test code
# - auxdir directory relative to destdir where to place build aux files
# - inctests true if --with-tests was given, blank otherwise
# - libtool true if libtool will be used, blank otherwise
# - guessed_libtool true if the configure.ac file uses libtool, blank otherwise
# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
# - libtool true if libtool will be used, blank otherwise
# - guessed_libtool true if the configure.ac file uses libtool, blank otherwise
# - macro_prefix prefix of gl_EARLY, gl_INIT macros to use
# - doit : if actions shall be executed, false if only to be printed
# - symbolic true if files should be symlinked, copied otherwise
func_import ()
# - doit : if actions shall be executed, false if only to be printed
# - symbolic true if files should be symlinked, copied otherwise
func_import ()
/gl_M4_BASE(/ {
s,^.*gl_M4_BASE([[ ]*\([^])]*\).*$,cached_m4base="\1",p
}
/gl_M4_BASE(/ {
s,^.*gl_M4_BASE([[ ]*\([^])]*\).*$,cached_m4base="\1",p
}
/gl_TESTS_BASE(/ {
s,^.*gl_TESTS_BASE([[ ]*\([^])]*\).*$,cached_testsbase="\1",p
}
/gl_TESTS_BASE(/ {
s,^.*gl_TESTS_BASE([[ ]*\([^])]*\).*$,cached_testsbase="\1",p
}
}
/gl_MACRO_PREFIX(/ {
s,^.*gl_MACRO_PREFIX([[ ]*\([^])]*\).*$,cached_macro_prefix="\1",p
}
/gl_MACRO_PREFIX(/ {
s,^.*gl_MACRO_PREFIX([[ ]*\([^])]*\).*$,cached_macro_prefix="\1",p
}'
eval `sed -n -e "$my_sed_traces" < "$destdir"/$m4base/gnulib-cache.m4`
if test -f "$destdir"/$m4base/gnulib-comp.m4; then
}'
eval `sed -n -e "$my_sed_traces" < "$destdir"/$m4base/gnulib-cache.m4`
if test -f "$destdir"/$m4base/gnulib-comp.m4; then
+ # The docbase defaults to the cached one.
+ if test -z "$docbase"; then
+ docbase="$cached_docbase"
+ if test -z "$docbase"; then
+ func_fatal_error "missing --doc-base option. --doc-base has been introduced on 2006-07-11; if your last invocation of 'gnulib-tool --update' is before that date, you need to run 'gnulib-tool --update' once, with a --doc-base option."
+ fi
+ fi
# The testsbase defaults to the cached one.
if test -z "$testsbase"; then
testsbase="$cached_testsbase"
# The testsbase defaults to the cached one.
if test -z "$testsbase"; then
testsbase="$cached_testsbase"
+ # The autoconf_minversion defaults to the cached one.
+ if test -z "$autoconf_minversion"; then
+ autoconf_minversion="$cached_autoconf_minversion"
+ if test -z "$autoconf_minversion"; then
+ autoconf_minversion="$DEFAULT_AUTOCONF_MINVERSION"
+ fi
+ fi
# Canonicalize the list of specified modules.
specified_modules=`for m in $specified_modules; do echo $m; done | LC_ALL=C sort | LC_ALL=C uniq`
# Canonicalize the list of specified modules.
specified_modules=`for m in $specified_modules; do echo $m; done | LC_ALL=C sort | LC_ALL=C uniq`
+ docfiles=`echo "$files" | sed -n -e 's,^doc/,,p'`
+ if test -n "$docfiles"; then
+ if test ! -d "$destdir/$docbase"; then
+ if $doit; then
+ echo "Creating directory $destdir/$docbase"
+ mkdir "$destdir/$docbase" || func_fatal_error "failed"
+ else
+ echo "Create directory $destdir/$docbase"
+ fi
+ fi
+ fi
for f in $old_files; do
case "$f" in
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
for f in $old_files; do
case "$f" in
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/,"` ;;
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/,"` ;;
for f in $new_files; do
case "$f" in
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
for f in $new_files; do
case "$f" in
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/,"` ;;
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/,"` ;;
for f in `LC_ALL=C join -t"$delimiter" -v2 "$tmp"/old-files "$tmp"/new-files | sed -e "$sed_take_last_column"`; do
case "$f" in
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
for f in `LC_ALL=C join -t"$delimiter" -v2 "$tmp"/old-files "$tmp"/new-files | sed -e "$sed_take_last_column"`; do
case "$f" in
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/,"` ;;
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/,"` ;;
for f in `LC_ALL=C join -t"$delimiter" "$tmp"/old-files "$tmp"/new-files | sed -e "$sed_take_last_column"`; do
case "$f" in
build-aux/*) g=`echo "$f" | sed -e "s,^build-aux/,$auxdir/,"` ;;
for f in `LC_ALL=C join -t"$delimiter" "$tmp"/old-files "$tmp"/new-files | sed -e "$sed_take_last_column"`; do
case "$f" in
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/,"` ;;
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/,"` ;;
actioncmd="$actioncmd --lib=$libname"
actioncmd="$actioncmd --source-base=$sourcebase"
actioncmd="$actioncmd --m4-base=$m4base"
actioncmd="$actioncmd --lib=$libname"
actioncmd="$actioncmd --source-base=$sourcebase"
actioncmd="$actioncmd --m4-base=$m4base"
actioncmd="$actioncmd --aux-dir=$auxdir"
for module in $avoidlist; do
actioncmd="$actioncmd --avoid=$module"
actioncmd="$actioncmd --aux-dir=$auxdir"
for module in $avoidlist; do
actioncmd="$actioncmd --avoid=$module"
echo "gl_AVOID([$avoidlist])"
echo "gl_SOURCE_BASE([$sourcebase])"
echo "gl_M4_BASE([$m4base])"
echo "gl_AVOID([$avoidlist])"
echo "gl_SOURCE_BASE([$sourcebase])"
echo "gl_M4_BASE([$m4base])"
echo "gl_TESTS_BASE([$testsbase])"
echo "gl_LIB([$libname])"
test -z "$lgpl" || echo "gl_LGPL"
test -z "$libtool" || echo "gl_LIBTOOL"
echo "gl_MACRO_PREFIX([$macro_prefix])"
echo "gl_TESTS_BASE([$testsbase])"
echo "gl_LIB([$libname])"
test -z "$lgpl" || echo "gl_LGPL"
test -z "$libtool" || echo "gl_LIBTOOL"
echo "gl_MACRO_PREFIX([$macro_prefix])"
) > "$tmpfile"
if test -f "$destdir"/$m4base/gnulib-cache.m4; then
if cmp "$destdir"/$m4base/gnulib-cache.m4 "$tmpfile" > /dev/null; then
) > "$tmpfile"
if test -f "$destdir"/$m4base/gnulib-cache.m4; then
if cmp "$destdir"/$m4base/gnulib-cache.m4 "$tmpfile" > /dev/null; then
# First use of gnulib in the given m4base.
test -n "$supplied_libname" || supplied_libname=true
test -n "$sourcebase" || sourcebase="lib"
# First use of gnulib in the given m4base.
test -n "$supplied_libname" || supplied_libname=true
test -n "$sourcebase" || sourcebase="lib"
# To get this list of directories, look at Makefile.am. (Not at
# configure, because it may be omitted from CVS. Also, don't run
# "find $destdir -name gnulib-cache.m4", as it might be too expensive.)
# To get this list of directories, look at Makefile.am. (Not at
# configure, because it may be omitted from CVS. Also, don't run
# "find $destdir -name gnulib-cache.m4", as it might be too expensive.)