summaryrefslogtreecommitdiff
path: root/python/tests/Makefile.am
blob: f757774fd66b9ecbbb3556820de6e3d86354e98c (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
EXAMPLE_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)/examples

TESTSPY=	\
    basic.py	\
    exslt.py	\
    extelem.py	\
    extfunc.py

XMLS=		\
    test.xml	\
    test.xsl

EXTRAS=		\
    pyxsltproc.py

EXTRA_DIST = $(TESTSPY) $(XMLS) $(EXTRAS)

CLEANFILES = *.pyc core

if WITH_PYTHON
tests: $(TESTSPY)
	-@(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
	  if test "x$(LIBXML_SRC)" != "x" ; then PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; fi; \
	  export PYTHONPATH; \
	   for test in $(TESTSPY) ; do echo "-- $$test" ; (cd $(srcdir) && $(PYTHON) $$test ); done)
else
tests:
endif

install-data-local:
	$(MKDIR_P) $(DESTDIR)$(EXAMPLE_DIR)
	-(for test in $(TESTSPY) $(XMLS) $(EXTRAS); \
	  do $(INSTALL) -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)