summaryrefslogtreecommitdiff
path: root/tests/plugins/Makefile.am
blob: da72728783db3d2f8c683a7f435b06749f19434f (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
43
## Process this file with automake to produce Makefile.in

# somewhat unconventional pkglibdir, but noinst_LTLIBRARIES
# never build DSOs (afaik). NOTE: must be defined outside the AM_CONDITIONAL
pkglibdir=$(shell pwd)/plugin

$(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)

noinst_LTLIBRARIES = xmlsoft_org_xslt_testplugin.la

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 

all:

if WITH_MODULES

test-logall:
	@echo '## Running plugin tests'
	@echo '##  Note: installing xmlsoft_org_xslt_testplugin.so'
	@echo '##        to $(pkglibdir)'

test tests: $(top_builddir)/xsltproc/xsltproc test-logall install-pkglibLTLIBRARIES
	@LD_LIBRARY_PATH=$(top_builddir)/libxslt/.libs:$(LD_LIBRARY_PATH) \
	 LIBXSLT_PLUGINS_PATH=./plugin \
	 $(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