Merge commit 'fb7dd00169304a5922838e4d2f25253640a35def'
[bpt/guile.git] / test-suite / standalone / Makefile.am
CommitLineData
d7a88afe
KR
1## Process this file with automake to produce Makefile.in.
2##
2ddf0851 3## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
13ff681c 4## 2011, 2012, 2013 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 23include $(top_srcdir)/am/snarf
6405ae86
RB
24
25# initializations so we can use += below.
26TESTS =
27noinst_LTLIBRARIES =
28check_PROGRAMS =
29check_SCRIPTS =
30BUILT_SOURCES =
56ae2148 31EXTRA_DIST =
6405ae86 32
e4ca305f 33TESTS_ENVIRONMENT = \
13ff681c 34 top_srcdir="$(top_srcdir)" \
7ad0737d 35 srcdir="$(srcdir)" \
5b98517a 36 builddir="$(builddir)" \
c2c2b5a4 37 @LOCALCHARSET_TESTS_ENVIRONMENT@ \
e4ca305f 38 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
6405ae86 39
83dce818 40## Check for headers in $(srcdir) and build dir before $(CPPFLAGS), which
a6648037
KR
41## may point us to an old, installed version of guile.
42AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
43 -I$(top_srcdir)/lib -I$(top_builddir)/lib
44
eedcb08a 45test_cflags = \
a6648037 46 -I$(top_srcdir)/test-suite/standalone -I. \
bfb2e113 47 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
ae90bbb5 48
7108b7b8 49AM_LDFLAGS = $(GUILE_CFLAGS)
6405ae86 50
6a94e6e1
LC
51# How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
52LIBGUILE_LDADD = \
53 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
54 $(BDW_GC_LIBS)
55
56
a6648037
KR
57snarfcppopts = \
58 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
59 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
eedcb08a 60
23d72566
KR
61SUFFIXES = .x
62.c.x:
a572fc95 63 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
6405ae86 64
8f9ae7fd 65CLEANFILES = *.x
6405ae86
RB
66
67.DELETE_ON_ERROR:
68
060ffedf
RB
69check_SCRIPTS += test-system-cmds
70TESTS += test-system-cmds
71
d69668b7
NJ
72check_SCRIPTS += test-bad-identifiers
73TESTS += test-bad-identifiers
74
87681707
RB
75check_SCRIPTS += test-require-extension
76TESTS += test-require-extension
77
2dea6a4d
BT
78check_SCRIPTS += test-guile-snarf
79TESTS += test-guile-snarf
80
ad4bd7c2
AW
81check_SCRIPTS += test-import-order
82TESTS += test-import-order
83EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \
84 test-import-order-c.scm test-import-order-d.scm
85
ed4c3739
LC
86check_SCRIPTS += test-command-line-encoding
87TESTS += test-command-line-encoding
88
5de00531
LC
89check_SCRIPTS += test-command-line-encoding2
90TESTS += test-command-line-encoding2
91
13ff681c
LC
92check_SCRIPTS += test-language
93TESTS += test-language
94EXTRA_DIST += test-language.el test-language.js
95
6405ae86
RB
96# test-num2integral
97test_num2integral_SOURCES = test-num2integral.c
98test_num2integral_CFLAGS = ${test_cflags}
6a94e6e1 99test_num2integral_LDADD = $(LIBGUILE_LDADD)
6405ae86
RB
100check_PROGRAMS += test-num2integral
101TESTS += test-num2integral
102
be4381fa
KR
103# test-round
104test_round_CFLAGS = ${test_cflags}
6a94e6e1 105test_round_LDADD = $(LIBGUILE_LDADD)
be4381fa
KR
106check_PROGRAMS += test-round
107TESTS += test-round
108
2ddf0851
LC
109if HAVE_SHARED_LIBRARIES
110
6405ae86
RB
111# test-asmobs
112noinst_LTLIBRARIES += libtest-asmobs.la
a150c156 113libtest_asmobs_la_SOURCES = test-asmobs-lib.c
6405ae86 114libtest_asmobs_la_CFLAGS = ${test_cflags}
cb26e97a 115libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 116libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
8f9ae7fd 117BUILT_SOURCES += test-asmobs-lib.x
6405ae86
RB
118check_SCRIPTS += test-asmobs
119TESTS += test-asmobs
120
37371ea1
AW
121# test-ffi
122noinst_LTLIBRARIES += libtest-ffi.la
a150c156 123libtest_ffi_la_SOURCES = test-ffi-lib.c
37371ea1 124libtest_ffi_la_CFLAGS = ${test_cflags}
cb26e97a 125libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 126libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
37371ea1
AW
127check_SCRIPTS += test-ffi
128TESTS += test-ffi
129
2ddf0851
LC
130endif HAVE_SHARED_LIBRARIES
131
d7a88afe
KR
132# test-list
133test_list_SOURCES = test-list.c
134test_list_CFLAGS = ${test_cflags}
6a94e6e1 135test_list_LDADD = $(LIBGUILE_LDADD)
d7a88afe
KR
136check_PROGRAMS += test-list
137TESTS += test-list
138
3c8fb18e
MV
139# test-unwind
140test_unwind_SOURCES = test-unwind.c
141test_unwind_CFLAGS = ${test_cflags}
6a94e6e1 142test_unwind_LDADD = $(LIBGUILE_LDADD)
3c8fb18e
MV
143check_PROGRAMS += test-unwind
144TESTS += test-unwind
145
2aac7a48
MV
146# test-conversion
147test_conversion_SOURCES = test-conversion.c
148test_conversion_CFLAGS = ${test_cflags}
6a94e6e1 149test_conversion_LDADD = $(LIBGUILE_LDADD)
2aac7a48
MV
150check_PROGRAMS += test-conversion
151TESTS += test-conversion
152
440ae510
NJ
153# test-loose-ends
154test_loose_ends_SOURCES = test-loose-ends.c
155test_loose_ends_CFLAGS = ${test_cflags}
6a94e6e1 156test_loose_ends_LDADD = $(LIBGUILE_LDADD)
440ae510
NJ
157check_PROGRAMS += test-loose-ends
158TESTS += test-loose-ends
159
a9931e4e
NJ
160# test-fast-slot-ref
161check_SCRIPTS += test-fast-slot-ref
162TESTS += test-fast-slot-ref
163
f80ed1be
AW
164# test-mb-regexp
165check_SCRIPTS += test-mb-regexp
166TESTS += test-mb-regexp
167
23d72566 168# test-use-srfi
4505fbb1 169check_SCRIPTS += test-use-srfi
23d72566
KR
170TESTS += test-use-srfi
171
8e7ff773
LC
172# test-scm-c-read
173test_scm_c_read_SOURCES = test-scm-c-read.c
174test_scm_c_read_CFLAGS = ${test_cflags}
6a94e6e1 175test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
8e7ff773
LC
176check_PROGRAMS += test-scm-c-read
177TESTS += test-scm-c-read
178
05588a1a
LC
179# test-scm-take-locale-symbol
180test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
181test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
6a94e6e1 182test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
05588a1a
LC
183check_PROGRAMS += test-scm-take-locale-symbol
184TESTS += test-scm-take-locale-symbol
185
f538a070
LC
186# test-scm-take-u8vector
187test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
188test_scm_take_u8vector_CFLAGS = ${test_cflags}
6a94e6e1 189test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
f538a070
LC
190check_PROGRAMS += test-scm-take-u8vector
191TESTS += test-scm-take-u8vector
192
fe133640
AW
193# test-scm-take-u8vector
194test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c
195test_scm_to_latin1_string_CFLAGS = ${test_cflags}
196test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD)
197check_PROGRAMS += test-scm-to-latin1-string
198TESTS += test-scm-to-latin1-string
199
1ceeca0a
MW
200# test-scm-values
201test_scm_values_SOURCES = test-scm-values.c
202test_scm_values_CFLAGS = ${test_cflags}
203test_scm_values_LDADD = $(LIBGUILE_LDADD)
204check_PROGRAMS += test-scm-values
205TESTS += test-scm-values
206
a16d4e82
MW
207# test-scm-c-bind-keyword-arguments
208test_scm_c_bind_keyword_arguments_SOURCES = test-scm-c-bind-keyword-arguments.c
209test_scm_c_bind_keyword_arguments_CFLAGS = ${test_cflags}
210test_scm_c_bind_keyword_arguments_LDADD = $(LIBGUILE_LDADD)
211check_PROGRAMS += test-scm-c-bind-keyword-arguments
212TESTS += test-scm-c-bind-keyword-arguments
213
2ddf0851
LC
214if HAVE_SHARED_LIBRARIES
215
a44c4336
AW
216# test-extensions
217noinst_LTLIBRARIES += libtest-extensions.la
218libtest_extensions_la_SOURCES = test-extensions-lib.c
219libtest_extensions_la_CFLAGS = ${test_cflags}
cb26e97a 220libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 221libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
a44c4336
AW
222check_SCRIPTS += test-extensions
223TESTS += test-extensions
224
2ddf0851
LC
225endif HAVE_SHARED_LIBRARIES
226
56ae2148
LC
227if BUILD_PTHREAD_SUPPORT
228
3ac8359a
NJ
229# test-with-guile-module
230test_with_guile_module_CFLAGS = ${test_cflags}
6a94e6e1 231test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
3ac8359a
NJ
232check_PROGRAMS += test-with-guile-module
233TESTS += test-with-guile-module
234
ccf1ca4a 235test_scm_with_guile_CFLAGS = ${test_cflags}
6a94e6e1 236test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
ccf1ca4a
LC
237check_PROGRAMS += test-scm-with-guile
238TESTS += test-scm-with-guile
239
4a235623
LC
240test_scm_spawn_thread_CFLAGS = ${test_cflags}
241test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD)
242check_PROGRAMS += test-scm-spawn-thread
243TESTS += test-scm-spawn-thread
244
245test_pthread_create_CFLAGS = ${test_cflags}
246test_pthread_create_LDADD = $(LIBGUILE_LDADD)
247check_PROGRAMS += test-pthread-create
248TESTS += test-pthread-create
249
250test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
251test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD)
252check_PROGRAMS += test-pthread-create-secondary
253TESTS += test-pthread-create-secondary
254
56ae2148
LC
255else
256
ccf1ca4a 257EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
56ae2148
LC
258
259endif
260
d2df3950
MG
261test_smob_mark_SOURCES = test-smob-mark.c
262test_smob_mark_CFLAGS = ${test_cflags}
263test_smob_mark_LDADD = $(LIBGUILE_LDADD)
264check_PROGRAMS += test-smob-mark
265TESTS += test-smob-mark
266
56ae2148 267EXTRA_DIST += ${check_SCRIPTS}