summaryrefslogtreecommitdiff
path: root/tests/plugins/Makefile.am
blob: b008f62220d729e9b234e7d2f57ad1d4dca33abf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Process this file with automake to produce Makefile.in

$(top_builddir)/xsltproc/xsltproc:
	@(cd ../../../xsltproc ; $(MAKE) xsltproc)

EXTRA_DIST = plugin.out	plugin.xml plugin.xsl

INCLUDES = -I$(top_srcdir) -I../../libxslt $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)

EXTRA_LTLIBRARIES = xmlsoft_org_xslt_testplugin.la

# our rpath is a rather unorthodox location as we 
# don't want to pollute $(DESTDIR) with the test plugin

plugindir=$(shell pwd)/.libs/

xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version -rpath $(plugindir)

all:

if WITH_MODULES

test-logall:
	@echo '## Running plugin tests'

test tests: $(top_builddir)/xsltproc/xsltproc test-logall $(EXTRA_LTLIBRARIES)
	@LD_LIBRARY_PATH=$(plugindir):$(top_builddir)/libxslt/.libs:$(LD_LIBRARY_PATH) \
	 LIBXSLT_PLUGINS_PATH=$(plugindir) \
	 $(top_builddir)/xsltproc/xsltproc plugin.xsl plugin.xml > plugin.res
	@diff plugin.out plugin.res
	@rm plugin.res

else

test tests:
	@echo Skipping the plugin tests.

endif