• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Makefile for the gettext-tools/system-tests subdirectory of GNU gettext
2## Copyright (C) 1995-2018 Free Software Foundation, Inc.
3##
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 3 of the License, or
7## (at your option) any later version.
8##
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.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program.  If not, see <https://www.gnu.org/licenses/>.
16
17## Process this file with automake to produce Makefile.in.
18
19AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests
20EXTRA_DIST =
21MOSTLYCLEANFILES = core *.stackdump
22
23EXTRA_DIST += README run-test
24
25# For debugging memory leaks and memory allocation bugs.
26# You should build with --disable-shared when using valgrind.
27CHECKER =
28#CHECKER = valgrind --tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes
29#CHECKER = valgrind --tool=massif --format=html --depth=10 --stacks=no
30
31TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \
32		    abs_srcdir=$(abs_srcdir) \
33		    abs_top_srcdir=$(abs_top_srcdir) \
34		    GETTEXT="$(CHECKER) tstgettext" \
35		    NGETTEXT="$(CHECKER) tstngettext" \
36		    XGETTEXT="$(CHECKER) xgettext" \
37		    MSGATTRIB="$(CHECKER) msgattrib" \
38		    MSGCAT="$(CHECKER) msgcat" \
39		    MSGCMP="$(CHECKER) msgcmp" \
40		    MSGCOMM="$(CHECKER) msgcomm" \
41		    MSGCONV="$(CHECKER) msgconv" \
42		    MSGEN="$(CHECKER) msgen" \
43		    MSGEXEC="$(CHECKER) msgexec" \
44		    MSGFILTER="$(CHECKER) msgfilter" \
45		    MSGFMT="$(CHECKER) msgfmt" \
46		    MSGGREP="$(CHECKER) msggrep" \
47		    MSGINIT="$(CHECKER) msginit" \
48		    MSGMERGE="$(CHECKER) msgmerge" \
49		    MSGUNFMT="$(CHECKER) msgunfmt" \
50		    MSGUNIQ="$(CHECKER) msguniq" \
51		    RECODE="$(CHECKER) recode" \
52		    CONFIG_SHELL='$(SHELL)'
53
54LOG_COMPILER = $(SHELL) $(srcdir)/run-test
55
56# It is important that the gnulib-generated *.h files are not visible here,
57# except for config.h.
58AM_CPPFLAGS = -I..
59
60# The USE_SYSTEM_LIBINTL flag distinguishes a compilation in the system-tests/
61# directory from a compilation in the tests/ directory.
62DEFS = -DUSE_SYSTEM_LIBINTL @DEFS@
63
64if TEST_SYSTEM_LIBINTL
65
66TESTS = intl-1 intl-2 intl-3 intl-4 intl-5 \
67	intl-setlocale-1 intl-setlocale-2 \
68	intl-thread-1 intl-thread-2 intl-thread-3 \
69	format-c-3 format-c-4 format-c-5 plural-1
70.PHONY: $(TESTS)
71
72# Auxiliary programs used by the tests.
73check_PROGRAMS = testlocale intl-1-prg intl-3-prg intl-4-prg intl-5-prg intl-setlocale-1-prg intl-setlocale-2-prg intl-thread-1-prg intl-thread-2-prg intl-thread-3-prg cake fc3 fc4 fc5
74testlocale_SOURCES = testlocale.c
75intl_1_prg_SOURCES = intl-1-prg.c
76intl_3_prg_SOURCES = intl-3-prg.c
77intl_4_prg_SOURCES = intl-4-prg.c
78intl_5_prg_SOURCES = intl-5-prg.c
79intl_setlocale_1_prg_SOURCES = intl-setlocale-1-prg.c
80intl_setlocale_2_prg_SOURCES = intl-setlocale-2-prg.c
81intl_thread_1_prg_SOURCES = intl-thread-1-prg.c
82intl_thread_1_prg_CFLAGS = $(intl_thread_1_prg_CFLAGS_@HAVE_NEWLOCALE@)
83intl_thread_1_prg_CFLAGS_1 = -DUSE_POSIX_THREADS
84intl_thread_1_prg_LDADD = $(LDADD) $(intl_thread_1_prg_LDADD_@HAVE_NEWLOCALE@)
85intl_thread_1_prg_LDADD_1 = -lpthread
86intl_thread_2_prg_SOURCES = intl-thread-2-prg.c
87intl_thread_2_prg_CFLAGS = $(intl_thread_2_prg_CFLAGS_@HAVE_NEWLOCALE@)
88intl_thread_2_prg_CFLAGS_1 = -DUSE_POSIX_THREADS
89intl_thread_2_prg_LDADD = $(LDADD) $(intl_thread_2_prg_LDADD_@HAVE_NEWLOCALE@)
90intl_thread_2_prg_LDADD_1 = -lpthread
91intl_thread_3_prg_SOURCES = intl-thread-3-prg.c
92intl_thread_3_prg_CFLAGS = $(intl_thread_3_prg_CFLAGS_@HAVE_NEWLOCALE@)
93intl_thread_3_prg_CFLAGS_1 = -DUSE_POSIX_THREADS
94intl_thread_3_prg_LDADD = $(LDADD) $(intl_thread_3_prg_LDADD_@HAVE_NEWLOCALE@)
95intl_thread_3_prg_LDADD_1 = -lpthread
96cake_SOURCES = plural-1-prg.c
97fc3_SOURCES = format-c-3-prg.c
98fc4_SOURCES = format-c-4-prg.c
99fc5_SOURCES = format-c-5-prg.c
100
101endif
102
103# Clean up after Solaris cc.
104clean-local:
105	rm -rf SunWS_cache
106