aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-05-13 15:21:02 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-05-13 15:21:02 +0000
commit113cb4b143f63e18f2cbab9f0abec0ef453fbbd8 (patch)
tree8d8ccc1d6196e5570953033cbed3189a8111196a /bootstrap
parent06aae065b5b5ccf3ae1e4350f97d0ed0a2658501 (diff)
downloadmailfromd-113cb4b143f63e18f2cbab9f0abec0ef453fbbd8.tar.gz
mailfromd-113cb4b143f63e18f2cbab9f0abec0ef453fbbd8.tar.bz2
Mailfromd goes international
git-svn-id: file:///svnroot/mailfromd/trunk@1428 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap102
1 files changed, 99 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index fc2a8d0d..279699e7 100644
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,11 @@
#! /bin/sh
+############################
+## Configuration
+############################
+
MODLIST="argp\
fprintftime\
+ gettext\
malloc\
memrchr\
mkdtemp\
@@ -11,7 +16,98 @@ MODLIST="argp\
snprintf\
strtok_r\
version-etc"
-
+
+# Other locale categories that need message catalogs.
+EXTRA_LOCALE_CATEGORIES=
+
+NLS_MARKERS="\
+ MF_THROW:2\
+ MF_ASSERT:3\
+ parse_error:1\
+ parse_error_locus:2\
+ mu_error:1\
+ gacopyz_io_log:3\
+ gacopyz_logmsg:2\
+ gacopyz_log:3"
+
+# Additional xgettext options to use. Use "\\\newline" to break lines.
+XGETTEXT_OPTIONS='\\\
+ --flag=_:1:pass-c-format\\\
+ --flag=N_:1:pass-c-format\\\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
+'
+
+COPYRIGHT_HOLDER="Sergey Poznyakoff"
+
+# Translation Project URL, for the registry of all projects
+# and for the translation-team master directory.
+# (for future use)
+#TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain='
+#TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/'
+
+# Currently here
+TP_URL=ftp://download.gnu.org.ua/pub/users/gray/po/mailfromd/
+
+############################
+## Implementation
+############################
+
+extract_package_name='
+ /^AC_INIT(/{
+ /.*,.*,.*,/{
+ s///
+ s/[][]//g
+ p
+ q
+ }
+ s/AC_INIT(\[*//
+ s/]*,.*//
+ s/^GNU //
+ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ s/[^A-Za-z0-9_]/-/g
+ p
+ }
+'
+package=`sed -n "$extract_package_name" configure.ac` || exit
+echo "$0: Bootstrapping $package"
+
+echo "$0: Importing gnulib files ..."
gnulib-tool --import --avoid xalloc-die --avoid openat-die $MODLIST
-test -f lib/daemon.c || ln src/daemon.c lib/
-autoreconf -i -f -s
+
+# Create gettext configuration.
+echo "$0: Creating po/Makevars from po/Makevars.template ..."
+rm -f po/Makevars
+
+if [ -n "$NLS_MARKERS" ]; then
+ XGETTEXT_OPTIONS="$XGETTEXT_OPTIONS "`echo $NLS_MARKERS | tr ' ' '\n' | sed 's/.*/ --flag=&:pass-c-format\\\\\\\\\\\\/'`"
+"
+fi
+
+sed '
+ 1i\
+# -*- buffer-read-only: t -*- vi: set ro:\
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+
+ /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
+ /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
+ /^XGETTEXT_OPTIONS *=/{
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
+ }
+' po/Makevars.template >po/Makevars
+
+echo "$0: Reconfiguring ..."
+
+for command in \
+ 'aclocal --force -I m4' \
+ 'autoconf --force' \
+ 'autoheader --force' \
+ 'automake --add-missing --copy --force-missing';
+do
+ echo "$0: $command ..."
+ $command || exit
+done
+
+echo "$0: done. Now you can run './configure'."

Return to:

Send suggestions and report system problems to the System administrator.