summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2009-11-20 23:28:07 +0100
committerPaolo Bonzini <bonzini@gnu.org>2009-11-20 23:29:05 +0100
commit5131ea8ee648662330a84946b8d4a85828b103a3 (patch)
tree2f3254832fdd4a996df1bc59a8f58acd329d42cd /bootstrap
parente777a71406d3047edc6eccd4fc48971998eeafe8 (diff)
downloadgrep-5131ea8ee648662330a84946b8d4a85828b103a3.tar.gz
run autopoint and fetch po files from the bootstrap script
* bootstrap: Add autopoint invocation and fetching of .po files. * configure.ac: Bump to GNU gettext 0.17. * ABOUT-NLS: Remove. * m4/gettext.m4: Remove. * m4/iconv.m4: Remove. * m4/lib-link.m4: Remove. * m4/po.m4: Remove. * po/*.po: Remove.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap89
1 files changed, 67 insertions, 22 deletions
diff --git a/bootstrap b/bootstrap
index 0b64f33e..6939cdc2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,7 @@
#! /bin/sh
+
+# Bootstrap this package from git.
+#
# Copyright 1997, 1998, 2005, 2006, 2007, 2008, 2009 Free Software
# Foundation, Inc.
#
@@ -15,26 +18,68 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Generate configure.ac with ALL_LINGUAS matching the languages
-# we have...
-ALL_LINGUAS=""
-for i in po/*.po; do
- ALL_LINGUAS="$ALL_LINGUAS `basename $i .po`"
+package=grep
+
+# Translation Project rsync URL
+TP_URL=translationproject.org::tp/latest
+
+# Ensure file names are sorted consistently across platforms.
+# Also, ensure diagnostics are in English, e.g., "wget --help" below.
+LC_ALL=C
+export LC_ALL
+
+# Parse options.
+
+for option
+do
+ case $option in
+ --help)
+ echo "$0: usage: $0 [--skip-po]"
+ exit;;
+ --skip-po)
+ SKIP_PO=t;;
+ *)
+ echo >&2 "$0: $option: unknown option"
+ exit 1;;
+ esac
done
-# Eliminate leading whitespace
-ALL_LINGUAS="`echo $ALL_LINGUAS |cut -b1-`"
-echo "$ALL_LINGUAS" > po/LINGUAS
-
-# Let auto* do its work
-if \
-aclocal -I m4 &&
-autoheader &&
-automake -a &&
-autoconf
-then
- echo "Next, run ./configure && make && make check"
-else
- echo
- echo "An error occured."
- exit 1
-fi
+
+
+# Get translations.
+
+get_translations() {
+ echo "$0: getting translations into $1 for $2..."
+ rsync -Lrtvz "$TP_URL/$2/" "$1"
+}
+
+docmd () {
+ echo "$0: $* ..."
+ "$@" && return
+ exit_status=$?
+ echo
+ echo "An error occurred."
+ exit $exit_status
+}
+
+case $SKIP_PO in
+'') get_translations po $package || exit
+esac
+
+
+# Generate autoconf and automake snippets.
+
+docmd autopoint --force
+
+# Undo modifications to macros by autopoint.
+
+(cd m4 && git diff . | patch -R -p2)
+
+# Make sure aclocal.m4 is not older than input files.
+sleep 1
+
+docmd aclocal --force -I m4
+docmd autoconf --force
+docmd autoheader --force
+docmd automake --add-missing --copy --force-missing
+
+echo "Next, run ./configure && make && make check"