68c83607bca62a72b7ed6ee03fb4155970384dde
[bpt/guile.git] / test-suite / standalone / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2 ##
3 ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Software Foundation, Inc.
4 ##
5 ## This file is part of GUILE.
6 ##
7 ## GUILE is free software; you can redistribute it and/or modify it
8 ## under the terms of the GNU Lesser General Public License as
9 ## published by the Free Software Foundation; either version 3, or
10 ## (at your option) any later version.
11 ##
12 ## GUILE is distributed in the hope that it will be useful, but
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU Lesser General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU Lesser General Public
18 ## License along with GUILE; see the file COPYING.LESSER. If not,
19 ## write to the Free Software Foundation, Inc., 51 Franklin Street,
20 ## Fifth Floor, Boston, MA 02110-1301 USA
21
22 include $(top_srcdir)/am/snarf
23
24 # initializations so we can use += below.
25 TESTS =
26 noinst_LTLIBRARIES =
27 check_PROGRAMS =
28 check_SCRIPTS =
29 BUILT_SOURCES =
30 EXTRA_DIST =
31
32 TESTS_ENVIRONMENT = \
33 builddir="$(builddir)" \
34 GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
35
36 ## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
37 ## may point us to an old, installed version of guile.
38 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
39 -I$(top_srcdir)/lib -I$(top_builddir)/lib
40
41 test_cflags = \
42 -I$(top_srcdir)/test-suite/standalone -I. \
43 $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
44
45 AM_LDFLAGS = $(GUILE_CFLAGS)
46
47 snarfcppopts = \
48 -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
49 -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
50
51 SUFFIXES = .x
52 .c.x:
53 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
54
55 CLEANFILES = *.x
56
57 .DELETE_ON_ERROR:
58
59 check_SCRIPTS += test-system-cmds
60 TESTS += test-system-cmds
61
62 check_SCRIPTS += test-bad-identifiers
63 TESTS += test-bad-identifiers
64
65 check_SCRIPTS += test-require-extension
66 TESTS += test-require-extension
67
68 # test-num2integral
69 test_num2integral_SOURCES = test-num2integral.c
70 test_num2integral_CFLAGS = ${test_cflags}
71 test_num2integral_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
72 check_PROGRAMS += test-num2integral
73 TESTS += test-num2integral
74
75 # test-round
76 test_round_CFLAGS = ${test_cflags}
77 test_round_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
78 check_PROGRAMS += test-round
79 TESTS += test-round
80
81 # test-asmobs
82 noinst_LTLIBRARIES += libtest-asmobs.la
83 libtest_asmobs_la_SOURCES = test-asmobs-lib.c
84 libtest_asmobs_la_CFLAGS = ${test_cflags}
85 libtest_asmobs_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will really build an .so
86 libtest_asmobs_la_LIBADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
87 BUILT_SOURCES += test-asmobs-lib.x
88 check_SCRIPTS += test-asmobs
89 TESTS += test-asmobs
90
91 # test-ffi
92 noinst_LTLIBRARIES += libtest-ffi.la
93 libtest_ffi_la_SOURCES = test-ffi-lib.c
94 libtest_ffi_la_CFLAGS = ${test_cflags}
95 libtest_ffi_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will really build an .so
96 libtest_ffi_la_LIBADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
97 check_SCRIPTS += test-ffi
98 TESTS += test-ffi
99
100 # test-list
101 test_list_SOURCES = test-list.c
102 test_list_CFLAGS = ${test_cflags}
103 test_list_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
104 check_PROGRAMS += test-list
105 TESTS += test-list
106
107 # test-unwind
108 test_unwind_SOURCES = test-unwind.c
109 test_unwind_CFLAGS = ${test_cflags}
110 test_unwind_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
111 check_PROGRAMS += test-unwind
112 TESTS += test-unwind
113
114 # test-conversion
115 test_conversion_SOURCES = test-conversion.c
116 test_conversion_CFLAGS = ${test_cflags}
117 test_conversion_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
118 check_PROGRAMS += test-conversion
119 TESTS += test-conversion
120
121 # test-loose-ends
122 test_loose_ends_SOURCES = test-loose-ends.c
123 test_loose_ends_CFLAGS = ${test_cflags}
124 test_loose_ends_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
125 check_PROGRAMS += test-loose-ends
126 TESTS += test-loose-ends
127
128 # test-fast-slot-ref
129 check_SCRIPTS += test-fast-slot-ref
130 TESTS += test-fast-slot-ref
131
132 # test-use-srfi
133 check_SCRIPTS += test-use-srfi
134 TESTS += test-use-srfi
135
136 # test-scm-c-read
137 test_scm_c_read_SOURCES = test-scm-c-read.c
138 test_scm_c_read_CFLAGS = ${test_cflags}
139 test_scm_c_read_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
140 check_PROGRAMS += test-scm-c-read
141 TESTS += test-scm-c-read
142
143 # test-scm-take-locale-symbol
144 test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
145 test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
146 test_scm_take_locale_symbol_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
147 check_PROGRAMS += test-scm-take-locale-symbol
148 TESTS += test-scm-take-locale-symbol
149
150 # test-scm-take-u8vector
151 test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
152 test_scm_take_u8vector_CFLAGS = ${test_cflags}
153 test_scm_take_u8vector_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
154 check_PROGRAMS += test-scm-take-u8vector
155 TESTS += test-scm-take-u8vector
156
157 # test-extensions
158 noinst_LTLIBRARIES += libtest-extensions.la
159 libtest_extensions_la_SOURCES = test-extensions-lib.c
160 libtest_extensions_la_CFLAGS = ${test_cflags}
161 libtest_extensions_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will really build an .so
162 libtest_extensions_la_LIBADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
163 check_SCRIPTS += test-extensions
164 TESTS += test-extensions
165
166 # test-srfi-1
167 test_srfi_1_SOURCES = test-srfi-1.c
168 test_srfi_1_CFLAGS = ${test_cflags}
169 test_srfi_1_LDADD = \
170 ${top_builddir}/srfi/libguile-srfi-srfi-1-v-@LIBGUILE_SRFI_SRFI_1_MAJOR@.la \
171 ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
172 check_PROGRAMS += test-srfi-1
173 TESTS += test-srfi-1
174
175 if BUILD_PTHREAD_SUPPORT
176
177 # test-with-guile-module
178 test_with_guile_module_CFLAGS = ${test_cflags}
179 test_with_guile_module_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
180 check_PROGRAMS += test-with-guile-module
181 TESTS += test-with-guile-module
182
183 test_scm_with_guile_CFLAGS = ${test_cflags}
184 test_scm_with_guile_LDADD = ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la
185 check_PROGRAMS += test-scm-with-guile
186 TESTS += test-scm-with-guile
187
188 else
189
190 EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
191
192 endif
193
194 EXTRA_DIST += ${check_SCRIPTS}