blob: ed6baaa4d5f0a982660276e3972da6d4d1ef93c7 [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001## Process this file with automake to produce Makefile.in
2
Daniel Veillard19b858c1999-02-06 18:12:01 +00003SUBDIRS = doc
4
Daniel Veillard14fff061999-06-22 21:49:07 +00005INCLUDES = -I@srcdir@ @CORBA_CFLAGS@ $(VERSION_FLAGS)
6
7VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
Daniel Veillard27fb0751998-10-17 06:47:46 +00008
Daniel Veillard011b63c1999-06-02 17:44:04 +00009noinst_PROGRAMS=tester testSAX
Daniel Veillard01791d51998-07-24 19:24:09 +000010
Daniel Veillarda6e1d121998-10-04 14:41:05 +000011bin_SCRIPTS=xml-config
12
Daniel Veillard0dc897e1998-07-26 04:12:22 +000013lib_LTLIBRARIES = libxml.la
Daniel Veillard01791d51998-07-24 19:24:09 +000014
Daniel Veillard14fff061999-06-22 21:49:07 +000015libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
16
Daniel Veillard0dc897e1998-07-26 04:12:22 +000017libxml_la_SOURCES = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000018 SAX.c \
19 entities.c \
Daniel Veillard891e4041998-10-19 00:43:02 +000020 encoding.c \
Daniel Veillard260a68f1998-08-13 03:39:55 +000021 error.c \
22 parser.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000023 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000024 tree.c \
25 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000026
Tom Tromeyc19653d1998-08-14 01:22:43 +000027xmlincdir = $(includedir)/gnome-xml
28xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000029 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000030 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000031 parser.h \
Daniel Veillard35925471999-02-25 08:46:07 +000032 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000033 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000034 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000035 tree.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000036 xmlIO.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000037 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000038
Daniel Veillard0dc897e1998-07-26 04:12:22 +000039DEPS = $(top_builddir)/libxml.la
40LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000041
42tester_SOURCES=tester.c
43tester_LDFLAGS =
44tester_DEPENDENCIES = $(DEPS)
45tester_LDADD= $(LDADDS)
46
Daniel Veillard011b63c1999-06-02 17:44:04 +000047testSAX_SOURCES=testSAX.c
48testSAX_LDFLAGS =
49testSAX_DEPENDENCIES = $(DEPS)
50testSAX_LDADD= $(LDADDS)
51
Raja R Harinatha86c23e1999-03-05 22:14:01 +000052check-local: tests
53
Daniel Veillard011b63c1999-06-02 17:44:04 +000054testall : tests SVGtests SAXtests
55
Daniel Veillard01791d51998-07-24 19:24:09 +000056tests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000057 @(DIR=`pwd`; cd $(srcdir) ; \
58 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000059 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000060 if [ ! -f result/`basename $$i` ] ; then \
61 echo New test file `basename $$i` ; \
62 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000063 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000064 echo Testing `basename $$i` ; \
65 $$DIR/tester $$i > result.`basename $$i` ; \
66 diff result/`basename $$i` result.`basename $$i` ; \
67 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
68 diff result.`basename $$i` result2.`basename $$i` ; \
69 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000070 fi ; fi ; done)
71
Daniel Veillard011b63c1999-06-02 17:44:04 +000072SVGtests : tester
73 @(DIR=`pwd`; cd $(srcdir) ; \
74 for i in test/SVG/* ; do \
75 if [ ! -d $$i ] ; then \
76 if [ ! -f result/SVG/`basename $$i` ] ; then \
77 echo New test file `basename $$i` ; \
78 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
79 else \
80 echo Testing `basename $$i` ; \
81 $$DIR/tester $$i > result.`basename $$i` ; \
82 diff result/SVG/`basename $$i` result.`basename $$i` ; \
83 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
84 diff result.`basename $$i` result2.`basename $$i` ; \
85 rm result.`basename $$i` result2.`basename $$i` ; \
86 fi ; fi ; done)
87
88SAXtests : testSAX
89 @(DIR=`pwd`; cd $(srcdir) ; \
90 for i in test/* ; do \
91 if [ ! -d $$i ] ; then \
92 if [ ! -f SAXresult/`basename $$i` ] ; then \
93 echo New test file `basename $$i` ; \
94 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
95 else \
96 echo Testing `basename $$i` ; \
97 $$DIR/testSAX $$i > result.`basename $$i` ; \
98 diff SAXresult/`basename $$i` result.`basename $$i` ; \
99 rm result.`basename $$i` ; \
100 fi ; fi ; done)
101
102#tests : tester
103# @(for i in $(srcdir)/test/* ; do \
104# if [ ! -d $$i ] ; then \
105# j=`echo $$i | sed -e 's,^.*/,,'`; \
106# if [ ! -f $(srcdir)/result/$$j ] ; then \
107# echo New test file $$j ; \
108# ./tester $$i > $(srcdir)/result/$$j ; \
109# else \
110# echo Testing $$j ; \
111# ./tester $$i > result.$$j ; \
112# diff $(srcdir)/result/$$j result.$$j ; \
113# rm result.$$j ; \
114# fi ; fi ; done)
115
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000116## Put `exec' in the name because this should be installed by
117## `install-exec', not `install-data'.
118
119confexecdir=$(libdir)
120confexec_DATA = xmlConf.sh
121
Daniel Veillard011b63c1999-06-02 17:44:04 +0000122EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000123
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000124dist-hook:
125 cp libxml.spec $(distdir)
126
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000127## We create xmlConf.sh here and not from configure because we want
128## to get the paths expanded correctly. Macros like srcdir are given
129## the value NONE in configure if the user doesn't specify them (this
130## is an autoconf feature, not a bug).
131
132xmlConf.sh: xmlConf.sh.in Makefile
133## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000134 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
135 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
136 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000137 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
138 && mv xmlConf.tmp xmlConf.sh