blob: 36fde35d514f840423f41f6740ca1ff486448be6 [file] [log] [blame]
## Process this file with automake to produce Makefile.in
SUBDIRS = doc
INCLUDES = -I@srcdir@ @CORBA_CFLAGS@ $(VERSION_FLAGS)
VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
noinst_PROGRAMS=tester testSAX testHTML testXPath
bin_SCRIPTS=xml-config
lib_LTLIBRARIES = libxml.la
libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
libxml_la_SOURCES = \
SAX.c \
entities.c \
encoding.c \
error.c \
parser.c \
HTMLparser.c \
HTMLtree.c \
debugXML.c \
tree.c \
xpath.c \
xmlIO.c \
valid.c
xmlincdir = $(includedir)/gnome-xml
xmlinc_HEADERS = \
entities.h \
encoding.h \
parser.h \
HTMLparser.h \
HTMLtree.h \
parserInternals.h \
debugXML.h \
xml-error.h \
tree.h \
xpath.h \
xmlIO.h \
valid.h
DEPS = $(top_builddir)/libxml.la
LDADDS = $(top_builddir)/libxml.la @Z_LIBS@ @M_LIBS@
tester_SOURCES=tester.c
tester_LDFLAGS =
tester_DEPENDENCIES = $(DEPS)
tester_LDADD= $(LDADDS)
testSAX_SOURCES=testSAX.c
testSAX_LDFLAGS =
testSAX_DEPENDENCIES = $(DEPS)
testSAX_LDADD= $(LDADDS)
testHTML_SOURCES=testHTML.c
testHTML_LDFLAGS =
testHTML_DEPENDENCIES = $(DEPS)
testHTML_LDADD= $(LDADDS)
testXPath_SOURCES=testXPath.c
testXPath_LDFLAGS =
testXPath_DEPENDENCIES = $(DEPS)
testXPath_LDADD= $(LDADDS)
check-local: tests
testall : tests SVGtests SAXtests XPathtests XMLenttests
tests: XMLtests HTMLtests Validtests
HTMLtests : testHTML
@echo "##"
@echo "## HTML regression tests"
@echo "##"
@(for i in $(srcdir)/test/HTML/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
echo New test file $$name ; \
testHTML $$i > $(srcdir)/result/HTML/$$name ; \
else \
echo Testing $$name ; \
testHTML $$i > result.$$name ; \
diff $(srcdir)/result/HTML/$$name result.$$name ; \
testHTML result.$$name > result2.$$name ; \
diff result.$$name result2.$$name ; \
rm result.$$name result2.$$name ; \
fi ; fi ; done)
XMLtests : tester
@echo "##"
@echo "## XML regression tests"
@echo "##"
@(for i in $(srcdir)/test/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/$$name ] ; then \
echo New test file $$name ; \
tester $$i > $(srcdir)/result/$$name ; \
else \
echo Testing $$name ; \
tester $$i > result.$$name ; \
diff $(srcdir)/result/$$name result.$$name ; \
tester result.$$name > result2.$$name ; \
diff result.$$name result2.$$name ; \
rm result.$$name result2.$$name ; \
fi ; fi ; done)
XMLenttests : tester
@echo "##"
@echo "## XML entity subst regression tests"
@echo "##"
@(for i in $(srcdir)/test/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
echo New test file $$name ; \
tester --noent $$i > $(srcdir)/result/noent/$$name ; \
else \
echo Testing $$name ; \
tester --noent $$i > result.$$name ; \
diff $(srcdir)/result/noent/$$name result.$$name ; \
tester --noent result.$$name > result2.$$name ; \
diff result.$$name result2.$$name ; \
rm result.$$name result2.$$name ; \
fi ; fi ; done)
XPathtests : testXPath
@echo "##"
@echo "## XPath regression tests"
@echo "##"
@(for i in $(srcdir)/test/XPath/expr/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
echo New test file $$name ; \
testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
else \
echo Testing $$name ; \
testXPath -f --expr $$i > result.$$name ; \
diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
@(for i in $(srcdir)/test/XPath/docs/* ; do \
if [ ! -d $$i ] ; then \
doc=`basename $$i`; \
for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
name=`basename $$j`; \
if [ ! -d $$j ] ; then \
if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
echo New test file $$name ; \
testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
else \
echo Testing $$name ; \
testXPath -f -i $$i $$j > result.$$name ; \
diff $(srcdir)/result/XPath/tests/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done ; fi ; done)
SVGtests : tester
@echo "##"
@echo "## SVG parsing regression tests"
@echo "##"
@(for i in $(srcdir)/test/SVG/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
echo New test file $$name ; \
tester $$i > $(srcdir)/result/SVG/$$name ; \
else \
echo Testing $$name ; \
tester $$i > result.$$name ; \
diff $(srcdir)/result/SVG/$$name result.$$name ; \
tester result.$$name > result2.$$name ; \
diff result.$$name result2.$$name ; \
rm result.$$name result2.$$name ; \
fi ; fi ; done)
SAXtests : testSAX
@echo "##"
@echo "## SAX callbacks regression tests"
@echo "##"
@(for i in $(srcdir)/test/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/SAXresult/$$name ] ; then \
echo New test file $$name ; \
testSAX $$i > $(srcdir)/SAXresult/$$name ; \
else \
echo Testing $$name ; \
testSAX $$i > result.$$name ; \
diff $(srcdir)/SAXresult/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
Validtests : tester
@echo "##"
@echo "## Validity checking regression tests"
@echo "##"
@(for i in $(srcdir)/test/VC/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
echo New test file $$name ; \
tester --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
else \
echo Testing $$name ; \
tester --noout --valid $$i 2> result.$$name ; \
diff $(srcdir)/result/VC/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "##"
@echo "## Valid documents regression tests"
@echo "##"
@(for i in $(srcdir)/test/valid/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
echo New test file $$name ; \
tester --valid $$i > $(srcdir)/result/valid/$$name ; \
else \
echo Testing $$name ; \
tester --valid $$i > result.$$name ; \
diff $(srcdir)/result/valid/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
dist-hook:
cp libxml.spec $(distdir)
## We create xmlConf.sh here and not from configure because we want
## to get the paths expanded correctly. Macros like srcdir are given
## the value NONE in configure if the user doesn't specify them (this
## is an autoconf feature, not a bug).
confexecdir=$(libdir)
confexec_DATA = xmlConf.sh
CLEANFILES=xmlConf.sh
EXTRA_DIST = xmlConf.sh.in
confexecdir=$(libdir)
confexec_DATA = xmlConf.sh
EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult \
example/Makefile.am example/gjobread.c example/gjobs.xml
xmlConf.sh: xmlConf.sh.in Makefile
## Use sed and then mv to avoid problems if the user interrupts.
sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
-e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
-e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
< $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
&& mv xmlConf.tmp xmlConf.sh