diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-11 23:22:54 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-11 23:22:54 +0000 |
commit | c56ae1845ebbe64a9f73eb60f365a1f8f29a0100 (patch) | |
tree | f15c06cfb7b9f90b83e275120e8367467d02fb2e | |
parent | 3a2e207c3413ed61ed12ab9738146c5ce73f73d6 (diff) | |
download | pies-c56ae1845ebbe64a9f73eb60f365a1f8f29a0100.tar.gz pies-c56ae1845ebbe64a9f73eb60f365a1f8f29a0100.tar.bz2 |
Rewrite the bootstrap suite.
* README-alpha: Rewritten.
* bootstrap.conf: Rewritten.
* bootstrap: Slightly modified version from gnulib.
* gnulib.modules, README-hacking: New files.
* doc/mailfromd.texi: Minor fix.
-rwxr-xr-x | bootstrap | 745 | ||||
-rw-r--r-- | bootstrap.conf | 68 |
2 files changed, 597 insertions, 216 deletions
@@ -1,96 +1,86 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | ############################ | ||
3 | ## Configuration | ||
4 | ############################ | ||
5 | |||
6 | GNULIB_DATE=2007-05-12 | ||
7 | GNU_SOURCE_BASE=gnu | ||
8 | |||
9 | MODLIST="argp\ | ||
10 | fprintftime\ | ||
11 | getline\ | ||
12 | gettext\ | ||
13 | malloc\ | ||
14 | memrchr\ | ||
15 | mkdtemp\ | ||
16 | obstack\ | ||
17 | realloc\ | ||
18 | regex\ | ||
19 | save-cwd\ | ||
20 | snprintf\ | ||
21 | strtok_r\ | ||
22 | vasprintf" | ||
23 | |||
24 | MODAVOID="xalloc-die openat-die" | ||
25 | 2 | ||
26 | # Other locale categories that need message catalogs. | 3 | # Bootstrap this package from checked-out sources. |
27 | EXTRA_LOCALE_CATEGORIES= | ||
28 | 4 | ||
29 | NLS_MARKERS="\ | 5 | # Copyright (C) 2003-2008 Free Software Foundation, Inc. |
30 | MF_THROW:2\ | ||
31 | MF_ASSERT:3\ | ||
32 | parse_error:1\ | ||
33 | parse_error_locus:2\ | ||
34 | mu_error:1\ | ||
35 | gacopyz_io_log:3\ | ||
36 | gacopyz_logmsg:2\ | ||
37 | gacopyz_log:3" | ||
38 | 6 | ||
39 | # Additional xgettext options to use. Use "\\\newline" to break lines. | 7 | # This program is free software: you can redistribute it and/or modify |
40 | XGETTEXT_OPTIONS='\\\ | 8 | # it under the terms of the GNU General Public License as published by |
41 | --flag=_:1:pass-c-format\\\ | 9 | # the Free Software Foundation, either version 3 of the License, or |
42 | --flag=N_:1:pass-c-format\\\ | 10 | # (at your option) any later version. |
43 | --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ | 11 | |
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | |||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | |||
20 | # Written by Paul Eggert. | ||
21 | |||
22 | nl=' | ||
44 | ' | 23 | ' |
45 | 24 | ||
46 | COPYRIGHT_HOLDER="Sergey Poznyakoff" | 25 | # Ensure file names are sorted consistently across platforms. |
26 | LC_ALL=C | ||
27 | export LC_ALL | ||
47 | 28 | ||
48 | # Translation Project URL, for the registry of all projects | 29 | local_gl_dir=gl |
49 | # and for the translation-team master directory. | ||
50 | # (for future use) | ||
51 | tp_url() { | ||
52 | echo "http://translationproject.org/domain/$1.html" | ||
53 | } | ||
54 | 30 | ||
55 | ############################ | 31 | # Temporary directory names. |
56 | ## Implementation | 32 | bt='._bootmp' |
57 | ############################ | 33 | bt_regex=`echo "$bt"| sed 's/\./[.]/g'` |
34 | bt2=${bt}2 | ||
58 | 35 | ||
59 | usage() { | 36 | usage() { |
60 | echo >&2 "\ | 37 | echo >&2 "\ |
61 | Usage: $0 [OPTION]... GNULIB_DIR | 38 | Usage: $0 [OPTION]... |
62 | Bootstrap this package from the checked-out sources. | 39 | Bootstrap this package from the checked-out sources. |
63 | 40 | ||
41 | Options: | ||
42 | --gnulib-srcdir=DIRNAME Specify the local directory where gnulib | ||
43 | sources reside. Use this if you already | ||
44 | have gnulib sources on your machine, and | ||
45 | do not want to waste your bandwidth downloading | ||
46 | them again. | ||
64 | --copy Copy files instead of creating symbolic links. | 47 | --copy Copy files instead of creating symbolic links. |
65 | --force Attempt to bootstrap even if the sources seem | 48 | --force Attempt to bootstrap even if the sources seem |
66 | not to have been checked out. | 49 | not to have been checked out. |
67 | --skip-po Do not download po files. | 50 | --skip-po Do not download po files. |
68 | --update-po[=LANG] Update po file(s) and exit. | ||
69 | |||
70 | The only argument specifes the file name of the directory were gnulib | ||
71 | sources are located. You will have to check out them beforehand, \`bootstrap' | ||
72 | won't do this for you. | ||
73 | 51 | ||
74 | Local defaults can be provided by placing the file \`.bootstrap' in the | 52 | If the file bootstrap.conf exists in the current working directory, its |
75 | current working directory. The file is read, comments and empty lines are | 53 | contents are read as shell variables to configure the bootstrap. |
76 | removed, shell variables expanded and the result is prepended to the command | ||
77 | line options. | ||
78 | 54 | ||
79 | Running without arguments will suffice in most cases. | 55 | Running without arguments will suffice in most cases. |
80 | " | 56 | " |
81 | } | 57 | } |
82 | 58 | ||
83 | # Read local configuration file | 59 | # Configuration. |
84 | if [ -r .bootstrap ]; then | 60 | |
85 | echo "$0: Reading configuration file .bootstrap" | 61 | # Name of the Makefile.am |
86 | eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*" | 62 | gnulib_mk=gnulib.mk |
87 | fi | 63 | |
64 | # List of gnulib modules needed. | ||
65 | gnulib_modules= | ||
66 | |||
67 | # Any gnulib files needed that are not in modules. | ||
68 | gnulib_files= | ||
69 | |||
70 | # The command to download all .po files for a specified domain into | ||
71 | # a specified directory. Fill in the first %s is the domain name, and | ||
72 | # the second with the destination directory. Use rsync's -L and -r | ||
73 | # options because the latest/%s directory and the .po files within are | ||
74 | # all symlinks. | ||
75 | po_download_command_format=\ | ||
76 | "rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'" | ||
88 | 77 | ||
89 | extract_package_name=' | 78 | extract_package_name=' |
90 | /^AC_INIT(/{ | 79 | /^AC_INIT(/{ |
91 | /.*,.*,.*,/{ | 80 | /.*,.*,.*, */{ |
92 | s/// | 81 | s/// |
93 | s/[][]//g | 82 | s/[][]//g |
83 | s/)$// | ||
94 | p | 84 | p |
95 | q | 85 | q |
96 | } | 86 | } |
@@ -103,23 +93,70 @@ extract_package_name=' | |||
103 | } | 93 | } |
104 | ' | 94 | ' |
105 | package=`sed -n "$extract_package_name" configure.ac` || exit | 95 | package=`sed -n "$extract_package_name" configure.ac` || exit |
96 | gnulib_name=lib$package | ||
97 | |||
98 | build_aux=build-aux | ||
99 | source_base=lib | ||
100 | m4_base=m4 | ||
101 | doc_base=doc | ||
102 | tests_base=tests | ||
103 | |||
104 | # Extra files from gnulib, which override files from other sources. | ||
105 | gnulib_extra_files=" | ||
106 | $build_aux/install-sh | ||
107 | $build_aux/missing | ||
108 | $build_aux/mdate-sh | ||
109 | $build_aux/texinfo.tex | ||
110 | $build_aux/depcomp | ||
111 | $build_aux/config.guess | ||
112 | $build_aux/config.sub | ||
113 | doc/INSTALL | ||
114 | " | ||
106 | 115 | ||
107 | extract_bug_address=' | 116 | # Additional gnulib-tool options to use. Use "\newline" to break lines. |
108 | /^AC-INIT-BUG-ADDRESS/{ | 117 | gnulib_tool_option_extras= |
109 | s/[][]//g | 118 | |
110 | s/.*=//p | 119 | # Other locale categories that need message catalogs. |
111 | } | 120 | EXTRA_LOCALE_CATEGORIES= |
121 | |||
122 | # Additional xgettext options to use. Use "\\\newline" to break lines. | ||
123 | XGETTEXT_OPTIONS='\\\ | ||
124 | --flag=_:1:pass-c-format\\\ | ||
125 | --flag=N_:1:pass-c-format\\\ | ||
126 | --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ | ||
112 | ' | 127 | ' |
113 | bug_address=`m4 -D'AC_INIT=AC-INIT-BUG-ADDRESS=$3' configure.ac | sed -n "$extract_bug_address"` | 128 | |
114 | if test -z "$bug_address"; then | 129 | # Package bug report address for gettext files |
115 | bug_address="bug-${package}@gnu.org.ua" | 130 | MSGID_BUGS_ADDRESS=bug-$package@gnu.org |
116 | fi | 131 | |
132 | # Files we don't want to import. | ||
133 | excluded_files= | ||
134 | |||
135 | # File that should exist in the top directory of a checked out hierarchy, | ||
136 | # but not in a distribution tarball. | ||
137 | checkout_only_file=README-hacking | ||
117 | 138 | ||
118 | # Whether to use copies instead of symlinks. | 139 | # Whether to use copies instead of symlinks. |
119 | copy=false | 140 | copy=false |
120 | 141 | ||
121 | GNULIB_OPTION= | 142 | # Set this to '.cvsignore .gitignore' in bootstrap.conf if you want |
122 | DOWNLOAD_PO= | 143 | # those files to be generated in directories like lib/, m4/, and po/. |
144 | # Or set it to 'auto' to make this script select which to use based | ||
145 | # on which version control system (if any) is used in the source directory. | ||
146 | vc_ignore=auto | ||
147 | |||
148 | # Override the default configuration, if necessary. | ||
149 | test -r bootstrap.conf && . ./bootstrap.conf | ||
150 | |||
151 | if test "$vc_ignore" = auto; then | ||
152 | vc_ignore= | ||
153 | test -d .git && vc_ignore=.gitignore | ||
154 | test -d CVS && vc_ignore="$vc_ignore .cvsignore" | ||
155 | fi | ||
156 | |||
157 | # Translate configuration into internal form. | ||
158 | |||
159 | # Parse options. | ||
123 | 160 | ||
124 | for option | 161 | for option |
125 | do | 162 | do |
@@ -127,186 +164,462 @@ do | |||
127 | --help) | 164 | --help) |
128 | usage | 165 | usage |
129 | exit;; | 166 | exit;; |
130 | --skip-po | --no-po) # --no-po is for compatibility with 'tar' tradition. | 167 | --gnulib-srcdir=*) |
131 | DOWNLOAD_PO=skip;; | 168 | GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; |
132 | --update-po=*) |