summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-05-18 18:21:07 +0900
committerDaiki Ueno <ueno@gnu.org>2016-05-18 18:22:12 +0900
commit4c33c9e1539d45bd65ed263500f0d7ec1a670053 (patch)
treeb2fea8fa51281e65610e48e463d43de61089d200
parente26b846fe273243b446cc02a027cc1a715734d1f (diff)
downloadexternal_gettext-4c33c9e1539d45bd65ed263500f0d7ec1a670053.zip
external_gettext-4c33c9e1539d45bd65ed263500f0d7ec1a670053.tar.gz
external_gettext-4c33c9e1539d45bd65ed263500f0d7ec1a670053.tar.bz2
maint: Add --no-git option to autogen.sh
* autogen.sh: Port --no-git option from Gnulib's bootstrap.
-rwxr-xr-xautogen.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 6790a23..7a0a19a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,7 +32,7 @@
# data files used by the autopoint program. If you already have the
# file, place it under gettext-tools/misc, before running this script.
#
-# Usage: ./autogen.sh [--skip-gnulib]
+# Usage: ./autogen.sh [--skip-gnulib] [--no-git]
#
# Usage after a git clone: ./autogen.sh
# Usage from a released tarball: ./autogen.sh --skip-gnulib
@@ -42,13 +42,21 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
skip_gnulib=false
+
+# Use git to update gnulib sources
+use_git=true
+
while :; do
case "$1" in
--skip-gnulib) skip_gnulib=true; shift;;
+ --no-git) use_git=false; shift;;
*) break ;;
esac
done
+$use_git || test -d "$GNULIB_SRCDIR" \
+ || die "Error: --no-git requires --gnulib-srcdir"
+
cleanup_gnulib() {
status=$?
rm -fr "$gnulib_path"
@@ -90,7 +98,7 @@ if ! $skip_gnulib; then
;;
*)
# Use GNULIB_SRCDIR as a reference.
- if test -d "$GNULIB_SRCDIR"/.git && \
+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
if git submodule -h|grep -- --reference > /dev/null; then