1include $(top_builddir)/libgcroots.mk
2
3# To take precedence over installed gcroots.h by the bundled
4# libgcroots/include/gcroots.h, @GCROOTS_CFLAGS@ must be placed here.
5AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/src @GCROOTS_CFLAGS@ \
6	      -DTST_SCM_SYSTEM_LOAD_PATH=\"@abs_top_srcdir@/lib\"
7AM_CFLAGS   =
8AM_LDFLAGS  = -rpath $(libdir)
9LIBS        = $(top_builddir)/src/libsscm.la @GCROOTS_LIBS@
10
11EXTRA_DIST= sscm-test.h utils.c \
12            test-alignment.c \
13            test-global.c \
14            test-gc.c test-gc-protect.c test-gc-protect-stack.c \
15            test-storage.c test-storage-compact.c \
16            test-strcasecmp.c test-length.c test-format.c test-array2list.c
17
18SUFFIXES= -coll.o -coll.c
19
20if MAINTAINER_MODE
21CLEANFILES= *-coll.c
22
23# FIXME: how do I make this rule depend on collect.sh (is it
24# possible)?
25.c-coll.c:
26	$(SH) ./collect.sh $< > $@ || { rm -f $@; false; }
27endif
28
29
30# Name your test suite with a -coll suffix if you want it processed
31# with collect.sh.  Leave the suffix out if you don't want some script
32# messing around with your masterpiece.
33if USE_LIBSSCM
34TESTS= test-alignment-coll \
35       test-global-coll \
36       test-gc-coll test-gc-protect-coll test-gc-protect-stack-coll \
37       test-storage-coll test-storage-compact-coll \
38       test-strcasecmp-coll test-length-coll test-format-coll \
39       test-array2list-coll
40XFAIL_TESTS =
41check_PROGRAMS= $(TESTS) test-minishell
42else
43TESTS=
44XFAIL_TESTS =
45check_PROGRAMS=
46endif
47
48# GNU version of sed is required to run collect.sh
49dist-hook:
50	@(test -n "$(SED)"                                              \
51	  && $(SED) --version 2>/dev/null                               \
52	  && $(SED) --version 2>/dev/null | grep GNU)                   \
53	 || (echo 'GNU sed(1) is not found: install it'; exit 1)
54