# with new versions of autoconf or automake.
#
# This script requires autoconf-2.63..2.69 and automake-1.11..1.16 in the PATH.
-# It also requires either
-# - the GNULIB_TOOL environment variable pointing to the gnulib-tool script
-# in a gnulib checkout, or
-# - the git program in the PATH and an internet connection.
+# If not used from a released tarball, it also requires
+# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout.
# Copyright (C) 2003-2019 Free Software Foundation, Inc.
#
&& mv build-aux/texinfo.tex.tmp build-aux/texinfo.tex; \
} || rm -f build-aux/texinfo.tex.tmp
fi
- if test -z "$GNULIB_TOOL"; then
- # Check out gnulib in a subdirectory 'gnulib'.
- if test -d gnulib; then
- (cd gnulib && git pull)
- else
- git clone git://git.savannah.gnu.org/gnulib.git
- fi
- # Now it should contain a gnulib-tool.
- if test -f gnulib/gnulib-tool; then
- GNULIB_TOOL=`pwd`/gnulib/gnulib-tool
- else
- echo "** warning: gnulib-tool not found" 1>&2
- fi
+
+ if test -n "$GNULIB_SRCDIR"; then
+ test -d "$GNULIB_SRCDIR" || {
+ echo "*** GNULIB_SRCDIR is set but does not point to an existing directory." 1>&2
+ exit 1
+ }
+ else
+ GNULIB_SRCDIR=`pwd`/gnulib
+ test -d "$GNULIB_SRCDIR" || {
+ echo "*** Subdirectory 'gnulib' does not yet exist. Use './gitsub.sh pull' to create it, or set the environment variable GNULIB_SRCDIR." 1>&2
+ exit 1
+ }
fi
- # Skip the gnulib-tool step if gnulib-tool was not found.
- if test -n "$GNULIB_TOOL"; then
- GNULIB_MODULES='
- ostream
- fd-ostream
- file-ostream
- html-ostream
- iconv-ostream
- memory-ostream
- term-ostream
- styled-ostream
- html-styled-ostream
- noop-styled-ostream
- term-styled-ostream
- filename
- isatty
- xalloc
- xconcat-filename
+ # Now it should contain a gnulib-tool.
+ GNULIB_TOOL="$GNULIB_SRCDIR/gnulib-tool"
+ test -f "$GNULIB_TOOL" || {
+ echo "*** gnulib-tool not found." 1>&2
+ exit 1
+ }
+ GNULIB_MODULES='
+ ostream
+ fd-ostream
+ file-ostream
+ html-ostream
+ iconv-ostream
+ memory-ostream
+ term-ostream
+ styled-ostream
+ html-styled-ostream
+ noop-styled-ostream
+ term-styled-ostream
+ filename
+ isatty
+ xalloc
+ xconcat-filename
- term-ostream-tests
- '
- $GNULIB_TOOL --lib=libtextstyle --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \
- --macro-prefix=lts \
- --makefile-name=Makefile.gnulib --libtool \
- --local-dir=gnulib-local --local-dir=../gnulib-local \
- --import --avoid=hash-tests $GNULIB_MODULES
- $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
- $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
- $GNULIB_TOOL --copy-file build-aux/declared.sh lib/declared.sh; chmod a+x lib/declared.sh
- $GNULIB_TOOL --copy-file build-aux/run-test; chmod a+x build-aux/run-test
- $GNULIB_TOOL --copy-file build-aux/test-driver.diff
- # If we got no texinfo.tex so far, take the snapshot from gnulib.
- if test ! -f build-aux/texinfo.tex; then
- $GNULIB_TOOL --copy-file build-aux/texinfo.tex
- fi
- # For use by the example programs.
- $GNULIB_TOOL --copy-file m4/libtextstyle.m4
+ term-ostream-tests
+ '
+ $GNULIB_TOOL --lib=libtextstyle --source-base=lib --m4-base=gnulib-m4 --tests-base=tests \
+ --macro-prefix=lts \
+ --makefile-name=Makefile.gnulib --libtool \
+ --local-dir=gnulib-local --local-dir=../gnulib-local \
+ --import --avoid=hash-tests $GNULIB_MODULES
+ $GNULIB_TOOL --copy-file build-aux/config.guess; chmod a+x build-aux/config.guess
+ $GNULIB_TOOL --copy-file build-aux/config.sub; chmod a+x build-aux/config.sub
+ $GNULIB_TOOL --copy-file build-aux/declared.sh lib/declared.sh; chmod a+x lib/declared.sh
+ $GNULIB_TOOL --copy-file build-aux/run-test; chmod a+x build-aux/run-test
+ $GNULIB_TOOL --copy-file build-aux/test-driver.diff
+ # If we got no texinfo.tex so far, take the snapshot from gnulib.
+ if test ! -f build-aux/texinfo.tex; then
+ $GNULIB_TOOL --copy-file build-aux/texinfo.tex
fi
+ # For use by the example programs.
+ $GNULIB_TOOL --copy-file m4/libtextstyle.m4
fi
# Copy some files from gettext.