Makefile.am 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. ## Process this file with automake to produce Makefile.in.
  2. ##
  3. ## Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
  4. ## 2011, 2012, 2013, 2014, 2020, 2021, 2022 Free Software Foundation, Inc.
  5. ##
  6. ## This file is part of GUILE.
  7. ##
  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.
  12. ##
  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.
  17. ##
  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
  22. include $(top_srcdir)/am/snarf
  23. # initializations so we can use += below.
  24. TESTS =
  25. noinst_LTLIBRARIES =
  26. check_PROGRAMS =
  27. check_SCRIPTS =
  28. BUILT_SOURCES =
  29. EXTRA_DIST =
  30. TESTS_ENVIRONMENT = \
  31. top_srcdir="$(top_srcdir)" \
  32. srcdir="$(srcdir)" \
  33. builddir="$(builddir)" \
  34. @LOCALCHARSET_TESTS_ENVIRONMENT@ \
  35. GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/build-env"
  36. ## Check for headers in $(srcdir) and build 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. test_cflags = \
  41. -I$(top_srcdir)/test-suite/standalone -I. \
  42. $(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
  43. AM_LDFLAGS = $(GUILE_CFLAGS)
  44. # How to link with libguile (same as `Libs' in `guile-2.0.pc'.)
  45. LIBGUILE_LDADD = \
  46. ${top_builddir}/libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la \
  47. $(BDW_GC_LIBS)
  48. snarfcppopts = \
  49. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
  50. -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
  51. SUFFIXES = .x
  52. .c.x:
  53. $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
  54. CLEANFILES = *.x
  55. .DELETE_ON_ERROR:
  56. check_SCRIPTS += test-system-cmds
  57. TESTS += test-system-cmds
  58. check_SCRIPTS += test-bad-identifiers
  59. TESTS += test-bad-identifiers
  60. check_SCRIPTS += test-require-extension
  61. TESTS += test-require-extension
  62. check_SCRIPTS += test-guile-snarf
  63. TESTS += test-guile-snarf
  64. check_SCRIPTS += test-import-order
  65. TESTS += test-import-order
  66. EXTRA_DIST += test-import-order-a.scm test-import-order-b.scm \
  67. test-import-order-c.scm test-import-order-d.scm
  68. check_SCRIPTS += test-command-line-encoding
  69. TESTS += test-command-line-encoding
  70. check_SCRIPTS += test-command-line-encoding2
  71. TESTS += test-command-line-encoding2
  72. check_SCRIPTS += test-language
  73. TESTS += test-language
  74. EXTRA_DIST += test-language.el test-language.js
  75. check_SCRIPTS += test-guild-compile
  76. TESTS += test-guild-compile
  77. check_SCRIPTS += test-signal-fork
  78. TESTS += test-signal-fork
  79. # test-num2integral
  80. test_num2integral_SOURCES = test-num2integral.c
  81. test_num2integral_CFLAGS = ${test_cflags}
  82. test_num2integral_LDADD = $(LIBGUILE_LDADD)
  83. check_PROGRAMS += test-num2integral
  84. TESTS += test-num2integral
  85. # test-round
  86. test_round_CFLAGS = ${test_cflags}
  87. test_round_LDADD = $(LIBGUILE_LDADD)
  88. check_PROGRAMS += test-round
  89. TESTS += test-round
  90. if HAVE_SHARED_LIBRARIES
  91. # test-asmobs
  92. noinst_LTLIBRARIES += libtest-asmobs.la
  93. libtest_asmobs_la_SOURCES = test-asmobs-lib.c
  94. libtest_asmobs_la_CFLAGS = ${test_cflags}
  95. libtest_asmobs_la_LDFLAGS = -module -avoid-version -no-undefined -rpath `pwd` # so libtool will really build an .so
  96. libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
  97. BUILT_SOURCES += test-asmobs-lib.x
  98. check_SCRIPTS += test-asmobs
  99. TESTS += test-asmobs
  100. # test-ffi
  101. noinst_LTLIBRARIES += libtest-ffi.la
  102. libtest_ffi_la_SOURCES = test-ffi-lib.c
  103. libtest_ffi_la_CFLAGS = ${test_cflags}
  104. libtest_ffi_la_LDFLAGS = -module -avoid-version -no-undefined -rpath `pwd` # so libtool will really build an .so
  105. libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
  106. check_SCRIPTS += test-ffi
  107. TESTS += test-ffi
  108. endif HAVE_SHARED_LIBRARIES
  109. # test-foreign-object-scm
  110. check_SCRIPTS += test-foreign-object-scm
  111. TESTS += test-foreign-object-scm
  112. # test-foreign-object-c
  113. test_foreign_object_c_SOURCES = test-foreign-object-c.c
  114. test_foreign_object_c_CFLAGS = ${test_cflags}
  115. test_foreign_object_c_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  116. check_PROGRAMS += test-foreign-object-c
  117. TESTS += test-foreign-object-c
  118. # test-list
  119. test_list_SOURCES = test-list.c
  120. test_list_CFLAGS = ${test_cflags}
  121. test_list_LDADD = $(LIBGUILE_LDADD)
  122. check_PROGRAMS += test-list
  123. TESTS += test-list
  124. # test-unwind
  125. test_unwind_SOURCES = test-unwind.c
  126. test_unwind_CFLAGS = ${test_cflags}
  127. test_unwind_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  128. check_PROGRAMS += test-unwind
  129. TESTS += test-unwind
  130. # test-conversion
  131. test_conversion_SOURCES = test-conversion.c
  132. test_conversion_CFLAGS = ${test_cflags}
  133. test_conversion_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  134. check_PROGRAMS += test-conversion
  135. TESTS += test-conversion
  136. # test-loose-ends
  137. test_loose_ends_SOURCES = test-loose-ends.c
  138. test_loose_ends_CFLAGS = ${test_cflags}
  139. test_loose_ends_LDADD = $(LIBGUILE_LDADD)
  140. check_PROGRAMS += test-loose-ends
  141. TESTS += test-loose-ends
  142. # test-fast-slot-ref
  143. check_SCRIPTS += test-fast-slot-ref
  144. TESTS += test-fast-slot-ref
  145. # test-mb-regexp
  146. check_SCRIPTS += test-mb-regexp
  147. TESTS += test-mb-regexp
  148. # test-use-srfi
  149. check_SCRIPTS += test-use-srfi
  150. TESTS += test-use-srfi
  151. # test-scm-c-read
  152. test_scm_c_read_SOURCES = test-scm-c-read.c
  153. test_scm_c_read_CFLAGS = ${test_cflags}
  154. test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
  155. check_PROGRAMS += test-scm-c-read
  156. TESTS += test-scm-c-read
  157. # test-scm-take-locale-symbol
  158. test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
  159. test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
  160. test_scm_take_locale_symbol_LDADD = \
  161. $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  162. check_PROGRAMS += test-scm-take-locale-symbol
  163. TESTS += test-scm-take-locale-symbol
  164. # test-scm-take-u8vector
  165. test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
  166. test_scm_take_u8vector_CFLAGS = ${test_cflags}
  167. test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
  168. check_PROGRAMS += test-scm-take-u8vector
  169. TESTS += test-scm-take-u8vector
  170. # test-scm-take-u8vector
  171. test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c
  172. test_scm_to_latin1_string_CFLAGS = ${test_cflags}
  173. test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  174. check_PROGRAMS += test-scm-to-latin1-string
  175. TESTS += test-scm-to-latin1-string
  176. # test-scm-values
  177. test_scm_values_SOURCES = test-scm-values.c
  178. test_scm_values_CFLAGS = ${test_cflags}
  179. test_scm_values_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  180. check_PROGRAMS += test-scm-values
  181. TESTS += test-scm-values
  182. # test-scm-c-bind-keyword-arguments
  183. test_scm_c_bind_keyword_arguments_SOURCES = test-scm-c-bind-keyword-arguments.c
  184. test_scm_c_bind_keyword_arguments_CFLAGS = ${test_cflags}
  185. test_scm_c_bind_keyword_arguments_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  186. check_PROGRAMS += test-scm-c-bind-keyword-arguments
  187. TESTS += test-scm-c-bind-keyword-arguments
  188. # test-srfi-4
  189. test_srfi_4_SOURCES = test-srfi-4.c
  190. test_srfi_4_CFLAGS = ${test_cflags}
  191. test_srfi_4_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  192. check_PROGRAMS += test-srfi-4
  193. TESTS += test-srfi-4
  194. if HAVE_SHARED_LIBRARIES
  195. # test-extensions
  196. noinst_LTLIBRARIES += libtest-extensions.la
  197. libtest_extensions_la_SOURCES = test-extensions-lib.c
  198. libtest_extensions_la_CFLAGS = ${test_cflags}
  199. libtest_extensions_la_LDFLAGS = -module -avoid-version -no-undefined -rpath `pwd` # so libtool will really build an .so
  200. libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  201. check_SCRIPTS += test-extensions
  202. TESTS += test-extensions
  203. endif HAVE_SHARED_LIBRARIES
  204. if BUILD_PTHREAD_SUPPORT
  205. # test-with-guile-module
  206. test_with_guile_module_CFLAGS = ${test_cflags}
  207. test_with_guile_module_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  208. check_PROGRAMS += test-with-guile-module
  209. TESTS += test-with-guile-module
  210. test_scm_with_guile_CFLAGS = ${test_cflags}
  211. test_scm_with_guile_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  212. check_PROGRAMS += test-scm-with-guile
  213. TESTS += test-scm-with-guile
  214. test_scm_spawn_thread_CFLAGS = ${test_cflags}
  215. test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  216. check_PROGRAMS += test-scm-spawn-thread
  217. TESTS += test-scm-spawn-thread
  218. test_pthread_create_CFLAGS = ${test_cflags}
  219. test_pthread_create_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  220. check_PROGRAMS += test-pthread-create
  221. TESTS += test-pthread-create
  222. test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
  223. test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  224. check_PROGRAMS += test-pthread-create-secondary
  225. TESTS += test-pthread-create-secondary
  226. else
  227. EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
  228. endif
  229. test_smob_mark_SOURCES = test-smob-mark.c
  230. test_smob_mark_CFLAGS = ${test_cflags}
  231. test_smob_mark_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  232. check_PROGRAMS += test-smob-mark
  233. TESTS += test-smob-mark
  234. test_smob_mark_race_SOURCES = test-smob-mark-race.c
  235. test_smob_mark_race_CFLAGS = ${test_cflags}
  236. test_smob_mark_race_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  237. check_PROGRAMS += test-smob-mark-race
  238. TESTS += test-smob-mark-race
  239. check_SCRIPTS += test-stack-overflow
  240. TESTS += test-stack-overflow
  241. check_SCRIPTS += test-out-of-memory
  242. TESTS += test-out-of-memory
  243. check_SCRIPTS += test-close-on-exec
  244. TESTS += test-close-on-exec
  245. EXTRA_DIST += ${check_SCRIPTS}