Home | History | Annotate | Line # | Download | only in tests
      1 ## Makefile for the gettext-tools/tests subdirectory of GNU gettext
      2 ## Copyright (C) 1995-1997, 2001-2006 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 2, or (at your option)
      7 ## 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, write to the Free Software Foundation,
     16 ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     17 
     18 ## Process this file with automake to produce Makefile.in.
     19 
     20 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
     21 EXTRA_DIST =
     22 MOSTLYCLEANFILES = core *.stackdump
     23 
     24 TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \
     25 	msgattrib-1 msgattrib-2 msgattrib-3 msgattrib-4 msgattrib-5 \
     26 	msgattrib-6 msgattrib-7 msgattrib-8 msgattrib-9 msgattrib-10 \
     27 	msgattrib-11 msgattrib-12 msgattrib-13 msgattrib-14 msgattrib-15 \
     28 	msgattrib-16 msgattrib-17 \
     29 	msgattrib-properties-1 \
     30 	msgcat-1 msgcat-2 msgcat-3 msgcat-4 msgcat-5 msgcat-6 msgcat-7 \
     31 	msgcat-8 msgcat-9 msgcat-10 msgcat-11 msgcat-12 msgcat-13 msgcat-14 \
     32 	msgcat-15 msgcat-16 \
     33 	msgcat-properties-1 msgcat-properties-2 \
     34 	msgcat-stringtable-1 \
     35 	msgcmp-1 msgcmp-2 msgcmp-3 msgcmp-4 \
     36 	msgcomm-1 msgcomm-2 msgcomm-3 msgcomm-4 msgcomm-5 msgcomm-6 msgcomm-7 \
     37 	msgcomm-8 msgcomm-9 msgcomm-10 msgcomm-11 msgcomm-12 msgcomm-13 \
     38 	msgcomm-14 msgcomm-15 msgcomm-16 msgcomm-17 msgcomm-18 msgcomm-19 \
     39 	msgcomm-20 msgcomm-21 msgcomm-22 msgcomm-23 msgcomm-24 msgcomm-25 \
     40 	msgcomm-26 \
     41 	msgconv-1 msgconv-2 msgconv-3 msgconv-4 msgconv-5 msgconv-6 \
     42 	msgen-1 msgen-2 msgen-3 \
     43 	msgexec-1 msgexec-2 msgexec-3 msgexec-4 \
     44 	msgfilter-1 msgfilter-2 msgfilter-3 msgfilter-4 \
     45 	msgfilter-sr-latin-1 \
     46 	msgfmt-1 msgfmt-2 msgfmt-3 msgfmt-4 msgfmt-5 msgfmt-6 msgfmt-7 \
     47 	msgfmt-8 msgfmt-9 msgfmt-10 msgfmt-11 msgfmt-12 msgfmt-13 msgfmt-14 \
     48 	msgfmt-15 msgfmt-16 \
     49 	msgfmt-properties-1 \
     50 	msgfmt-qt-1 msgfmt-qt-2 \
     51 	msggrep-1 msggrep-2 msggrep-3 msggrep-4 msggrep-5 msggrep-6 msggrep-7 \
     52 	msggrep-8 \
     53 	msginit-1 msginit-2 \
     54 	msgmerge-1 msgmerge-2 msgmerge-3 msgmerge-4 msgmerge-5 msgmerge-6 \
     55 	msgmerge-7 msgmerge-8 msgmerge-9 msgmerge-10 msgmerge-11 msgmerge-12 \
     56 	msgmerge-13 msgmerge-14 msgmerge-15 msgmerge-16 msgmerge-17 \
     57 	msgmerge-18 msgmerge-19 \
     58 	msgmerge-compendium-1 msgmerge-compendium-2 msgmerge-compendium-3 \
     59 	msgmerge-compendium-4 msgmerge-compendium-5 msgmerge-compendium-6 \
     60 	msgmerge-properties-1 msgmerge-properties-2 \
     61 	msgmerge-update-1 msgmerge-update-2 msgmerge-update-3 \
     62 	msgunfmt-1 msgunfmt-2 \
     63 	msgunfmt-csharp-1 \
     64 	msgunfmt-java-1 \
     65 	msgunfmt-properties-1 \
     66 	msgunfmt-tcl-1 \
     67 	msguniq-1 msguniq-2 msguniq-3 msguniq-4 msguniq-5 msguniq-6 \
     68 	recode-sr-latin-1 recode-sr-latin-2 \
     69 	xgettext-1 xgettext-2 xgettext-3 xgettext-4 xgettext-5 xgettext-6 \
     70 	xgettext-7 xgettext-8 xgettext-9 \
     71 	xgettext-awk-1 \
     72 	xgettext-c-1 xgettext-c-2 xgettext-c-3 xgettext-c-4 xgettext-c-5 \
     73 	xgettext-c-6 xgettext-c-7 xgettext-c-8 xgettext-c-9 xgettext-c-10 \
     74 	xgettext-c-11 xgettext-c-12 xgettext-c-13 xgettext-c-14 xgettext-c-15 \
     75 	xgettext-csharp-1 xgettext-csharp-2 xgettext-csharp-3 \
     76 	xgettext-csharp-4 xgettext-csharp-5 \
     77 	xgettext-elisp-1 \
     78 	xgettext-glade-1 xgettext-glade-2 xgettext-glade-3 \
     79 	xgettext-java-1 xgettext-java-2 xgettext-java-3 xgettext-java-4 \
     80 	xgettext-java-5 \
     81 	xgettext-librep-1 \
     82 	xgettext-lisp-1 \
     83 	xgettext-objc-1 xgettext-objc-2 \
     84 	xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \
     85 	xgettext-perl-5 xgettext-perl-6 \
     86 	xgettext-php-1 xgettext-php-2 \
     87 	xgettext-po-1 \
     88 	xgettext-properties-1 \
     89 	xgettext-python-1 xgettext-python-2 xgettext-python-3 \
     90 	xgettext-scheme-1 xgettext-scheme-2 \
     91 	xgettext-sh-1 xgettext-sh-2 xgettext-sh-3 xgettext-sh-4 xgettext-sh-5 \
     92 	xgettext-smalltalk-1 \
     93 	xgettext-stringtable-1 \
     94 	xgettext-tcl-1 xgettext-tcl-2 \
     95 	xgettext-ycp-1 xgettext-ycp-2 xgettext-ycp-3 \
     96 	format-awk-1 format-awk-2 \
     97 	format-boost-1 format-boost-2 \
     98 	format-c-1 format-c-2 format-c-3 format-c-4 format-c-5 \
     99 	format-csharp-1 format-csharp-2 \
    100 	format-elisp-1 format-elisp-2 \
    101 	format-gcc-internal-1 format-gcc-internal-2 \
    102 	format-java-1 format-java-2 \
    103 	format-librep-1 format-librep-2 \
    104 	format-lisp-1 format-lisp-2 \
    105 	format-php-1 format-php-2 \
    106 	format-python-1 format-python-2 \
    107 	format-pascal-1 format-pascal-2 \
    108 	format-perl-1 format-perl-2 \
    109 	format-perl-brace-1 format-perl-brace-2 \
    110 	format-perl-mixed-1 format-perl-mixed-2 \
    111 	format-qt-1 format-qt-2 \
    112 	format-scheme-1 format-scheme-2 \
    113 	format-sh-1 format-sh-2 \
    114 	format-tcl-1 format-tcl-2 \
    115 	format-ycp-1 format-ycp-2 \
    116 	plural-1 plural-2 \
    117 	lang-c lang-c++ lang-objc lang-sh lang-bash lang-python-1 \
    118 	lang-python-2 lang-clisp lang-elisp lang-librep lang-guile \
    119 	lang-smalltalk lang-java lang-csharp lang-gawk lang-pascal \
    120 	lang-ycp lang-tcl lang-perl-1 lang-perl-2 lang-php lang-po lang-rst
    121 
    122 EXTRA_DIST += $(TESTS) \
    123 	test.mo xg-c-1.ok.po mex-test2.ok \
    124 	mm-ko.ascii.pot mm-ko.euc-kr.po mm-ko-comp.euc-kr.po \
    125 	mm-viet.comp.po mm-viet.pot mm-viet.out \
    126 	msguniq-a.in msguniq-a.inp msguniq-a.out \
    127 	qttest_pl.po qttest_pl.qm \
    128 	qttest2_de.po qttest2_de.qm qttest2_de.ts \
    129 	ChangeLog.0 \
    130 	gettext-3-1.po gettext-3-2.po gettext-4.po gettext-5.po \
    131 	gettext-6-1.po gettext-6-2.po gettext-7.po
    132 
    133 XGETTEXT = ../src/xgettext
    134 
    135 # For debugging memory leaks and memory allocation bugs.
    136 # You should build with --disable-shared when using valgrind.
    137 CHECKER =
    138 #CHECKER = valgrind --tool=memcheck --suppressions=$(srcdir)/../gnulib-lib/allocsa.valgrind --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes
    139 #CHECKER = valgrind --tool=massif --format=html --depth=10 --alloc-fn=xmalloc --alloc-fn=xrealloc --stacks=no
    140 
    141 TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \
    142 		    PATH=.:../src:../../gettext-runtime/src:$(top_srcdir)/../gettext-runtime/src:$$PATH \
    143 		    GETTEXT="$(CHECKER) tstgettext" \
    144 		    NGETTEXT="$(CHECKER) tstngettext" \
    145 		    XGETTEXT="$(CHECKER) xgettext" \
    146 		    MSGATTRIB="$(CHECKER) msgattrib" \
    147 		    MSGCAT="$(CHECKER) msgcat" \
    148 		    MSGCMP="$(CHECKER) msgcmp" \
    149 		    MSGCOMM="$(CHECKER) msgcomm" \
    150 		    MSGCONV="$(CHECKER) msgconv" \
    151 		    MSGEN="$(CHECKER) msgen" \
    152 		    MSGEXEC="$(CHECKER) msgexec" \
    153 		    MSGFILTER="$(CHECKER) msgfilter" \
    154 		    MSGFMT="$(CHECKER) msgfmt" \
    155 		    MSGGREP="$(CHECKER) msggrep" \
    156 		    MSGINIT="$(CHECKER) msginit" \
    157 		    MSGMERGE="$(CHECKER) msgmerge" \
    158 		    MSGUNFMT="$(CHECKER) msgunfmt" \
    159 		    MSGUNIQ="$(CHECKER) msguniq" \
    160 		    RECODE="$(CHECKER) recode" \
    161 		    OBJEXT='@OBJEXT@' EXEEXT='@EXEEXT@' \
    162 		    LIBTOOL='@LIBTOOL@' \
    163 		    CC='@CC@' CFLAGS='@CFLAGS@' \
    164 		    CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' \
    165 		    CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \
    166 		    LTLIBINTL='@LTLIBINTL@' \
    167 		    JAVA_CHOICE='@JAVA_CHOICE@' \
    168 		    BUILDJAVA='@BUILDJAVA@' \
    169 		    TESTJAVA='@TESTJAVA@' \
    170 		    CSHARP_CHOICE='@CSHARP_CHOICE@' \
    171 		    BUILDCSHARP='@BUILDCSHARP@' \
    172 		    TESTCSHARP='@TESTCSHARP@' \
    173 		    TESTLIBASPRINTF='@TESTLIBASPRINTF@' \
    174 		    LOCALE_FR='@LOCALE_FR@' \
    175 		    LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
    176 		    host_os='@host_os@' \
    177 		    CONFIG_SHELL='$(SHELL)' \
    178 		    $(SHELL)
    179 
    180 xg-c-1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
    181 	$(XGETTEXT) -d xg-c-1.ok -p $(srcdir) \
    182 	  -k_ --omit-header --no-location \
    183 	  $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c
    184 
    185 # Three auxiliary programs used by the tests.
    186 AM_CPPFLAGS = \
    187   -I.. \
    188   -I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
    189   -I../intl
    190 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
    191 # INTL_MACOSX_LIBS is needed because the programs depend on libintl.la
    192 # but libtool doesn't put -Wl,-framework options into .la files.
    193 LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@) @INTL_MACOSX_LIBS@
    194 LDADD_yes = ../intl/libintl.la @LTLIBTHREAD@
    195 LDADD_no = ../intl/libgnuintl.la @LTLIBTHREAD@ @LTLIBINTL@
    196 noinst_PROGRAMS = tstgettext tstngettext testlocale gettext-3-prg gettext-4-prg gettext-5-prg gettext-6-prg gettext-7-prg cake fc3 fc4 fc5
    197 tstgettext_SOURCES = tstgettext.c setlocale.c
    198 tstgettext_CFLAGS = -DINSTALLDIR=\".\"
    199 tstgettext_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    200 tstngettext_SOURCES = tstngettext.c setlocale.c
    201 tstngettext_CFLAGS = -DINSTALLDIR=\".\"
    202 tstngettext_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    203 testlocale_SOURCES = testlocale.c
    204 gettext_3_prg_SOURCES = gettext-3-prg.c
    205 gettext_3_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    206 gettext_4_prg_SOURCES = gettext-4-prg.c
    207 gettext_4_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    208 gettext_5_prg_SOURCES = gettext-5-prg.c
    209 gettext_5_prg_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    210 gettext_6_prg_SOURCES = gettext-6-prg.c
    211 gettext_6_prg_CFLAGS = $(gettext_6_prg_CFLAGS_@GLIBC2@)
    212 gettext_6_prg_CFLAGS_yes = -DUSE_POSIX_THREADS
    213 gettext_6_prg_LDADD = $(gettext_6_prg_LDADD_@GLIBC2@)
    214 gettext_6_prg_LDADD_yes = ../gnulib-lib/libgettextlib.la $(LDADD) -lpthread
    215 gettext_7_prg_SOURCES = gettext-7-prg.c
    216 gettext_7_prg_CFLAGS = $(gettext_7_prg_CFLAGS_@GLIBC2@)
    217 gettext_7_prg_CFLAGS_yes = -DUSE_POSIX_THREADS
    218 gettext_7_prg_LDADD = $(gettext_7_prg_LDADD_@GLIBC2@)
    219 gettext_7_prg_LDADD_yes = ../gnulib-lib/libgettextlib.la $(LDADD) -lpthread
    220 cake_SOURCES = plural-1-prg.c setlocale.c
    221 cake_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    222 fc3_SOURCES = format-c-3-prg.c setlocale.c
    223 fc3_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    224 fc4_SOURCES = format-c-4-prg.c setlocale.c
    225 fc4_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    226 fc5_SOURCES = format-c-5-prg.c
    227 fc5_LDADD = ../gnulib-lib/libgettextlib.la $(LDADD)
    228 
    229 # Clean up after Solaris cc.
    230 clean-local:
    231 	rm -rf SunWS_cache
    232