Commit | Line | Data |
---|---|---|
d7a88afe KR |
1 | ## Process this file with automake to produce Makefile.in. |
2 | ## | |
2ddf0851 LC |
3 | ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
4 | ## 2011 Free Software Foundation, Inc. | |
d7a88afe KR |
5 | ## |
6 | ## This file is part of GUILE. | |
7 | ## | |
53befeb7 NJ |
8 | ## GUILE is free software; you can redistribute it and/or modify it |
9 | ## under the terms of the GNU Lesser General Public License as | |
10 | ## published by the Free Software Foundation; either version 3, or | |
11 | ## (at your option) any later version. | |
d7a88afe | 12 | ## |
53befeb7 NJ |
13 | ## GUILE is distributed in the hope that it will be useful, but |
14 | ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ## GNU Lesser General Public License for more details. | |
d7a88afe | 17 | ## |
53befeb7 NJ |
18 | ## You should have received a copy of the GNU Lesser General Public |
19 | ## License along with GUILE; see the file COPYING.LESSER. If not, | |
20 | ## write to the Free Software Foundation, Inc., 51 Franklin Street, | |
21 | ## Fifth Floor, Boston, MA 02110-1301 USA | |
d7a88afe | 22 | |
a572fc95 | 23 | include $(top_srcdir)/am/snarf |
6405ae86 RB |
24 | |
25 | # initializations so we can use += below. | |
26 | TESTS = | |
27 | noinst_LTLIBRARIES = | |
28 | check_PROGRAMS = | |
29 | check_SCRIPTS = | |
30 | BUILT_SOURCES = | |
56ae2148 | 31 | EXTRA_DIST = |
6405ae86 | 32 | |
e4ca305f | 33 | TESTS_ENVIRONMENT = \ |
7ad0737d | 34 | srcdir="$(srcdir)" \ |
5b98517a | 35 | builddir="$(builddir)" \ |
c2c2b5a4 | 36 | @LOCALCHARSET_TESTS_ENVIRONMENT@ \ |
e4ca305f | 37 | GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env" |
6405ae86 | 38 | |
a6648037 KR |
39 | ## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which |
40 | ## may point us to an old, installed version of guile. | |
41 | AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \ | |
42 | -I$(top_srcdir)/lib -I$(top_builddir)/lib | |
43 | ||
eedcb08a | 44 | test_cflags = \ |
a6648037 | 45 | -I$(top_srcdir)/test-suite/standalone -I. \ |
bfb2e113 | 46 | $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS) |
ae90bbb5 | 47 | |
7108b7b8 | 48 | AM_LDFLAGS = $(GUILE_CFLAGS) |
6405ae86 | 49 | |
6a94e6e1 LC |
50 | # How to link with libguile (same as `Libs' in `guile-2.0.pc'.) |
51 | LIBGUILE_LDADD = \ | |
52 | ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \ | |
53 | $(BDW_GC_LIBS) | |
54 | ||
55 | ||
a6648037 KR |
56 | snarfcppopts = \ |
57 | -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \ | |
58 | -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) | |
eedcb08a | 59 | |
23d72566 KR |
60 | SUFFIXES = .x |
61 | .c.x: | |
a572fc95 | 62 | $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts) |
6405ae86 | 63 | |
8f9ae7fd | 64 | CLEANFILES = *.x |
6405ae86 RB |
65 | |
66 | .DELETE_ON_ERROR: | |
67 | ||
060ffedf RB |
68 | check_SCRIPTS += test-system-cmds |
69 | TESTS += test-system-cmds | |
70 | ||
d69668b7 NJ |
71 | check_SCRIPTS += test-bad-identifiers |
72 | TESTS += test-bad-identifiers | |
73 | ||
87681707 RB |
74 | check_SCRIPTS += test-require-extension |
75 | TESTS += test-require-extension | |
76 | ||
2dea6a4d BT |
77 | check_SCRIPTS += test-guile-snarf |
78 | TESTS += test-guile-snarf | |
79 | ||
ad4bd7c2 AW |
80 | check_SCRIPTS += test-import-order |
81 | TESTS += test-import-order | |
82 | EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \ | |
83 | test-import-order-c.scm test-import-order-d.scm | |
84 | ||
6405ae86 RB |
85 | # test-num2integral |
86 | test_num2integral_SOURCES = test-num2integral.c | |
87 | test_num2integral_CFLAGS = ${test_cflags} | |
6a94e6e1 | 88 | test_num2integral_LDADD = $(LIBGUILE_LDADD) |
6405ae86 RB |
89 | check_PROGRAMS += test-num2integral |
90 | TESTS += test-num2integral | |
91 | ||
be4381fa KR |
92 | # test-round |
93 | test_round_CFLAGS = ${test_cflags} | |
6a94e6e1 | 94 | test_round_LDADD = $(LIBGUILE_LDADD) |
be4381fa KR |
95 | check_PROGRAMS += test-round |
96 | TESTS += test-round | |
97 | ||
2ddf0851 LC |
98 | if HAVE_SHARED_LIBRARIES |
99 | ||
6405ae86 RB |
100 | # test-asmobs |
101 | noinst_LTLIBRARIES += libtest-asmobs.la | |
a150c156 | 102 | libtest_asmobs_la_SOURCES = test-asmobs-lib.c |
6405ae86 | 103 | libtest_asmobs_la_CFLAGS = ${test_cflags} |
cb26e97a | 104 | libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so |
6a94e6e1 | 105 | libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD) |
8f9ae7fd | 106 | BUILT_SOURCES += test-asmobs-lib.x |
6405ae86 RB |
107 | check_SCRIPTS += test-asmobs |
108 | TESTS += test-asmobs | |
109 | ||
37371ea1 AW |
110 | # test-ffi |
111 | noinst_LTLIBRARIES += libtest-ffi.la | |
a150c156 | 112 | libtest_ffi_la_SOURCES = test-ffi-lib.c |
37371ea1 | 113 | libtest_ffi_la_CFLAGS = ${test_cflags} |
cb26e97a | 114 | libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so |
6a94e6e1 | 115 | libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD) |
37371ea1 AW |
116 | check_SCRIPTS += test-ffi |
117 | TESTS += test-ffi | |
118 | ||
2ddf0851 LC |
119 | endif HAVE_SHARED_LIBRARIES |
120 | ||
d7a88afe KR |
121 | # test-list |
122 | test_list_SOURCES = test-list.c | |
123 | test_list_CFLAGS = ${test_cflags} | |
6a94e6e1 | 124 | test_list_LDADD = $(LIBGUILE_LDADD) |
d7a88afe KR |
125 | check_PROGRAMS += test-list |
126 | TESTS += test-list | |
127 | ||
3c8fb18e MV |
128 | # test-unwind |
129 | test_unwind_SOURCES = test-unwind.c | |
130 | test_unwind_CFLAGS = ${test_cflags} | |
6a94e6e1 | 131 | test_unwind_LDADD = $(LIBGUILE_LDADD) |
3c8fb18e MV |
132 | check_PROGRAMS += test-unwind |
133 | TESTS += test-unwind | |
134 | ||
2aac7a48 MV |
135 | # test-conversion |
136 | test_conversion_SOURCES = test-conversion.c | |
137 | test_conversion_CFLAGS = ${test_cflags} | |
6a94e6e1 | 138 | test_conversion_LDADD = $(LIBGUILE_LDADD) |
2aac7a48 MV |
139 | check_PROGRAMS += test-conversion |
140 | TESTS += test-conversion | |
141 | ||
440ae510 NJ |
142 | # test-loose-ends |
143 | test_loose_ends_SOURCES = test-loose-ends.c | |
144 | test_loose_ends_CFLAGS = ${test_cflags} | |
6a94e6e1 | 145 | test_loose_ends_LDADD = $(LIBGUILE_LDADD) |
440ae510 NJ |
146 | check_PROGRAMS += test-loose-ends |
147 | TESTS += test-loose-ends | |
148 | ||
a9931e4e NJ |
149 | # test-fast-slot-ref |
150 | check_SCRIPTS += test-fast-slot-ref | |
151 | TESTS += test-fast-slot-ref | |
152 | ||
f80ed1be AW |
153 | # test-mb-regexp |
154 | check_SCRIPTS += test-mb-regexp | |
155 | TESTS += test-mb-regexp | |
156 | ||
23d72566 | 157 | # test-use-srfi |
4505fbb1 | 158 | check_SCRIPTS += test-use-srfi |
23d72566 KR |
159 | TESTS += test-use-srfi |
160 | ||
8e7ff773 LC |
161 | # test-scm-c-read |
162 | test_scm_c_read_SOURCES = test-scm-c-read.c | |
163 | test_scm_c_read_CFLAGS = ${test_cflags} | |
6a94e6e1 | 164 | test_scm_c_read_LDADD = $(LIBGUILE_LDADD) |
8e7ff773 LC |
165 | check_PROGRAMS += test-scm-c-read |
166 | TESTS += test-scm-c-read | |
167 | ||
05588a1a LC |
168 | # test-scm-take-locale-symbol |
169 | test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c | |
170 | test_scm_take_locale_symbol_CFLAGS = ${test_cflags} | |
6a94e6e1 | 171 | test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD) |
05588a1a LC |
172 | check_PROGRAMS += test-scm-take-locale-symbol |
173 | TESTS += test-scm-take-locale-symbol | |
174 | ||
f538a070 LC |
175 | # test-scm-take-u8vector |
176 | test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c | |
177 | test_scm_take_u8vector_CFLAGS = ${test_cflags} | |
6a94e6e1 | 178 | test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD) |
f538a070 LC |
179 | check_PROGRAMS += test-scm-take-u8vector |
180 | TESTS += test-scm-take-u8vector | |
181 | ||
fe133640 AW |
182 | # test-scm-take-u8vector |
183 | test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c | |
184 | test_scm_to_latin1_string_CFLAGS = ${test_cflags} | |
185 | test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD) | |
186 | check_PROGRAMS += test-scm-to-latin1-string | |
187 | TESTS += test-scm-to-latin1-string | |
188 | ||
2ddf0851 LC |
189 | if HAVE_SHARED_LIBRARIES |
190 | ||
a44c4336 AW |
191 | # test-extensions |
192 | noinst_LTLIBRARIES += libtest-extensions.la | |
193 | libtest_extensions_la_SOURCES = test-extensions-lib.c | |
194 | libtest_extensions_la_CFLAGS = ${test_cflags} | |
cb26e97a | 195 | libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so |
6a94e6e1 | 196 | libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD) |
a44c4336 AW |
197 | check_SCRIPTS += test-extensions |
198 | TESTS += test-extensions | |
199 | ||
2ddf0851 LC |
200 | endif HAVE_SHARED_LIBRARIES |
201 | ||
56ae2148 LC |
202 | if BUILD_PTHREAD_SUPPORT |
203 | ||
3ac8359a NJ |
204 | # test-with-guile-module |
205 | test_with_guile_module_CFLAGS = ${test_cflags} | |
6a94e6e1 | 206 | test_with_guile_module_LDADD = $(LIBGUILE_LDADD) |
3ac8359a NJ |
207 | check_PROGRAMS += test-with-guile-module |
208 | TESTS += test-with-guile-module | |
209 | ||
ccf1ca4a | 210 | test_scm_with_guile_CFLAGS = ${test_cflags} |
6a94e6e1 | 211 | test_scm_with_guile_LDADD = $(LIBGUILE_LDADD) |
ccf1ca4a LC |
212 | check_PROGRAMS += test-scm-with-guile |
213 | TESTS += test-scm-with-guile | |
214 | ||
4a235623 LC |
215 | test_scm_spawn_thread_CFLAGS = ${test_cflags} |
216 | test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD) | |
217 | check_PROGRAMS += test-scm-spawn-thread | |
218 | TESTS += test-scm-spawn-thread | |
219 | ||
220 | test_pthread_create_CFLAGS = ${test_cflags} | |
221 | test_pthread_create_LDADD = $(LIBGUILE_LDADD) | |
222 | check_PROGRAMS += test-pthread-create | |
223 | TESTS += test-pthread-create | |
224 | ||
225 | test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS) | |
226 | test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD) | |
227 | check_PROGRAMS += test-pthread-create-secondary | |
228 | TESTS += test-pthread-create-secondary | |
229 | ||
56ae2148 LC |
230 | else |
231 | ||
ccf1ca4a | 232 | EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c |
56ae2148 LC |
233 | |
234 | endif | |
235 | ||
56ae2148 | 236 | EXTRA_DIST += ${check_SCRIPTS} |