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 = \
|
2017-08-10 13:56:00 +02:00
|
|
|
${top_builddir}/libgnucash/engine/libgncmod-engine.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 = \
|
2017-08-10 13:56:00 +02:00
|
|
|
-I${top_srcdir}/common \
|
|
|
|
-I${top_srcdir}/libgnucash/engine \
|
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
|
|
|
|
|
2015-03-30 22:13:41 +02:00
|
|
|
if BUILDING_FROM_VCS
|
2017-08-10 13:56:00 +02:00
|
|
|
swig-unittest-support-guile.c: unittest-support.i $(top_srcdir)/common/base-typemaps.i
|
2011-12-12 22:41:41 +00:00
|
|
|
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
|
2017-08-10 13:56:00 +02:00
|
|
|
-I${top_srcdir}/common \
|
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 \
|
2017-08-10 13:56:00 +02:00
|
|
|
patch $@ $(top_srcdir)/common/swig-utf8.patch; \
|
2013-12-13 20:22:01 +00:00
|
|
|
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
|
|
|
|
2017-08-10 13:56:00 +02:00
|
|
|
swig-unittest-support-python.c: unittest-support.i $(top_srcdir)/common/base-typemaps.i
|
2011-12-12 22:41:41 +00:00
|
|
|
$(SWIG) -python -Wall -Werror $(SWIG_ARGS) \
|
2017-08-10 13:56:00 +02:00
|
|
|
-I${top_srcdir}/common \
|
2011-12-12 22:41:41 +00:00
|
|
|
${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} \
|
2014-04-27 12:53:21 -07:00
|
|
|
${GUILE_CFLAGS} \
|
|
|
|
${AM_CFLAGS}
|
2011-12-12 22:41:41 +00:00
|
|
|
|
|
|
|
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-21 17:34:35 -07:00
|
|
|
|
2015-01-17 13:21:40 -08:00
|
|
|
if GOOGLE_TEST_LIBS
|
|
|
|
noinst_LIBRARIES = libgmock.a
|
|
|
|
else
|
2014-10-21 17:34:35 -07:00
|
|
|
noinst_LIBRARIES = \
|
|
|
|
libgtest.a \
|
|
|
|
libgmock.a
|
2015-01-17 13:21:40 -08:00
|
|
|
nodist_libgtest_a_SOURCES = ${GTEST_SRC}/src/gtest-all.cc
|
|
|
|
libgtest_a_CPPFLAGS = ${AM_CPPFLAGS} -I${GTEST_HEADERS} -I${GTEST_SRC}
|
|
|
|
endif
|
|
|
|
nodist_libgmock_a_SOURCES = ${GMOCK_SRC_PATH}/gmock-all.cc
|
|
|
|
libgmock_a_CPPFLAGS = ${libgtest_a_CPPFLAGS} -I${GMOCK_HEADERS} -I${GMOCK_SRC}
|
2014-10-21 17:34:35 -07:00
|
|
|
|
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
|
2011-12-12 22:41:41 +00:00
|
|
|
|
2014-10-28 20:40:21 +01:00
|
|
|
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 = \
|
2017-08-10 13:56:00 +02:00
|
|
|
--library-dir ${top_builddir}/common/test-core \
|
|
|
|
--library-dir ${top_builddir}/libgnucash/engine
|
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} \
|
2017-08-10 13:56:00 +02:00
|
|
|
$(shell ${abs_top_srcdir}/common/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 \
|
2015-07-10 15:31:25 -07:00
|
|
|
unittest_support.py \
|
2017-07-10 20:06:31 +02:00
|
|
|
unittest-support.i \
|
|
|
|
CMakeLists.txt
|
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
|