Update Gnulib to v0.0-6827-g39c3009; use the `dirfd' module.
[bpt/guile.git] / test-suite / standalone / Makefile.am
CommitLineData
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 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 = \
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.
41AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
42 -I$(top_srcdir)/lib -I$(top_builddir)/lib
43
eedcb08a 44test_cflags = \
a6648037 45 -I$(top_srcdir)/test-suite/standalone -I. \
bfb2e113 46 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
ae90bbb5 47
7108b7b8 48AM_LDFLAGS = $(GUILE_CFLAGS)
6405ae86 49
6a94e6e1
LC
50# How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
51LIBGUILE_LDADD = \
52 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
53 $(BDW_GC_LIBS)
54
55
a6648037
KR
56snarfcppopts = \
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
60SUFFIXES = .x
61.c.x:
a572fc95 62 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
6405ae86 63
8f9ae7fd 64CLEANFILES = *.x
6405ae86
RB
65
66.DELETE_ON_ERROR:
67
060ffedf
RB
68check_SCRIPTS += test-system-cmds
69TESTS += test-system-cmds
70
d69668b7
NJ
71check_SCRIPTS += test-bad-identifiers
72TESTS += test-bad-identifiers
73
87681707
RB
74check_SCRIPTS += test-require-extension
75TESTS += test-require-extension
76
2dea6a4d
BT
77check_SCRIPTS += test-guile-snarf
78TESTS += test-guile-snarf
79
ad4bd7c2
AW
80check_SCRIPTS += test-import-order
81TESTS += test-import-order
82EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \
83 test-import-order-c.scm test-import-order-d.scm
84
ed4c3739
LC
85check_SCRIPTS += test-command-line-encoding
86TESTS += test-command-line-encoding
87
6405ae86
RB
88# test-num2integral
89test_num2integral_SOURCES = test-num2integral.c
90test_num2integral_CFLAGS = ${test_cflags}
6a94e6e1 91test_num2integral_LDADD = $(LIBGUILE_LDADD)
6405ae86
RB
92check_PROGRAMS += test-num2integral
93TESTS += test-num2integral
94
be4381fa
KR
95# test-round
96test_round_CFLAGS = ${test_cflags}
6a94e6e1 97test_round_LDADD = $(LIBGUILE_LDADD)
be4381fa
KR
98check_PROGRAMS += test-round
99TESTS += test-round
100
2ddf0851
LC
101if HAVE_SHARED_LIBRARIES
102
6405ae86
RB
103# test-asmobs
104noinst_LTLIBRARIES += libtest-asmobs.la
a150c156 105libtest_asmobs_la_SOURCES = test-asmobs-lib.c
6405ae86 106libtest_asmobs_la_CFLAGS = ${test_cflags}
cb26e97a 107libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 108libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
8f9ae7fd 109BUILT_SOURCES += test-asmobs-lib.x
6405ae86
RB
110check_SCRIPTS += test-asmobs
111TESTS += test-asmobs
112
37371ea1
AW
113# test-ffi
114noinst_LTLIBRARIES += libtest-ffi.la
a150c156 115libtest_ffi_la_SOURCES = test-ffi-lib.c
37371ea1 116libtest_ffi_la_CFLAGS = ${test_cflags}
cb26e97a 117libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 118libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
37371ea1
AW
119check_SCRIPTS += test-ffi
120TESTS += test-ffi
121
2ddf0851
LC
122endif HAVE_SHARED_LIBRARIES
123
d7a88afe
KR
124# test-list
125test_list_SOURCES = test-list.c
126test_list_CFLAGS = ${test_cflags}
6a94e6e1 127test_list_LDADD = $(LIBGUILE_LDADD)
d7a88afe
KR
128check_PROGRAMS += test-list
129TESTS += test-list
130
3c8fb18e
MV
131# test-unwind
132test_unwind_SOURCES = test-unwind.c
133test_unwind_CFLAGS = ${test_cflags}
6a94e6e1 134test_unwind_LDADD = $(LIBGUILE_LDADD)
3c8fb18e
MV
135check_PROGRAMS += test-unwind
136TESTS += test-unwind
137
2aac7a48
MV
138# test-conversion
139test_conversion_SOURCES = test-conversion.c
140test_conversion_CFLAGS = ${test_cflags}
6a94e6e1 141test_conversion_LDADD = $(LIBGUILE_LDADD)
2aac7a48
MV
142check_PROGRAMS += test-conversion
143TESTS += test-conversion
144
440ae510
NJ
145# test-loose-ends
146test_loose_ends_SOURCES = test-loose-ends.c
147test_loose_ends_CFLAGS = ${test_cflags}
6a94e6e1 148test_loose_ends_LDADD = $(LIBGUILE_LDADD)
440ae510
NJ
149check_PROGRAMS += test-loose-ends
150TESTS += test-loose-ends
151
a9931e4e
NJ
152# test-fast-slot-ref
153check_SCRIPTS += test-fast-slot-ref
154TESTS += test-fast-slot-ref
155
f80ed1be
AW
156# test-mb-regexp
157check_SCRIPTS += test-mb-regexp
158TESTS += test-mb-regexp
159
23d72566 160# test-use-srfi
4505fbb1 161check_SCRIPTS += test-use-srfi
23d72566
KR
162TESTS += test-use-srfi
163
8e7ff773
LC
164# test-scm-c-read
165test_scm_c_read_SOURCES = test-scm-c-read.c
166test_scm_c_read_CFLAGS = ${test_cflags}
6a94e6e1 167test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
8e7ff773
LC
168check_PROGRAMS += test-scm-c-read
169TESTS += test-scm-c-read
170
05588a1a
LC
171# test-scm-take-locale-symbol
172test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
173test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
6a94e6e1 174test_scm_take_locale_symbol_LDADD = $(LIBGUILE_LDADD)
05588a1a
LC
175check_PROGRAMS += test-scm-take-locale-symbol
176TESTS += test-scm-take-locale-symbol
177
f538a070
LC
178# test-scm-take-u8vector
179test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
180test_scm_take_u8vector_CFLAGS = ${test_cflags}
6a94e6e1 181test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
f538a070
LC
182check_PROGRAMS += test-scm-take-u8vector
183TESTS += test-scm-take-u8vector
184
fe133640
AW
185# test-scm-take-u8vector
186test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c
187test_scm_to_latin1_string_CFLAGS = ${test_cflags}
188test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD)
189check_PROGRAMS += test-scm-to-latin1-string
190TESTS += test-scm-to-latin1-string
191
2ddf0851
LC
192if HAVE_SHARED_LIBRARIES
193
a44c4336
AW
194# test-extensions
195noinst_LTLIBRARIES += libtest-extensions.la
196libtest_extensions_la_SOURCES = test-extensions-lib.c
197libtest_extensions_la_CFLAGS = ${test_cflags}
cb26e97a 198libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
6a94e6e1 199libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
a44c4336
AW
200check_SCRIPTS += test-extensions
201TESTS += test-extensions
202
2ddf0851
LC
203endif HAVE_SHARED_LIBRARIES
204
56ae2148
LC
205if BUILD_PTHREAD_SUPPORT
206
3ac8359a
NJ
207# test-with-guile-module
208test_with_guile_module_CFLAGS = ${test_cflags}
6a94e6e1 209test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
3ac8359a
NJ
210check_PROGRAMS += test-with-guile-module
211TESTS += test-with-guile-module
212
ccf1ca4a 213test_scm_with_guile_CFLAGS = ${test_cflags}
6a94e6e1 214test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
ccf1ca4a
LC
215check_PROGRAMS += test-scm-with-guile
216TESTS += test-scm-with-guile
217
4a235623
LC
218test_scm_spawn_thread_CFLAGS = ${test_cflags}
219test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD)
220check_PROGRAMS += test-scm-spawn-thread
221TESTS += test-scm-spawn-thread
222
223test_pthread_create_CFLAGS = ${test_cflags}
224test_pthread_create_LDADD = $(LIBGUILE_LDADD)
225check_PROGRAMS += test-pthread-create
226TESTS += test-pthread-create
227
228test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
229test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD)
230check_PROGRAMS += test-pthread-create-secondary
231TESTS += test-pthread-create-secondary
232
56ae2148
LC
233else
234
ccf1ca4a 235EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
56ae2148
LC
236
237endif
238
56ae2148 239EXTRA_DIST += ${check_SCRIPTS}