mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-21 21:06:23 +00:00
Update imported gettext code from gettext 0.19.7
This might help with the spurious .pot file update error in 'make distcheck'. At least it does not break anything.
This commit is contained in:
parent
b356df7fcf
commit
232e4d1f7e
125
m4/iconv.m4
125
m4/iconv.m4
@ -1,5 +1,5 @@
|
||||
# iconv.m4 serial 11 (gettext-0.18.1)
|
||||
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
||||
# iconv.m4 serial 19 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
@ -30,27 +30,35 @@ AC_DEFUN([AM_ICONV_LINK],
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
am_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
]],
|
||||
[[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
iconv_close(cd);]])],
|
||||
[am_cv_func_iconv=yes])
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
]],
|
||||
[[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
iconv_close(cd);]])],
|
||||
[am_cv_lib_iconv=yes]
|
||||
[am_cv_func_iconv=yes])
|
||||
LIBS="$am_save_LIBS"
|
||||
@ -58,33 +66,43 @@ AC_DEFUN([AM_ICONV_LINK],
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
|
||||
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
|
||||
dnl Solaris 10.
|
||||
am_save_LIBS="$LIBS"
|
||||
if test $am_cv_lib_iconv = yes; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
fi
|
||||
AC_TRY_RUN([
|
||||
am_cv_func_iconv_works=no
|
||||
for ac_iconv_const in '' 'const'; do
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
int main ()
|
||||
{
|
||||
|
||||
#ifndef ICONV_CONST
|
||||
# define ICONV_CONST $ac_iconv_const
|
||||
#endif
|
||||
]],
|
||||
[[int result = 0;
|
||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||
returns. */
|
||||
{
|
||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_utf8_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
result |= 1;
|
||||
iconv_close (cd_utf8_to_88591);
|
||||
}
|
||||
}
|
||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
||||
@ -93,17 +111,37 @@ int main ()
|
||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\263";
|
||||
static ICONV_CONST char input[] = "\263";
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_ascii_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
result |= 2;
|
||||
iconv_close (cd_ascii_to_88591);
|
||||
}
|
||||
}
|
||||
/* Test against AIX 6.1..7.1 bug: Buffer overrun. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static ICONV_CONST char input[] = "\304";
|
||||
static char buf[2] = { (char)0xDE, (char)0xAD };
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = 1;
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = 1;
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
|
||||
result |= 4;
|
||||
iconv_close (cd_88591_to_utf8);
|
||||
}
|
||||
}
|
||||
#if 0 /* This bug could be worked around by the caller. */
|
||||
@ -112,17 +150,18 @@ int main ()
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
char buf[50];
|
||||
const char *inptr = input;
|
||||
ICONV_CONST char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if ((int)res > 0)
|
||||
return 1;
|
||||
result |= 8;
|
||||
iconv_close (cd_88591_to_utf8);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -136,13 +175,16 @@ int main ()
|
||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||
/* Try HP-UX names. */
|
||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||
return 1;
|
||||
return 0;
|
||||
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
||||
result |= 16;
|
||||
return result;
|
||||
]])],
|
||||
[am_cv_func_iconv_works=yes], ,
|
||||
[case "$host_os" in
|
||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||
esac])
|
||||
test "$am_cv_func_iconv_works" = no || break
|
||||
done
|
||||
LIBS="$am_save_LIBS"
|
||||
])
|
||||
case "$am_cv_func_iconv_works" in
|
||||
@ -181,34 +223,49 @@ dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||
dnl warnings.
|
||||
m4_define([gl_iconv_AC_DEFUN],
|
||||
m4_version_prereq([2.64],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[m4_ifdef([gl_00GNULIB],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[[AC_DEFUN(
|
||||
[$1], [$2])]]))
|
||||
[$1], [$2])]])]))
|
||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
||||
]],
|
||||
[[]])],
|
||||
[am_cv_proto_iconv_arg1=""],
|
||||
[am_cv_proto_iconv_arg1="const"])
|
||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([
|
||||
$am_cv_proto_iconv])
|
||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
|
||||
m4_ifdef([gl_ICONV_H_DEFAULTS],
|
||||
[AC_REQUIRE([gl_ICONV_H_DEFAULTS])
|
||||
if test -n "$am_cv_proto_iconv_arg1"; then
|
||||
ICONV_CONST="const"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
@ -1,17 +1,17 @@
|
||||
# nls.m4 serial 5 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
|
||||
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl This file can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl gettext package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
|
11
m4/po.m4
11
m4/po.m4
@ -1,16 +1,16 @@
|
||||
# po.m4 serial 20 (gettext-0.18.2)
|
||||
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
# po.m4 serial 24 (gettext-0.19)
|
||||
dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl This file can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl gettext package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
@ -25,11 +25,12 @@ AC_DEFUN([AM_PO_SUBDIRS],
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
AC_REQUIRE([AC_PROG_SED])dnl
|
||||
AC_REQUIRE([AM_NLS])dnl
|
||||
|
||||
dnl Release version of the gettext macros. This is used to ensure that
|
||||
dnl the gettext macros and po/Makefile.in.in are in sync.
|
||||
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
|
||||
AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
@ -1,16 +1,16 @@
|
||||
# progtest.m4 serial 6 (gettext-0.18)
|
||||
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
|
||||
# progtest.m4 serial 7 (gettext-0.18.2)
|
||||
dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl This file can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl gettext package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
@ -27,15 +27,14 @@ AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
# Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
|
||||
# contains only /bin. Note that ksh looks also at the FPATH variable,
|
||||
# so we have to set that as well for the test.
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
&& { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
||||
|| PATH_SEPARATOR=';'
|
||||
}
|
||||
fi
|
||||
|
||||
# Find out how to test for executable files. Don't use a zero-byte file,
|
||||
|
@ -1,15 +1,13 @@
|
||||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved. This file is offered as-is,
|
||||
# without any warranty.
|
||||
#
|
||||
# Origin: gettext-0.18.2
|
||||
GETTEXT_MACRO_VERSION = 0.18
|
||||
# Origin: gettext-0.19.7
|
||||
GETTEXT_MACRO_VERSION = 0.19
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
@ -18,6 +16,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
# ADDED FOR LYX
|
||||
PYTHON = @PYTHON@
|
||||
|
||||
SED = @SED@
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
@ -47,6 +46,11 @@ install_sh = $(SHELL) @install_sh@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
mkdir_p = @mkdir_p@
|
||||
|
||||
# When building gettext-tools, we prefer to use the built programs
|
||||
# rather than installed programs. However, we can't do that when we
|
||||
# are cross compiling.
|
||||
CROSS_COMPILING = @CROSS_COMPILING@
|
||||
|
||||
GMSGFMT_ = @GMSGFMT@
|
||||
GMSGFMT_no = @GMSGFMT@
|
||||
GMSGFMT_yes = @GMSGFMT_015@
|
||||
@ -79,6 +83,16 @@ POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
|
||||
POFILESDEPS_yes = $(POFILESDEPS_)
|
||||
POFILESDEPS_no =
|
||||
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
|
||||
|
||||
DISTFILESDEPS_ = update-po
|
||||
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
|
||||
DISTFILESDEPS_no =
|
||||
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
|
||||
.SUFFIXES:
|
||||
@ -145,15 +159,25 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
# heuristic whether some file in the top level directory mentions "GNU xyz".
|
||||
# If GNU 'find' is available, we avoid grepping through monster files.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
package_gnu="$(PACKAGE_GNU)"; \
|
||||
test -n "$$package_gnu" || { \
|
||||
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
|
||||
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
|
||||
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
|
||||
-size -10000000c -exec grep 'GNU @PACKAGE@' \
|
||||
/dev/null '{}' ';' 2>/dev/null; \
|
||||
else \
|
||||
LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
|
||||
fi; \
|
||||
} | grep -v 'libtool:' >/dev/null; then \
|
||||
package_gnu='GNU '; \
|
||||
package_gnu=yes; \
|
||||
else \
|
||||
package_gnu=''; \
|
||||
package_gnu=no; \
|
||||
fi; \
|
||||
}; \
|
||||
if test "$$package_gnu" = "yes"; then \
|
||||
package_prefix='GNU '; \
|
||||
else \
|
||||
package_prefix=''; \
|
||||
fi; \
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
@ -173,12 +197,17 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--package-name="$${package_gnu}@PACKAGE@" \
|
||||
--package-name="$${package_prefix}@PACKAGE@" \
|
||||
--package-version='@VERSION@' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address" \
|
||||
;; \
|
||||
esac
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
|
||||
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
|
||||
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
|
||||
rm -f $(DOMAIN).1po; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
@ -201,13 +230,14 @@ $(srcdir)/$(DOMAIN).pot:
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
$(POFILES): $(POFILESDEPS)
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||
test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) \
|
||||
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
&& { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
|
||||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
|
||||
*) \
|
||||
@ -364,7 +394,7 @@ maintainer-clean: distclean
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
@ -408,7 +438,7 @@ update-po: Makefile
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
|
25
po/Makevars
25
po/Makevars
@ -20,6 +20,13 @@ XGETTEXT_OPTIONS = --from-code=UTF-8 --language=C++ --join-existing --keyword=_
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = LyX Developers
|
||||
|
||||
# This tells whether or not to prepend "GNU " prefix to the package
|
||||
# name that gets inserted into the header of the $(DOMAIN).pot file.
|
||||
# Possible values are "yes", "no", or empty. If it is empty, try to
|
||||
# detect it automatically by scanning the files in $(top_srcdir) for
|
||||
# "GNU packagename" string.
|
||||
PACKAGE_GNU = no
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
@ -51,3 +58,21 @@ USE_MSGCTXT = no
|
||||
# --previous to keep previous msgids of translated messages,
|
||||
# --quiet to reduce the verbosity.
|
||||
MSGMERGE_OPTIONS =
|
||||
|
||||
# These options get passed to msginit.
|
||||
# If you want to disable line wrapping when writing PO files, add
|
||||
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
|
||||
# MSGINIT_OPTIONS.
|
||||
MSGINIT_OPTIONS =
|
||||
|
||||
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
|
||||
# has changed. Possible values are "yes" and "no". Set this to no if
|
||||
# the POT file is checked in the repository and the version control
|
||||
# program ignores timestamps.
|
||||
PO_DEPENDS_ON_POT = yes
|
||||
|
||||
# This tells whether or not to forcibly update $(DOMAIN).pot and
|
||||
# regenerate PO files on "make dist". Possible values are "yes" and
|
||||
# "no". Set this to no if the POT file and PO files are maintained
|
||||
# externally.
|
||||
DIST_DEPENDS_ON_UPDATE_PO = yes
|
||||
|
@ -20,6 +20,13 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This tells whether or not to prepend "GNU " prefix to the package
|
||||
# name that gets inserted into the header of the $(DOMAIN).pot file.
|
||||
# Possible values are "yes", "no", or empty. If it is empty, try to
|
||||
# detect it automatically by scanning the files in $(top_srcdir) for
|
||||
# "GNU packagename" string.
|
||||
PACKAGE_GNU =
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
@ -39,3 +46,33 @@ MSGID_BUGS_ADDRESS =
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
|
||||
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
|
||||
# context. Possible values are "yes" and "no". Set this to yes if the
|
||||
# package uses functions taking also a message context, like pgettext(), or
|
||||
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
|
||||
USE_MSGCTXT = no
|
||||
|
||||
# These options get passed to msgmerge.
|
||||
# Useful options are in particular:
|
||||
# --previous to keep previous msgids of translated messages,
|
||||
# --quiet to reduce the verbosity.
|
||||
MSGMERGE_OPTIONS =
|
||||
|
||||
# These options get passed to msginit.
|
||||
# If you want to disable line wrapping when writing PO files, add
|
||||
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
|
||||
# MSGINIT_OPTIONS.
|
||||
MSGINIT_OPTIONS =
|
||||
|
||||
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
|
||||
# has changed. Possible values are "yes" and "no". Set this to no if
|
||||
# the POT file is checked in the repository and the version control
|
||||
# program ignores timestamps.
|
||||
PO_DEPENDS_ON_POT = yes
|
||||
|
||||
# This tells whether or not to forcibly update $(DOMAIN).pot and
|
||||
# regenerate PO files on "make dist". Possible values are "yes" and
|
||||
# "no". Set this to no if the POT file and PO files are maintained
|
||||
# externally.
|
||||
DIST_DEPENDS_ON_UPDATE_PO = yes
|
||||
|
@ -1,3 +1,4 @@
|
||||
# This file, Rules-quot, can be copied and used freely without restrictions.
|
||||
# Special Makefile rules for English message catalogs with quotation marks.
|
||||
|
||||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
|
||||
@ -14,13 +15,23 @@ en@boldquot.po-update: en@boldquot.po-update-en
|
||||
|
||||
.insert-header.po-update-en:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
ll=`echo $$lang | sed -e 's/@.*//'`; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
|
||||
if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
|
||||
| $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
|
||||
{ case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
|
||||
$(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
|
||||
;; \
|
||||
*) \
|
||||
$(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
|
||||
;; \
|
||||
esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
|
||||
; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
|
Loading…
Reference in New Issue
Block a user