/* * aegis - project change supervisor * Copyright (C) 1997, 1999, 2001 Peter Miller; * All rights reserved. * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * * MANIFEST: instructions to cook(1), how to build internationalization files */ /* * Figure out the supported languages, by looking at where the message * files are, and where the documentation is. */ langs = [stringset [fromto lib/%1/%0%2.po %1 [match_mask lib/%1/%0%2.po [source_files]] ] [fromto lib/%1/%0%2.mm %1 [match_mask lib/%1/%0%2.mm [source_files]] ] [fromto lib/%1/%0%2.ms %1 [match_mask lib/%1/%0%2.ms [source_files]] ] [fromto lib/%1/%0%2.1 %1 [match_mask lib/%1/%0%2.1 [source_files]] ] ]; i18n_commands = [filter_out test_% [commands]]; /* * Translate the locatization files into their binary form. This will * be different for each architecture and operating system (in theory, * if not in practice). */ internationalization: [fromto lib/%0%.po [arch]/lib/%0%.mo [match_mask lib/%0%.po [source_files]]] [fromto lib/%0%.po lib/%0%.merge [match_mask lib/%0%.po [source_files]]] LICENSE i18n-tmp/libaegis.ok ; all,I = [fromto %0%.y %0%.gen.c,I [match_mask %0%.y [source_files]]] [fromto %0%.def %0%.c,I [match_mask %0%.def [source_files]]] [fromto %0%.c %0%.c,I [match_mask %0%.c [source_files]]] ; libaegis,I = [match_mask libaegis/%0% [all,I]]; i18n-tmp/libaegis.ok: i18n-tmp/libaegis.extra etc/zer-len-msg.sh { sh [resolve etc/zer-len-msg.sh i18n-tmp/libaegis.extra]; touch [target]; } msgcomm = msgcomm; i18n-tmp/libaegis.extra: [prepost "i18n-tmp/" ",I" [i18n_commands]] { [msgcomm] --force-po --omit-header --sort-output --add-location --indent --width\=75 -o [target] [prepost "--dir=" "" [search_list]] /* no need to resolve, --dir will do it */ [need]; } msgmerge = msgmerge; lib/%0%.merge: lib/%0%.po i18n-tmp/%,I { [msgmerge] --indent --sort-output --width\=75 -v -v --no-location --force-po -o [target] [resolve lib/%0%.po i18n-tmp/%,I] ; /* * There should be no differences. * If there are, this next command will show them. */ diff -u [resolve lib/%0%.po] [target]; } msgfmt = msgfmt; [arch]/lib/%0%.mo: lib/%0%.po lib/%0libaegis.po set ['if' [not [defined baseline]] 'then' shallow] { /* * This only works for GNU gettext (and Solaris). * The SunOS msgfmt program does not grok the -o option. */ [msgfmt] -o [target] [resolve [need]]; } xgettext = xgettext; /* * This file will hopefully act as a "header file" to check the * lib/%0%.po files against. There should not be any extras or * omissions. */ i18n-tmp/libaegis,I: [all,I]: [prepost "lib/en/LC_MESSAGES/" ".po" [i18n_commands]] etc/i18n.clean.sh { /* * The author only speaks English, so the master translation is * "en", hence lib/en/LC_MESSAGES/....po are the files intended. */ [xgettext] --sort-output --indent --add-location -o [target] [prepost "--dir=" "" [search_list]] [prepost "--exclude-file=lib/en/LC_MESSAGES/" ".po" [i18n_commands]] --language\=PO /* no need to resolve, --dir will do it */ [all,I]; /* * Get rid of the "POT-Creation-Date" header, * it messes up the .po file checking. */ sh [resolve etc/i18n.clean.sh] [target]; } i18n-tmp/%,I: [%,I]: lib/en/LC_MESSAGES/libaegis.po etc/i18n.clean.sh { /* * The author only speaks English, so the master translation is * "en", hence lib/en/LC_MESSAGES/libaegis.po is the file * intended. */ [xgettext] --sort-output --indent --add-location --force-po -o [target] [prepost "--dir=" "" [search_list]] --exclude-file\=lib/en/LC_MESSAGES/libaegis.po --language\=PO [%,I]; /* * Get rid of the "POT-Creation-Date" header, * it messes up the .po file checking. */ sh [resolve etc/i18n.clean.sh] [target]; } %0%.c,I: %0%.c set no-cascade { [xgettext] --sort-output --indent --omit-header --force-po --add-location -o [target] --keyword\=i18n --keyword\=error_intl --keyword\=fatal_intl --keyword\=verbose_intl --keyword\=io_comment_append --keyword\=aer_report_error --keyword\=gram_error --keyword\=subst_intl --keyword\=input_error_fatal [prepost "--dir=" "" [search_list]] %0%.c; }