blob: 294bcde2bc5d4b824afc3e0d10ff68a2292f770e [file] [log] [blame]
Daniel Veillard01791d51998-07-24 19:24:09 +00001## Process this file with automake to produce Makefile.in
2
Daniel Veillardbe9e5951999-07-12 09:16:45 +00003SUBDIRS = doc
Daniel Veillard19b858c1999-02-06 18:12:01 +00004
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 Veillard1566d3a1999-07-15 14:24:29 +00009noinst_PROGRAMS=tester testSAX testHTML testXPath
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 Veillardbe70ff71999-07-05 16:50:46 +000023 HTMLparser.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000024 HTMLtree.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000025 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000026 tree.c \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000027 xpath.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000028 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000029
Tom Tromeyc19653d1998-08-14 01:22:43 +000030xmlincdir = $(includedir)/gnome-xml
31xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000032 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000033 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000034 parser.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000035 HTMLparser.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000036 HTMLtree.h \
Daniel Veillard35925471999-02-25 08:46:07 +000037 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000038 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000039 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000040 tree.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000041 xpath.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000042 xmlIO.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000043 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000044
Daniel Veillard0dc897e1998-07-26 04:12:22 +000045DEPS = $(top_builddir)/libxml.la
46LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000047
48tester_SOURCES=tester.c
49tester_LDFLAGS =
50tester_DEPENDENCIES = $(DEPS)
51tester_LDADD= $(LDADDS)
52
Daniel Veillard011b63c1999-06-02 17:44:04 +000053testSAX_SOURCES=testSAX.c
54testSAX_LDFLAGS =
55testSAX_DEPENDENCIES = $(DEPS)
56testSAX_LDADD= $(LDADDS)
57
Daniel Veillardbe70ff71999-07-05 16:50:46 +000058testHTML_SOURCES=testHTML.c
59testHTML_LDFLAGS =
60testHTML_DEPENDENCIES = $(DEPS)
61testHTML_LDADD= $(LDADDS)
62
Daniel Veillard1566d3a1999-07-15 14:24:29 +000063testXPath_SOURCES=testXPath.c
64testXPath_LDFLAGS =
65testXPath_DEPENDENCIES = $(DEPS)
66testXPath_LDADD= $(LDADDS)
67
Raja R Harinatha86c23e1999-03-05 22:14:01 +000068check-local: tests
69
Daniel Veillard1566d3a1999-07-15 14:24:29 +000070testall : tests SVGtests SAXtests XPathtests
Daniel Veillard011b63c1999-06-02 17:44:04 +000071
Daniel Veillard82150d81999-07-07 07:32:15 +000072tests: HTMLtests XMLtests
73HTMLtests : testHTML
74 @(DIR=`pwd`; cd $(srcdir) ; \
75 for i in test/HTML/* ; do \
76 if [ ! -d $$i ] ; then \
77 if [ ! -f result/HTML/`basename $$i` ] ; then \
78 echo New test file `basename $$i` ; \
79 $$DIR/testHTML $$i > result/HTML/`basename $$i` ; \
80 else \
81 echo Testing `basename $$i` ; \
82 $$DIR/testHTML $$i > result.`basename $$i` ; \
83 diff result/HTML/`basename $$i` result.`basename $$i` ; \
84 $$DIR/testHTML result.`basename $$i` > result2.`basename $$i` ; \
85 diff result.`basename $$i` result2.`basename $$i` ; \
86 rm result.`basename $$i` result2.`basename $$i` ; \
87 fi ; fi ; done)
88
89XMLtests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000090 @(DIR=`pwd`; cd $(srcdir) ; \
91 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000092 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000093 if [ ! -f result/`basename $$i` ] ; then \
94 echo New test file `basename $$i` ; \
95 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000096 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000097 echo Testing `basename $$i` ; \
98 $$DIR/tester $$i > result.`basename $$i` ; \
99 diff result/`basename $$i` result.`basename $$i` ; \
100 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
101 diff result.`basename $$i` result2.`basename $$i` ; \
102 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000103 fi ; fi ; done)
104
Daniel Veillard011b63c1999-06-02 17:44:04 +0000105SVGtests : tester
106 @(DIR=`pwd`; cd $(srcdir) ; \
107 for i in test/SVG/* ; do \
108 if [ ! -d $$i ] ; then \
109 if [ ! -f result/SVG/`basename $$i` ] ; then \
110 echo New test file `basename $$i` ; \
111 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
112 else \
113 echo Testing `basename $$i` ; \
114 $$DIR/tester $$i > result.`basename $$i` ; \
115 diff result/SVG/`basename $$i` result.`basename $$i` ; \
116 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
117 diff result.`basename $$i` result2.`basename $$i` ; \
118 rm result.`basename $$i` result2.`basename $$i` ; \
119 fi ; fi ; done)
120
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000121XPathtests : testXPath
122 @(DIR=`pwd`; cd $(srcdir) ; \
123 for i in test/XPath/expr/* ; do \
124 if [ ! -d $$i ] ; then \
125 if [ ! -f result/XPath/expr/`basename $$i` ] ; then \
126 echo New test file `basename $$i` ; \
127 $$DIR/testXPath -f --expr $$i > result/XPath/expr/`basename $$i` ; \
128 else \
129 echo Testing `basename $$i` ; \
130 $$DIR/testXPath -f --expr $$i > result.`basename $$i` ; \
131 diff result/XPath/expr/`basename $$i` result.`basename $$i` ; \
132 rm result.`basename $$i` ; \
133 fi ; fi ; done)
134 @(DIR=`pwd`; cd $(srcdir) ; \
135 for i in test/XPath/docs/* ; do \
136 if [ ! -d $$i ] ; then \
137 name=`basename $$i`; \
138 for j in test/XPath/tests/$$name* ; do \
139 if [ ! -d $$j ] ; then \
140 if [ ! -f result/XPath/tests/`basename $$j` ] ; then \
141 echo New test file `basename $$i` ; \
142 $$DIR/testXPath -f -i $$i $$j > result/XPath/tests/`basename $$j` ; \
143 else \
144 echo Testing `basename $$j` ; \
145 $$DIR/testXPath -f -i $$i $$j > result.`basename $$j` ; \
146 diff result/XPath/tests/`basename $$j` result.`basename $$j` ; \
147 rm result.`basename $$j` ; \
148 fi ; fi ; done ; fi ; done)
149
Daniel Veillard011b63c1999-06-02 17:44:04 +0000150SAXtests : testSAX
151 @(DIR=`pwd`; cd $(srcdir) ; \
152 for i in test/* ; do \
153 if [ ! -d $$i ] ; then \
154 if [ ! -f SAXresult/`basename $$i` ] ; then \
155 echo New test file `basename $$i` ; \
156 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
157 else \
158 echo Testing `basename $$i` ; \
159 $$DIR/testSAX $$i > result.`basename $$i` ; \
160 diff SAXresult/`basename $$i` result.`basename $$i` ; \
161 rm result.`basename $$i` ; \
162 fi ; fi ; done)
163
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000164## Put `exec' in the name because this should be installed by
165## `install-exec', not `install-data'.
166
167confexecdir=$(libdir)
168confexec_DATA = xmlConf.sh
169
Daniel Veillard011b63c1999-06-02 17:44:04 +0000170EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000171
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000172dist-hook:
173 cp libxml.spec $(distdir)
174
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000175## We create xmlConf.sh here and not from configure because we want
176## to get the paths expanded correctly. Macros like srcdir are given
177## the value NONE in configure if the user doesn't specify them (this
178## is an autoconf feature, not a bug).
179
180xmlConf.sh: xmlConf.sh.in Makefile
181## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000182 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
183 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
184 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000185 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
186 && mv xmlConf.tmp xmlConf.sh