move src/setlocale.c to tests/setlocale.c.
lib/xmalloc.c
# Package source files
-src/gettextp.c
+src/gettext.c
src/msgfmt.c
src/xgettext.c
@end group
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * 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 <haible@clisp.cons.org>
* Makefile.in.in (.po.gmo): Pass --statistics to msgfmt.
# 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
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * 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 <haible@clisp.cons.org>
* msgcmp.c: Include libgettext.h instead of libintl.h, so that the
=====================================
1)
-gettextp.c Source for the 'gettext' program.
+gettext.c Source for the 'gettext' program.
2) The msgfmt, msgunfmt, msgcmp, msgcomm, msgmerge, xgettext programs.
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 \
#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 <libgnuintl.h>
+#else
+# include "libgettext.h"
+#endif
#define _(str) gettext (str)
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * 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 <haible@clisp.cons.org>
* plural-1-prg.c: Include libgnuintl.h instead of libgettext.h.
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)'` \
$(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)
--- /dev/null
+/* A version of the gettext program that uses the included libintl. */
+#define TESTS
+#include "../src/gettext.c"
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