summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2014-04-17 16:56:55 +0900
committerDaiki Ueno <ueno@gnu.org>2014-04-17 18:05:20 +0900
commit282fc63a3273c8459dd55c9aa4968b73fb97678d (patch)
tree25a163f2e75d80d5b21b4ce320662b337010f5f9
parent5f00d004a15e6976c92e5cccf6307fc2b2652f7d (diff)
downloadexternal_gettext-282fc63a3273c8459dd55c9aa4968b73fb97678d.zip
external_gettext-282fc63a3273c8459dd55c9aa4968b73fb97678d.tar.gz
external_gettext-282fc63a3273c8459dd55c9aa4968b73fb97678d.tar.bz2
autogen.sh: Use included gettext-tools for bootstrap
To regenerate POT files, autogen.sh had an implicit dependency on gettext-tools installed on system. This prohibited to use any new features in our examples. Let autogen.sh use included version of gettext-tools, by prepending $builddir to the PATH.
-rw-r--r--ChangeLog8
-rwxr-xr-xautogen.sh118
2 files changed, 98 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index ca7aae6..2a79795 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-17 Daiki Ueno <ueno@gnu.org>
+
+ * autogen.sh: Use included gettext-tools for bootstrap
+ To regenerate POT files, autogen.sh had an implicit dependency on
+ gettext-tools installed on system. This prohibited to use any new
+ features in our examples. Let autogen.sh use included version of
+ gettext-tools, by prepending $builddir to the PATH.
+
2014-04-07 Daiki Ueno <ueno@gnu.org>
* autogen.sh: Error out when gnulib-tool exit with non-zero.
diff --git a/autogen.sh b/autogen.sh
index d73769d..adeb80c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,7 +21,7 @@
# - the makeinfo program from the texinfo package,
# - perl.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 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
@@ -389,13 +389,31 @@ if test -n "$GNULIB_TOOL"; then
done
else
for file in config.guess config.sub; do
+ echo "$0: getting $file..."
wget -q --timeout=5 -O build-aux/$file.tmp "http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/${file};hb=HEAD" \
&& mv build-aux/$file.tmp build-aux/$file \
&& chmod a+x build-aux/$file
+ retval=$?
+ rm -f build-aux/$file.tmp
+ test $retval -eq 0 || exit $retval
done
fi
+# Fetch gettext-tools/misc/archive.dir.tar.
+if ! test -f gettext-tools/misc/archive.dir.tar; then
+ echo "$0: getting gettext-tools/misc/archive.dir.tar..."
+ wget -q --timeout=5 -O gettext-tools/misc/archive.dir.tar.gz-t "ftp://alpha.gnu.org/gnu/gettext/archive.dir-latest.tar.gz" \
+ && mv gettext-tools/misc/archive.dir.tar.gz-t gettext-tools/misc/archive.dir.tar.gz \
+ && gzip -d -c < gettext-tools/misc/archive.dir.tar.gz > gettext-tools/misc/archive.dir.tar-t \
+ && mv gettext-tools/misc/archive.dir.tar-t gettext-tools/misc/archive.dir.tar
+ retval=$?
+ rm -f gettext-tools/misc/archive.dir.tar.gz-t gettext-tools/misc/archive.dir.tar-t
+ test $retval -eq 0 || exit $retval
+fi
+
+# Generate configure script in each subdirectories.
(cd gettext-runtime/libasprintf
+ echo "$0: generating configure in gettext-runtime/libasprintf..."
aclocal -I ../../m4 -I ../m4 -I gnulib-m4
autoconf
autoheader && touch config.h.in
@@ -403,53 +421,97 @@ fi
)
(cd gettext-runtime
+ echo "$0: geneating configure in gettext-runtime..."
aclocal -I m4 -I ../m4 -I gnulib-m4
autoconf
autoheader && touch config.h.in
automake --add-missing --copy
- # Rebuilding the PO files and manual pages is only rarely needed.
- if ! $quick; then
- ./configure --disable-java --disable-native-java --disable-csharp \
- && (cd po && make update-po) \
- && (cd intl && make) && (cd gnulib-lib && make) && (cd src && make) \
- && (cd man && make update-man1 all) \
- && make distclean
- fi
)
-cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
-
(cd gettext-tools/examples
+ echo "$0: geneating configure in gettext-tools/examples..."
aclocal -I ../../gettext-runtime/m4 -I ../../m4
autoconf
automake --add-missing --copy
- # Rebuilding the examples PO files is only rarely needed.
- if ! $quick; then
- ./configure && (cd po && make update-po) && make distclean
- fi
)
+cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
+
(cd gettext-tools
+ echo "$0: geneating configure in gettext-tools..."
aclocal -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
autoconf
autoheader && touch config.h.in
test -d intl || mkdir intl
automake --add-missing --copy
- # Rebuilding the PO files, manual pages, documentation, test files is only rarely needed.
- if ! $quick; then
- ./configure --disable-java --disable-native-java --disable-csharp --disable-openmp \
- && (cd po && make update-po) \
- && (cd intl && make) && (cd gnulib-lib && make) && (cd libgrep && make) && (cd src && make) \
+)
+
+# Rebuilding the PO files, manual pages, documentation, test files is
+# only rarely needed.
+if ! $quick; then
+ (cd gettext-runtime
+ echo "$0: building gettext-runtime for bootstrap..."
+ # We really need to build gettext-runtime to generate manual pages
+ # for 'gettext' and 'ngettext' utilities.
+ ./configure --disable-java --disable-native-java --disable-csharp \
+ && (cd intl && make) \
+ && (cd gnulib-lib && make) \
+ && (cd src && make)
+ ) || exit $?
+
+ (cd gettext-tools
+ echo "$0: building gettext-tools for bootstrap..."
+ ./configure --disable-java --disable-native-java --disable-csharp \
+ --disable-openmp \
+ && (cd intl && make) \
+ && (cd gnulib-lib && make) \
+ && (cd libgrep && make) \
+ && (cd src && make) \
+ && (cd misc && make)
+ ) || exit $?
+
+ gettext_dir=$PWD/gettext-tools/misc
+ pathprefix=$gettext_dir:$PWD/gettext-tools/src
+
+ (cd gettext-runtime
+ echo "$0: updating PO files and manual pages in gettext-runtime..."
+
+ PATH=$pathprefix:$PATH
+ export PATH gettext_dir
+
+ (cd po && make update-po) \
+ && (cd man && make update-man1 all)
+ ) || exit $?
+
+ (cd gettext-tools
+ echo "$0: updating PO files and manual pages in gettext-tools..."
+
+ PATH=$pathprefix:$PATH
+ export PATH gettext_dir
+
+ (cd po && make update-po) \
&& (cd man && make update-man1 all) \
&& (cd doc && make all) \
- && (cd tests && make update-expected) \
- && make distclean
- fi
- if ! test -f misc/archive.dir.tar; then
- wget -q --timeout=5 -O - ftp://alpha.gnu.org/gnu/gettext/archive.dir-latest.tar.gz | gzip -d -c > misc/archive.dir.tar-t \
- && mv misc/archive.dir.tar-t misc/archive.dir.tar
- fi
-)
+ && (cd tests && make update-expected)
+ ) || exit $?
+
+ (cd gettext-tools/examples
+ echo "$0: updating PO files in gettext-tools/examples..."
+
+ PATH=$pathprefix:$PATH
+ export PATH gettext_dir
+
+ ./configure && (cd po && make update-po)
+ ) || exit $?
+
+ (cd gettext-runtime
+ echo "$0: cleaning up gettext-runtime..."
+ make distclean) || exit $?
+
+ (cd gettext-tools
+ echo "$0: cleaning up gettext-tools..."
+ make distclean) || exit $?
+fi
aclocal -I m4
autoconf