Makefile.am 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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 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/uninstalled-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. # test-num2integral
  78. test_num2integral_SOURCES = test-num2integral.c
  79. test_num2integral_CFLAGS = ${test_cflags}
  80. test_num2integral_LDADD = $(LIBGUILE_LDADD)
  81. check_PROGRAMS += test-num2integral
  82. TESTS += test-num2integral
  83. # test-round
  84. test_round_CFLAGS = ${test_cflags}
  85. test_round_LDADD = $(LIBGUILE_LDADD)
  86. check_PROGRAMS += test-round
  87. TESTS += test-round
  88. if HAVE_SHARED_LIBRARIES
  89. # test-asmobs
  90. noinst_LTLIBRARIES += libtest-asmobs.la
  91. libtest_asmobs_la_SOURCES = test-asmobs-lib.c
  92. libtest_asmobs_la_CFLAGS = ${test_cflags}
  93. libtest_asmobs_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
  94. libtest_asmobs_la_LIBADD = $(LIBGUILE_LDADD)
  95. BUILT_SOURCES += test-asmobs-lib.x
  96. check_SCRIPTS += test-asmobs
  97. TESTS += test-asmobs
  98. # test-ffi
  99. noinst_LTLIBRARIES += libtest-ffi.la
  100. libtest_ffi_la_SOURCES = test-ffi-lib.c
  101. libtest_ffi_la_CFLAGS = ${test_cflags}
  102. libtest_ffi_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
  103. libtest_ffi_la_LIBADD = $(LIBGUILE_LDADD)
  104. check_SCRIPTS += test-ffi
  105. TESTS += test-ffi
  106. endif HAVE_SHARED_LIBRARIES
  107. # test-foreign-object-scm
  108. check_SCRIPTS += test-foreign-object-scm
  109. TESTS += test-foreign-object-scm
  110. # test-foreign-object-c
  111. test_foreign_object_c_SOURCES = test-foreign-object-c.c
  112. test_foreign_object_c_CFLAGS = ${test_cflags}
  113. test_foreign_object_c_LDADD = $(LIBGUILE_LDADD)
  114. check_PROGRAMS += test-foreign-object-c
  115. TESTS += test-foreign-object-c
  116. # test-list
  117. test_list_SOURCES = test-list.c
  118. test_list_CFLAGS = ${test_cflags}
  119. test_list_LDADD = $(LIBGUILE_LDADD)
  120. check_PROGRAMS += test-list
  121. TESTS += test-list
  122. # test-unwind
  123. test_unwind_SOURCES = test-unwind.c
  124. test_unwind_CFLAGS = ${test_cflags}
  125. test_unwind_LDADD = $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  126. check_PROGRAMS += test-unwind
  127. TESTS += test-unwind
  128. # test-conversion
  129. test_conversion_SOURCES = test-conversion.c
  130. test_conversion_CFLAGS = ${test_cflags}
  131. test_conversion_LDADD = $(LIBGUILE_LDADD)
  132. check_PROGRAMS += test-conversion
  133. TESTS += test-conversion
  134. # test-loose-ends
  135. test_loose_ends_SOURCES = test-loose-ends.c
  136. test_loose_ends_CFLAGS = ${test_cflags}
  137. test_loose_ends_LDADD = $(LIBGUILE_LDADD)
  138. check_PROGRAMS += test-loose-ends
  139. TESTS += test-loose-ends
  140. # test-fast-slot-ref
  141. check_SCRIPTS += test-fast-slot-ref
  142. TESTS += test-fast-slot-ref
  143. # test-mb-regexp
  144. check_SCRIPTS += test-mb-regexp
  145. TESTS += test-mb-regexp
  146. # test-use-srfi
  147. check_SCRIPTS += test-use-srfi
  148. TESTS += test-use-srfi
  149. # test-scm-c-read
  150. test_scm_c_read_SOURCES = test-scm-c-read.c
  151. test_scm_c_read_CFLAGS = ${test_cflags}
  152. test_scm_c_read_LDADD = $(LIBGUILE_LDADD)
  153. check_PROGRAMS += test-scm-c-read
  154. TESTS += test-scm-c-read
  155. # test-scm-take-locale-symbol
  156. test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
  157. test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
  158. test_scm_take_locale_symbol_LDADD = \
  159. $(LIBGUILE_LDADD) $(top_builddir)/lib/libgnu.la
  160. check_PROGRAMS += test-scm-take-locale-symbol
  161. TESTS += test-scm-take-locale-symbol
  162. # test-scm-take-u8vector
  163. test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
  164. test_scm_take_u8vector_CFLAGS = ${test_cflags}
  165. test_scm_take_u8vector_LDADD = $(LIBGUILE_LDADD)
  166. check_PROGRAMS += test-scm-take-u8vector
  167. TESTS += test-scm-take-u8vector
  168. # test-scm-take-u8vector
  169. test_scm_to_latin1_string_SOURCES = test-scm-to-latin1-string.c
  170. test_scm_to_latin1_string_CFLAGS = ${test_cflags}
  171. test_scm_to_latin1_string_LDADD = $(LIBGUILE_LDADD)
  172. check_PROGRAMS += test-scm-to-latin1-string
  173. TESTS += test-scm-to-latin1-string
  174. # test-scm-values
  175. test_scm_values_SOURCES = test-scm-values.c
  176. test_scm_values_CFLAGS = ${test_cflags}
  177. test_scm_values_LDADD = $(LIBGUILE_LDADD)
  178. check_PROGRAMS += test-scm-values
  179. TESTS += test-scm-values
  180. # test-scm-c-bind-keyword-arguments
  181. test_scm_c_bind_keyword_arguments_SOURCES = test-scm-c-bind-keyword-arguments.c
  182. test_scm_c_bind_keyword_arguments_CFLAGS = ${test_cflags}
  183. test_scm_c_bind_keyword_arguments_LDADD = $(LIBGUILE_LDADD)
  184. check_PROGRAMS += test-scm-c-bind-keyword-arguments
  185. TESTS += test-scm-c-bind-keyword-arguments
  186. # test-srfi-4
  187. test_srfi_4_SOURCES = test-srfi-4.c
  188. test_srfi_4_CFLAGS = ${test_cflags}
  189. test_srfi_4_LDADD = $(LIBGUILE_LDADD)
  190. check_PROGRAMS += test-srfi-4
  191. TESTS += test-srfi-4
  192. if HAVE_SHARED_LIBRARIES
  193. # test-extensions
  194. noinst_LTLIBRARIES += libtest-extensions.la
  195. libtest_extensions_la_SOURCES = test-extensions-lib.c
  196. libtest_extensions_la_CFLAGS = ${test_cflags}
  197. libtest_extensions_la_LDFLAGS = -module -no-undefined -rpath `pwd` # so libtool will really build an .so
  198. libtest_extensions_la_LIBADD = $(LIBGUILE_LDADD)
  199. check_SCRIPTS += test-extensions
  200. TESTS += test-extensions
  201. endif HAVE_SHARED_LIBRARIES
  202. if BUILD_PTHREAD_SUPPORT
  203. # test-with-guile-module
  204. test_with_guile_module_CFLAGS = ${test_cflags}
  205. test_with_guile_module_LDADD = $(LIBGUILE_LDADD)
  206. check_PROGRAMS += test-with-guile-module
  207. TESTS += test-with-guile-module
  208. test_scm_with_guile_CFLAGS = ${test_cflags}
  209. test_scm_with_guile_LDADD = $(LIBGUILE_LDADD)
  210. check_PROGRAMS += test-scm-with-guile
  211. TESTS += test-scm-with-guile
  212. test_scm_spawn_thread_CFLAGS = ${test_cflags}
  213. test_scm_spawn_thread_LDADD = $(LIBGUILE_LDADD)
  214. check_PROGRAMS += test-scm-spawn-thread
  215. TESTS += test-scm-spawn-thread
  216. test_pthread_create_CFLAGS = ${test_cflags}
  217. test_pthread_create_LDADD = $(LIBGUILE_LDADD)
  218. check_PROGRAMS += test-pthread-create
  219. TESTS += test-pthread-create
  220. test_pthread_create_secondary_CFLAGS = ${test_cflags} $(BDW_GC_CFLAGS)
  221. test_pthread_create_secondary_LDADD = $(LIBGUILE_LDADD)
  222. check_PROGRAMS += test-pthread-create-secondary
  223. TESTS += test-pthread-create-secondary
  224. else
  225. EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
  226. endif
  227. test_smob_mark_SOURCES = test-smob-mark.c
  228. test_smob_mark_CFLAGS = ${test_cflags}
  229. test_smob_mark_LDADD = $(LIBGUILE_LDADD)
  230. check_PROGRAMS += test-smob-mark
  231. TESTS += test-smob-mark
  232. check_SCRIPTS += test-stack-overflow
  233. TESTS += test-stack-overflow
  234. check_SCRIPTS += test-out-of-memory
  235. TESTS += test-out-of-memory
  236. EXTRA_DIST += ${check_SCRIPTS}