1 ## Makefile for the gettext-tools/tests subdirectory of GNU gettext
2 ## Copyright (C) 1995-1997, 2001-2005 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ## Process this file with automake to produce Makefile.in.
20 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
23 TESTS = gettext-1 gettext-2 \
24 msgattrib-1 msgattrib-2 msgattrib-3 msgattrib-4 msgattrib-5 \
25 msgattrib-6 msgattrib-7 msgattrib-8 msgattrib-9 msgattrib-10 \
26 msgattrib-11 msgattrib-12 msgattrib-13 msgattrib-14 \
27 msgattrib-properties-1 \
28 msgcat-1 msgcat-2 msgcat-3 msgcat-4 msgcat-5 msgcat-6 msgcat-7 \
29 msgcat-8 msgcat-9 msgcat-10 msgcat-11 \
30 msgcat-properties-1 msgcat-properties-2 \
31 msgcat-stringtable-1 \
32 msgcmp-1 msgcmp-2 msgcmp-3 \
33 msgcomm-1 msgcomm-2 msgcomm-3 msgcomm-4 msgcomm-5 msgcomm-6 msgcomm-7 \
34 msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \
35 msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 msgcomm-18 msgcomm-19 \
36 msgcomm-20 msgcomm-21 msgcomm-22 msgcomm-23 msgcomm-24 \
37 msgconv-1 msgconv-2 msgconv-3 msgconv-4 \
39 msgexec-1 msgexec-2 msgexec-3 \
40 msgfilter-1 msgfilter-2 msgfilter-3 \
41 msgfmt-1 msgfmt-2 msgfmt-3 msgfmt-4 msgfmt-5 msgfmt-6 msgfmt-7 \
42 msgfmt-8 msgfmt-9 msgfmt-10 msgfmt-11 msgfmt-12 msgfmt-13 \
45 msggrep-1 msggrep-2 msggrep-3 msggrep-4 msggrep-5 msggrep-6 \
47 msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-6 \
48 msgmerge-7 msgmerge-8 msgmerge-9 msgmerge-10 msgmerge-11 msgmerge-12 \
49 msgmerge-13 msgmerge-14 msgmerge-15 msgmerge-16 msgmerge-17 \
50 msgmerge-compendium-1 msgmerge-compendium-2 msgmerge-compendium-3 \
51 msgmerge-compendium-4 \
52 msgmerge-properties-1 msgmerge-properties-2 \
53 msgmerge-update-1 msgmerge-update-2 msgmerge-update-3 \
57 msgunfmt-properties-1 \
59 msguniq-1 msguniq-2 msguniq-3 msguniq-4 \
60 xgettext-1 xgettext-2 xgettext-3 xgettext-4 xgettext-5 xgettext-6 \
61 xgettext-7 xgettext-8 \
63 xgettext-c-1 xgettext-c-2 xgettext-c-3 xgettext-c-4 xgettext-c-5 \
64 xgettext-c-6 xgettext-c-7 xgettext-c-8 xgettext-c-9 \
65 xgettext-csharp-1 xgettext-csharp-2 xgettext-csharp-3 \
66 xgettext-csharp-4 xgettext-csharp-5 \
68 xgettext-glade-1 xgettext-glade-2 xgettext-glade-3 \
69 xgettext-java-1 xgettext-java-2 xgettext-java-3 xgettext-java-4 \
73 xgettext-objc-1 xgettext-objc-2 \
74 xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \
78 xgettext-properties-1 \
79 xgettext-python-1 xgettext-python-2 \
81 xgettext-sh-1 xgettext-sh-2 xgettext-sh-3 \
82 xgettext-smalltalk-1 \
83 xgettext-stringtable-1 \
84 xgettext-tcl-1 xgettext-tcl-2 \
85 xgettext-ycp-1 xgettext-ycp-2 \
86 format-awk-1 format-awk-2 \
87 format-c-1 format-c-2 format-c-3 format-c-4 format-c-5 \
88 format-csharp-1 format-csharp-2 \
89 format-elisp-1 format-elisp-2 \
90 format-gcc-internal-1 format-gcc-internal-2 \
91 format-java-1 format-java-2 \
92 format-librep-1 format-librep-2 \
93 format-lisp-1 format-lisp-2 \
94 format-php-1 format-php-2 \
95 format-python-1 format-python-2 \
96 format-pascal-1 format-pascal-2 \
97 format-perl-1 format-perl-2 \
98 format-perl-brace-1 format-perl-brace-2 \
99 format-perl-mixed-1 format-perl-mixed-2 \
100 format-qt-1 format-qt-2 \
101 format-scheme-1 format-scheme-2 \
102 format-sh-1 format-sh-2 \
103 format-tcl-1 format-tcl-2 \
104 format-ycp-1 format-ycp-2 \
106 lang-c lang-c++ lang-objc lang-sh lang-bash lang-python-1 \
107 lang-python-2 lang-clisp lang-elisp lang-librep lang-guile \
108 lang-smalltalk lang-java lang-csharp lang-gawk lang-pascal \
109 lang-ycp lang-tcl lang-perl-1 lang-perl-2 lang-php lang-po lang-rst
111 EXTRA_DIST += $(TESTS) \
112 test.mo xg-c-1.ok.po mex-test2.ok msguniq-a.in msguniq-a.inp \
113 msguniq-a.out qttest_pl.po qttest_pl.qm ChangeLog.0
115 XGETTEXT = ../src/xgettext
117 # For debugging memory leaks and memory allocation bugs.
118 # You should build with --disable-shared when using valgrind.
120 #CHECKER = valgrind --tool=memcheck --suppressions=$(srcdir)/../lib/allocsa.valgrind --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes
121 #CHECKER = valgrind --tool=massif --format=html --depth=10 --alloc-fn=xmalloc --alloc-fn=xrealloc --stacks=no
123 TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \
124 PATH=.:../src:../../gettext-runtime/src:$(top_srcdir)/../gettext-runtime/src:$$PATH \
125 GETTEXT="$(CHECKER) tstgettext" \
126 NGETTEXT="$(CHECKER) tstngettext" \
127 XGETTEXT="$(CHECKER) xgettext" \
128 MSGATTRIB="$(CHECKER) msgattrib" \
129 MSGCAT="$(CHECKER) msgcat" \
130 MSGCMP="$(CHECKER) msgcmp" \
131 MSGCOMM="$(CHECKER) msgcomm" \
132 MSGCONV="$(CHECKER) msgconv" \
133 MSGEN="$(CHECKER) msgen" \
134 MSGEXEC="$(CHECKER) msgexec" \
135 MSGFILTER="$(CHECKER) msgfilter" \
136 MSGFMT="$(CHECKER) msgfmt" \
137 MSGGREP="$(CHECKER) msggrep" \
138 MSGINIT="$(CHECKER) msginit" \
139 MSGMERGE="$(CHECKER) msgmerge" \
140 MSGUNFMT="$(CHECKER) msgunfmt" \
141 MSGUNIQ="$(CHECKER) msguniq" \
142 OBJEXT='@OBJEXT@' EXEEXT='@EXEEXT@' \
143 LIBTOOL='@LIBTOOL@' \
144 CC='@CC@' CFLAGS='@CFLAGS@' \
145 CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' \
146 CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \
147 LTLIBINTL='@LTLIBINTL@' \
148 TESTJAVA='@TESTJAVA@' \
149 TESTCSHARP='@TESTCSHARP@' \
150 TESTLIBASPRINTF='@TESTLIBASPRINTF@' \
151 LOCALE_FR='@LOCALE_FR@' \
152 LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
153 host_os='@host_os@' \
154 CONFIG_SHELL='$(SHELL)' \
157 xg-c-1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
158 $(XGETTEXT) -d xg-c-1.ok -p $(srcdir) \
159 -k_ --omit-header --no-location \
160 $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
162 # Three auxiliary programs used by the tests.
163 localedir = $(datadir)/locale
166 -I../lib -I$(top_srcdir)/lib \
168 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
169 # INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
170 # but libtool doesn't put -Wl,-framework options into .la files.
171 LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@) @INTL_MACOSX_LIBS@
172 LDADD_yes = ../intl/libintl.la
173 LDADD_no = ../intl/libgnuintl.la @LTLIBINTL@
174 noinst_PROGRAMS = tstgettext tstngettext testlocale cake fc3 fc4 fc5
175 tstgettext_SOURCES = tstgettext.c setlocale.c
176 tstgettext_CFLAGS = -DINSTALLDIR=\".\"
177 tstgettext_LDADD = ../lib/libgettextlib.la $(LDADD)
178 tstngettext_SOURCES = tstngettext.c setlocale.c
179 tstngettext_CFLAGS = -DINSTALLDIR=\".\"
180 tstngettext_LDADD = ../lib/libgettextlib.la $(LDADD)
181 testlocale_SOURCES = testlocale.c
182 cake_SOURCES = plural-1-prg.c setlocale.c
183 cake_LDADD = ../lib/libgettextlib.la $(LDADD)
184 fc3_SOURCES = format-c-3-prg.c setlocale.c
185 fc3_LDADD = ../lib/libgettextlib.la $(LDADD)
186 fc4_SOURCES = format-c-4-prg.c setlocale.c
187 fc4_LDADD = ../lib/libgettextlib.la $(LDADD)
188 fc5_SOURCES = format-c-5-prg.c
189 fc5_LDADD = ../lib/libgettextlib.la $(LDADD)
191 # Clean up after Solaris cc.
198 EXTRA_DIST += Makefile.vms
203 EXTRA_DIST += Makefile.msvc