aboutsummaryrefslogtreecommitdiff
path: root/build-aux/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/bootstrap')
-rwxr-xr-xbuild-aux/bootstrap683
1 files changed, 477 insertions, 206 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index d025457..c028967 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,9 +1,11 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 3# Bootstrap this package from checked-out sources.
4
5# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4 6
5# This program is free software; you can redistribute it and/or modify 7# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 8# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2, or (at your option) 9# the Free Software Foundation; either version 2, or (at your option)
8# any later version. 10# any later version.
9 11
@@ -11,272 +13,541 @@
11# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details. 15# GNU General Public License for more details.
14 16
15# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software 18# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18# 02111-1307, USA. 20# 02110-1301, USA.
19 21
20# Written by Paul Eggert and Sergey Poznyakoff. 22# Written by Paul Eggert.
21 23
22# URL of our text domain page in Translation Project 24nl='
23TP_URL="http://www.iro.umontreal.ca/translation/maint/cflow/" 25'
24 26
25# Ensure file names are sorted consistently across platforms; 27# Ensure file names are sorted consistently across platforms.
26# e.g., m4/ulonglong_gl.m4 should follow m4/ulonglong.m4. 28# Also, ensure diagnostics are in English, e.g., "wget --help" below.
27LC_ALL=C 29LC_ALL=C
28export LC_ALL 30export LC_ALL
29 31
30usage() { 32# Temporary directory names.
31 cat <<EOF 33bt='._bootmp'
32 usage: $0 [--gnulib-srcdir=DIR][--cvs-auth=AUTH-METHOD][--cvs-user=USERNAME][--no-po] 34bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
33 Options are: 35bt2=${bt}2
34 --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
35 sources reside. Use this if you already
36 have gnulib sources on your machine, and
37 do not want to waste your bandwidth dowloading
38 them again.
39 --cvs-auth=METHOD Set the CVS access method used for downloading
40 gnulib files. METHOD is one of the keywords
41 accepted by cvs -d option (see info cvs
42 repository).
43 --cvs-user=USERNAME Set the CVS username to be used when accessing
44 the gnulib repository.
45
46The following two options are reserved for future use:
47
48 --no-po Do not download po files.
49 --update-po[=LANG] Update po file(s) and exit.
50
51If the file \`.bootstrap' exists in the current working directory, its
52contents is read, comments and empty lines removed, shell variables expanded
53and the result is prepended to the command line options.
54
55Running without arguments will suffice in most cases. It is equivalent
56to
57
58 ./bootstrap --cvs-auth=ext --cvs-user=anoncvs
59
60EOF
61}
62 36
63update_po() { 37usage() {
64 if [ $# = 1 ]; then 38 echo >&2 "\
65 case $1 in 39Usage: $0 [OPTION]...
66 *.po) POFILE=$1;; 40Bootstrap this package from the checked-out sources.
67 *) POFILE=${1}.po;; 41
68 esac 42Options:
69 echo "$0: getting translation for $1..." 43 --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
70 (cd po; 44 sources reside. Use this if you already
71 wget -r --cache=off -O $POFILE $TP_URL/$POFILE || exit 45 have gnulib sources on your machine, and
72 LANG=`expr $POFILE : '\(.*\)\.po'` 46 do not want to waste your bandwidth downloading
73 if ! grep -q $LANG LINGUAS; then 47 them again.
74 mv LINGUAS LINGUAS.$$ 48 --copy Copy files instead of creating symbolic links.
75 (echo $LANG; cat LINGUAS.$$) | sort > LINGUAS 49 --force Attempt to bootstrap even if the sources seem
76 fi) 50 not to have been checked out.
77 else 51 --skip-po Do not download po files.
78 echo "$0: getting translations into po..." 52 --cvs-user=USERNAME Set the username to use when checking out
79 (cd po && 53 sources from the gnulib repository.
80 rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'` && 54
81 wget -nv -nd -r -l 1 -A .po -C off $TP_URL && 55If the file .bootstrap.conf exists in the current working directory, its
82 rm -f index.html index.html.[0-9]* 56contents are read as shell variables to configure the bootstrap.
83 ls *.po | sed 's/\.po$//' >LINGUAS 57
84 ) || exit 58Running without arguments will suffice in most cases.
85 fi 59"
86} 60}
87 61
88# Read configuration file 62# Configuration.
89if [ -r .bootstrap ]; then 63
90 echo "$0: Reading configuration file .bootstrap" 64# List of gnulib modules needed.
91 eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*" 65gnulib_modules=
92fi 66
67# Any gnulib files needed that are not in modules.
68gnulib_files=
69
70# Translation Project URL, for the registry of all projects
71# and for the translation-team master directory.
72TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain='
73TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/'
74
75extract_package_name='
76 /^AC_INIT(/{
77 /.*,.*,.*,/{
78 s///
79 s/[][]//g
80 p
81 q
82 }
83 s/AC_INIT(\[*//
84 s/]*,.*//
85 s/^GNU //
86 y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
87 s/[^A-Za-z0-9_]/-/g
88 p
89 }
90'
91package=`sed -n "$extract_package_name" configure.ac` || exit
92gnulib_name=lib$package
93
94build_aux=build-aux
95# Extra files from gnulib, which override files from other sources.
96gnulib_extra_files="
97 $build_aux/install-sh
98 $build_aux/missing
99 $build_aux/mdate-sh
100 $build_aux/texinfo.tex
101 $build_aux/depcomp
102 $build_aux/config.guess
103 $build_aux/config.sub
104 doc/INSTALL
105"
106# Additional gnulib-tool options to use. Use "\newline" to break lines.
107gnulib_tool_option_extras=
108
109# Other locale categories that need message catalogs.
110EXTRA_LOCALE_CATEGORIES=
111
112# Additional xgettext options to use. Use "\\\newline" to break lines.
113XGETTEXT_OPTIONS='\\\
114 --flag=_:1:pass-c-format\\\
115 --flag=N_:1:pass-c-format\\\
116 --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
117'
118
119# Files we don't want to import.
120excluded_files=
121
122# File that should exist in the top directory of a checked out hierarchy,
123# but not in a distribution tarball.
124checkout_only_file=README-hacking
125
126# Whether to use copies instead of symlinks.
127copy=false
128
129# Override the default configuration, if necessary.
130test -r bootstrap.conf && . ./bootstrap.conf
131
132# Translate configuration into internal form.
93 133
94# Parse options. 134# Parse options.
95 135
96DOWNLOAD_PO=no
97for option 136for option
98do 137do
99 case $option in 138 case $option in
100 --help) 139 --help)
101 usage 140 usage
102 exit;; 141 exit;;
103 --gnulib-srcdir=*) 142 --gnulib-srcdir=*)
104 GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; 143 GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
105