2011-12-12 22:41:41 +00:00
|
|
|
noinst_LTLIBRARIES = libtest-core.la
|
|
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
SWIG_FILES = \
|
|
|
|
|
unittest-support.i
|
2011-12-12 22:41:41 +00:00
|
|
|
|
|
|
|
|
libtest_core_la_SOURCES = \
|
2012-04-03 21:35:19 +00:00
|
|
|
test-stuff.c \
|
|
|
|
|
unittest-support.c
|
2001-08-17 22:49:17 +00:00
|
|
|
|
2010-03-04 22:03:42 +00:00
|
|
|
libtest_core_la_LIBADD = \
|
2011-12-20 04:02:26 +00:00
|
|
|
${top_builddir}/src/libqof/qof/libgnc-qof.la \
|
2001-08-18 00:13:45 +00:00
|
|
|
${GLIB_LIBS}
|
2001-08-17 22:49:17 +00:00
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
noinst_HEADERS = \
|
|
|
|
|
test-stuff.h \
|
|
|
|
|
unittest-support.h
|
2001-08-17 22:49:17 +00:00
|
|
|
|
2011-12-12 22:41:41 +00:00
|
|
|
libtest_core_la_CPPFLAGS = \
|
2003-02-22 08:15:53 +00:00
|
|
|
-I${top_srcdir}/src \
|
2011-11-05 23:04:23 +00:00
|
|
|
-I${top_srcdir}/src/libqof/qof \
|
2010-03-04 22:03:42 +00:00
|
|
|
${GLIB_CFLAGS}
|
2011-12-12 22:41:41 +00:00
|
|
|
|
|
|
|
|
libtest_core_la_LDFLAGS = \
|
|
|
|
|
-rpath ${exec-prefix}/lib
|
|
|
|
|
|
2012-11-01 10:35:34 +00:00
|
|
|
if BUILDING_FROM_SCM
|
2012-04-03 21:35:19 +00:00
|
|
|
swig-unittest-support-guile.c: unittest-support.i $(top_srcdir)/src/base-typemaps.i
|
2011-12-12 22:41:41 +00:00
|
|
|
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
|
|
|
|
|
-I${top_srcdir}/src \
|
2013-12-14 16:40:42 +00:00
|
|
|
${AM_CPPFLAGS} -o $@ $<
|
2014-01-22 15:48:15 +00:00
|
|
|
if ! OS_WIN32
|
2014-01-23 21:20:37 +00:00
|
|
|
if ! SWIG_DIST_FAIL
|
2013-12-13 20:22:01 +00:00
|
|
|
if ! `grep "define scm_from_utf8_string" $@ > /dev/null 2>&1`; then \
|
|
|
|
|
patch $@ $(top_srcdir)/src/swig-utf8.patch; \
|
|
|
|
|
fi
|
2014-01-22 15:48:15 +00:00
|
|
|
endif
|
2014-01-23 21:20:37 +00:00
|
|
|
endif
|
2011-12-12 22:41:41 +00:00
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
swig-unittest-support-python.c: unittest-support.i $(top_srcdir)/src/base-typemaps.i
|
2011-12-12 22:41:41 +00:00
|
|
|
$(SWIG) -python -Wall -Werror $(SWIG_ARGS) \
|
|
|
|
|
-I${top_srcdir}/src \
|
|
|
|
|
${AM_CPPFLAGS} -o $@ $<
|
|
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
unittest-support.py: swig-unittest-support-python.c ${SWIG_FILES}
|
2011-12-12 22:41:41 +00:00
|
|
|
endif
|
|
|
|
|
noinst_LTLIBRARIES += libtest-core-guile.la
|
2012-04-03 21:35:19 +00:00
|
|
|
libtest_core_guile_la_SOURCES = swig-unittest-support-guile.c
|
2011-12-12 22:41:41 +00:00
|
|
|
libtest_core_guile_la_LIBADD = \
|
|
|
|
|
${GUILE_LIBS} \
|
|
|
|
|
${GLIB_LIBS} \
|
|
|
|
|
libtest-core.la
|
|
|
|
|
|
|
|
|
|
libtest_core_guile_la_CFLAGS = \
|
|
|
|
|
${libtest_core_la_CPPFLAGS} \
|
|
|
|
|
${GUILE_CFLAGS}
|
|
|
|
|
|
|
|
|
|
libtest_core_guile_la_LDFLAGS = \
|
|
|
|
|
-rpath ${exec-prefix}/lib
|
|
|
|
|
|
|
|
|
|
if WITH_PYTHON
|
|
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
noinst_LTLIBRARIES += _unittest_support.la
|
2011-12-12 22:41:41 +00:00
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
_unittest_support_la_SOURCES = \
|
|
|
|
|
swig-unittest-support-python.c
|
|
|
|
|
_unittest_support_la_CFLAGS = \
|
2011-12-12 22:41:41 +00:00
|
|
|
${libtest_core_la_CPPFLAGS} \
|
|
|
|
|
${PYTHON_CPPFLAGS}
|
2012-04-03 21:35:19 +00:00
|
|
|
_unittest_support_la_LDFLAGS = \
|
2011-12-12 22:41:41 +00:00
|
|
|
${PYTHON_LDFLAGS} \
|
|
|
|
|
-module \
|
|
|
|
|
-rpath ${exec-prefix}/lib
|
|
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
_unittest_support_la_LIBADD = \
|
2011-12-12 22:41:41 +00:00
|
|
|
${PYTHON_LIBS} \
|
|
|
|
|
${PYTHON_EXTRA_LIBS} \
|
|
|
|
|
libtest-core.la
|
|
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
2014-10-31 10:26:03 +01:00
|
|
|
gncscmmoddir = ${GNC_SCM_INSTALL_DIR}/gnucash
|
2014-10-28 20:40:21 +01:00
|
|
|
gncscmmod_DATA = unittest-support.scm
|
|
|
|
|
|
|
|
|
|
SCM_FILES = $(gncscmmod_DATA)
|
2011-12-12 22:41:41 +00:00
|
|
|
|
|
|
|
|
.scm-links:
|
|
|
|
|
$(RM) -rf gnucash
|
|
|
|
|
mkdir -p gnucash
|
|
|
|
|
if GNUCASH_SEPARATE_BUILDDIR
|
|
|
|
|
for X in ${SCM_FILES} ; do \
|
|
|
|
|
$(LN_S) -f ${srcdir}/$$X . ; \
|
|
|
|
|
done
|
|
|
|
|
endif
|
2014-10-28 20:40:21 +01:00
|
|
|
( cd gnucash; for A in $(gncscmmod_DATA) ; do $(LN_S) -f ../$$A . ; done )
|
2011-12-12 22:41:41 +00:00
|
|
|
if ! OS_WIN32
|
|
|
|
|
# Windows knows no "ln -s" but uses "cp": must copy every time (see bug #566567).
|
|
|
|
|
touch .scm-links
|
|
|
|
|
endif
|
|
|
|
|
|
2014-10-31 10:07:10 +01:00
|
|
|
if GNC_HAVE_GUILE_2
|
|
|
|
|
GUILE_COMPILE_ENV = \
|
2014-12-12 12:55:05 -08:00
|
|
|
--library-dir ${top_builddir}/src/test-core \
|
|
|
|
|
--library-dir ${top_builddir}/src/libqof/qof
|
|
|
|
|
|
2014-10-31 10:07:10 +01:00
|
|
|
|
2014-11-12 14:43:01 +01:00
|
|
|
%.go : %.scm .scm-links $(noinst_LTLIBRARIES)
|
2014-10-30 17:54:36 +01:00
|
|
|
GNC_UNINSTALLED=yes \
|
|
|
|
|
GNC_BUILDDIR=${top_builddir} \
|
2015-01-30 11:49:41 +01:00
|
|
|
$(shell ${abs_top_srcdir}/src/gnc-test-env.pl --noexports ${GUILE_COMPILE_ENV}) \
|
2014-10-31 10:07:10 +01:00
|
|
|
$(GUILD) compile -o $@ $<
|
|
|
|
|
|
2015-03-30 17:30:02 +02:00
|
|
|
gncscmmodcachedir = ${pkglibdir}/scm/ccache/@GUILE_EFFECTIVE_VERSION@/gnucash
|
2014-10-31 10:07:10 +01:00
|
|
|
gncscmmodcache_DATA = $(gncscmmod_DATA:.scm=.go)
|
|
|
|
|
endif
|
|
|
|
|
|
2011-12-12 22:41:41 +00:00
|
|
|
clean-local:
|
|
|
|
|
$(RM) -rf gnucash
|
|
|
|
|
|
|
|
|
|
noinst_DATA = .scm-links
|
2014-12-02 08:24:57 -08:00
|
|
|
CLEANFILES = .scm-links ${gncscmmodcache_DATA}
|
2011-12-12 22:41:41 +00:00
|
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
|
$(SCM_FILES) \
|
2012-04-03 21:35:19 +00:00
|
|
|
swig-unittest-support-python.c \
|
|
|
|
|
swig-unittest-support-guile.c \
|
|
|
|
|
unittest-support.i
|
2011-12-12 22:41:41 +00:00
|
|
|
|
2012-04-03 21:35:19 +00:00
|
|
|
MAINTAINERCLEANFILES = \
|
|
|
|
|
swig-unittest-support-guile.c \
|
2012-11-07 03:08:15 +00:00
|
|
|
swig-unittest-support-python.c
|