From: Bruno Haible Date: Tue, 23 Jan 2001 17:25:58 +0000 (+0000) Subject: Rename src/gettextp.c to src/gettext.c, and X-Git-Tag: v0.10.36~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c044fae28a9d8bf34b5671fa4a359656a1fe5767;p=thirdparty%2Fgettext.git Rename src/gettextp.c to src/gettext.c, and move src/setlocale.c to tests/setlocale.c. --- diff --git a/doc/gettext.texi b/doc/gettext.texi index 67747acad..f78925c27 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -4837,7 +4837,7 @@ lib/getopt.c lib/xmalloc.c # Package source files -src/gettextp.c +src/gettext.c src/msgfmt.c src/xgettext.c @end group diff --git a/po/ChangeLog b/po/ChangeLog index d805ad46a..948c301df 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,8 @@ +2001-01-07 Bruno Haible + + * POTFILES.in: src/gettext.c was renamed from src/gettextp.c. + Add lib/obstack.c, src/open-po.c, src/po-lex.h. + 2001-01-06 Bruno Haible * Makefile.in.in (.po.gmo): Pass --statistics to msgfmt. diff --git a/po/POTFILES.in b/po/POTFILES.in index 41e92de58..ce3da0f9f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,20 +1,23 @@ # List of files which containing translatable strings. -# Copyright (C) 1995, 1998 Free Software Foundation, Inc. +# Copyright (C) 1995, 1998, 2001 Free Software Foundation, Inc. # Files from the compatibility library lib/error.c lib/getopt.c +lib/obstack.c lib/xmalloc.c # Package source files -src/gettextp.c +src/gettext.c src/message.c src/msgcmp.c src/msgcomm.c src/msgfmt.c src/msgmerge.c src/msgunfmt.c +src/open-po.c src/po-gram-gen.c +src/po-lex.h src/po-lex.c src/xget-lex.c src/xgettext.c diff --git a/src/ChangeLog b/src/ChangeLog index 1562734e4..d6456022b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2001-01-07 Bruno Haible + + * gettext.c: Renamed from gettextp.c. Use included libintl if TESTS + is defined. + * setlocale.c: Move to ../tests. + * Makefile.am (EXTRA_PROGRAMS, all-local, CLEANFILES): Remove. + (tstgettext_SOURCES): Remove. + (gettext_SOURCES): Update. + 2001-01-07 Bruno Haible * msgcmp.c: Include libgettext.h instead of libintl.h, so that the diff --git a/src/FILES b/src/FILES index 320bb9bee..cb8d47ce6 100644 --- a/src/FILES +++ b/src/FILES @@ -2,7 +2,7 @@ ===================================== 1) -gettextp.c Source for the 'gettext' program. +gettext.c Source for the 'gettext' program. 2) The msgfmt, msgunfmt, msgcmp, msgcomm, msgmerge, xgettext programs. diff --git a/src/Makefile.am b/src/Makefile.am index a2da9b238..24c7a7799 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,13 +39,8 @@ LDADD = ../lib/libnlsut.a @INTLLIBS@ ../intl/libintl.$la SED = sed YACC = @YACC@ -d -EXTRA_PROGRAMS = tstgettext -all-local: $(EXTRA_PROGRAMS) -CLEANFILES = $(EXTRA_PROGRAMS) - # Source dependencies. -gettext_SOURCES = gettextp.c -tstgettext_SOURCES = gettextp.c setlocale.c +gettext_SOURCES = gettext.c msgcmp_SOURCES = message.c msgcmp.c open-po.c po-gram-gen.y po-hash-gen.y \ po-lex.c po.c str-list.c dir-list.c msgfmt_SOURCES = msgfmt.c open-po.c po-gram-gen.y po-hash-gen.y po-lex.c po.c \ diff --git a/src/gettextp.c b/src/gettext.c similarity index 96% rename from src/gettextp.c rename to src/gettext.c index e7475676d..9692b50be 100644 --- a/src/gettextp.c +++ b/src/gettext.c @@ -28,7 +28,16 @@ #include "error.h" #include "system.h" -#include "libgettext.h" +#ifdef TESTS +/* Make sure we use the included libintl, not the system's one. */ +# define textdomain textdomain__ +# define bindtextdomain bindtextdomain__ +# define gettext gettext__ +# define dgettext dgettext__ +# include +#else +# include "libgettext.h" +#endif #define _(str) gettext (str) diff --git a/tests/ChangeLog b/tests/ChangeLog index 4f2485273..64b790fe9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,17 @@ +2001-01-07 Bruno Haible + + * setlocale.c: New file, moved here from ../src. + * tstgettext.c: New file. + * Makefile.am (TESTS_ENVIRONMENT): Add "." to the PATH. + (xg-test1.ok.po): Use src/gettext.c instead of src/gettextp.c. + (INCLUDES): Add more dirs. + (DEFS): Add defines needed for gettext.c. + (LDADD): New variable. + (EXTRA_PROGRAMS, all-local, CLEANFILES): Add tstgettext. + (tstgettext_SOURCES, tstgettext_LDADD): New variable. + (cake_SOURCES): Update. + * xgettext-1: Use src/gettext.c instead of src/gettextp.c. + 2001-01-07 Bruno Haible * plural-1-prg.c: Include libgnuintl.h instead of libgettext.h. diff --git a/tests/Makefile.am b/tests/Makefile.am index a7f7d5c39..742bf2936 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,7 +28,7 @@ EXTRA_DIST = $(TESTS) test.mo xg-test1.ok.po XGETTEXT = ../src/xgettext -TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH \ +TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=.:../src:$$PATH \ GETTEXT=tstgettext \ XGETTEXT=`echo xgettext|sed '$(transform)'` \ MSGFMT=`echo msgfmt|sed '$(transform)'` \ @@ -38,15 +38,18 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src:$$PATH \ $(SHELL) xg-test1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \ - $(top_srcdir)/src/gettextp.c + $(top_srcdir)/src/gettext.c $(XGETTEXT) -d xg-test1.ok -p $(srcdir) -k_ --omit-header \ $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \ - $(top_srcdir)/src/gettextp.c - -# An auxiliary program used by the plural-1 test. -INCLUDES = -I${top_srcdir}/intl -EXTRA_PROGRAMS = cake -cake_SOURCES = plural-1-prg.c -cake_LDADD = ../src/setlocale.o ../intl/libintl.a -all-local: cake -CLEANFILES = cake + $(top_srcdir)/src/gettext.c + +# Two auxiliary programs used by the tests. +INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl +DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ +LDADD = ../intl/libintl.a +EXTRA_PROGRAMS = tstgettext cake +tstgettext_SOURCES = tstgettext.c setlocale.c +tstgettext_LDADD = ../lib/libnlsut.a $(LDADD) +cake_SOURCES = plural-1-prg.c setlocale.c +all-local: $(EXTRA_PROGRAMS) +CLEANFILES = $(EXTRA_PROGRAMS) diff --git a/src/setlocale.c b/tests/setlocale.c similarity index 100% rename from src/setlocale.c rename to tests/setlocale.c diff --git a/tests/tstgettext.c b/tests/tstgettext.c new file mode 100644 index 000000000..98cd74dc6 --- /dev/null +++ b/tests/tstgettext.c @@ -0,0 +1,3 @@ +/* A version of the gettext program that uses the included libintl. */ +#define TESTS +#include "../src/gettext.c" diff --git a/tests/xgettext-1 b/tests/xgettext-1 index 84cb1e87b..7faaee7e0 100755 --- a/tests/xgettext-1 +++ b/tests/xgettext-1 @@ -7,7 +7,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="xg-test1.po" : ${XGETTEXT=xgettext} ${XGETTEXT} -d xg-test1 -k_ --omit-header \ - $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c $top_srcdir/src/gettextp.c + $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c $top_srcdir/src/gettext.c : ${DIFF=diff} ${DIFF} $top_srcdir/tests/xg-test1.ok.po xg-test1.po