blob: 08247e22c32df940dcc075069f51eee7069aa38a [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 Veillarde2d034d1999-07-27 19:52:06 +000028 xmlIO.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000029 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000030
Tom Tromeyc19653d1998-08-14 01:22:43 +000031xmlincdir = $(includedir)/gnome-xml
32xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000033 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000034 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000035 parser.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000036 HTMLparser.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000037 HTMLtree.h \
Daniel Veillard35925471999-02-25 08:46:07 +000038 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000039 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000040 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000041 tree.h \
Daniel Veillard1566d3a1999-07-15 14:24:29 +000042 xpath.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000043 xmlIO.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000044 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000045
Daniel Veillard0dc897e1998-07-26 04:12:22 +000046DEPS = $(top_builddir)/libxml.la
47LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000048
49tester_SOURCES=tester.c
50tester_LDFLAGS =
51tester_DEPENDENCIES = $(DEPS)
52tester_LDADD= $(LDADDS)
53
Daniel Veillard011b63c1999-06-02 17:44:04 +000054testSAX_SOURCES=testSAX.c
55testSAX_LDFLAGS =
56testSAX_DEPENDENCIES = $(DEPS)
57testSAX_LDADD= $(LDADDS)
58
Daniel Veillardbe70ff71999-07-05 16:50:46 +000059testHTML_SOURCES=testHTML.c
60testHTML_LDFLAGS =
61testHTML_DEPENDENCIES = $(DEPS)
62testHTML_LDADD= $(LDADDS)
63
Daniel Veillard1566d3a1999-07-15 14:24:29 +000064testXPath_SOURCES=testXPath.c
65testXPath_LDFLAGS =
66testXPath_DEPENDENCIES = $(DEPS)
67testXPath_LDADD= $(LDADDS)
68
Raja R Harinatha86c23e1999-03-05 22:14:01 +000069check-local: tests
70
Daniel Veillard1566d3a1999-07-15 14:24:29 +000071testall : tests SVGtests SAXtests XPathtests
Daniel Veillard011b63c1999-06-02 17:44:04 +000072
Daniel Veillard82150d81999-07-07 07:32:15 +000073tests: HTMLtests XMLtests
74HTMLtests : testHTML
75 @(DIR=`pwd`; cd $(srcdir) ; \
76 for i in test/HTML/* ; do \
77 if [ ! -d $$i ] ; then \
78 if [ ! -f result/HTML/`basename $$i` ] ; then \
79 echo New test file `basename $$i` ; \
80 $$DIR/testHTML $$i > result/HTML/`basename $$i` ; \
81 else \
82 echo Testing `basename $$i` ; \
83 $$DIR/testHTML $$i > result.`basename $$i` ; \
84 diff result/HTML/`basename $$i` result.`basename $$i` ; \
85 $$DIR/testHTML result.`basename $$i` > result2.`basename $$i` ; \
86 diff result.`basename $$i` result2.`basename $$i` ; \
87 rm result.`basename $$i` result2.`basename $$i` ; \
88 fi ; fi ; done)
89
90XMLtests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000091 @(DIR=`pwd`; cd $(srcdir) ; \
92 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000093 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000094 if [ ! -f result/`basename $$i` ] ; then \
95 echo New test file `basename $$i` ; \
96 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000097 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000098 echo Testing `basename $$i` ; \
99 $$DIR/tester $$i > result.`basename $$i` ; \
100 diff result/`basename $$i` result.`basename $$i` ; \
101 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
102 diff result.`basename $$i` result2.`basename $$i` ; \
103 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +0000104 fi ; fi ; done)
105
Daniel Veillard011b63c1999-06-02 17:44:04 +0000106SVGtests : tester
107 @(DIR=`pwd`; cd $(srcdir) ; \
108 for i in test/SVG/* ; do \
109 if [ ! -d $$i ] ; then \
110 if [ ! -f result/SVG/`basename $$i` ] ; then \
111 echo New test file `basename $$i` ; \
112 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
113 else \
114 echo Testing `basename $$i` ; \
115 $$DIR/tester $$i > result.`basename $$i` ; \
116 diff result/SVG/`basename $$i` result.`basename $$i` ; \
117 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
118 diff result.`basename $$i` result2.`basename $$i` ; \
119 rm result.`basename $$i` result2.`basename $$i` ; \
120 fi ; fi ; done)
121
Daniel Veillard1566d3a1999-07-15 14:24:29 +0000122XPathtests : testXPath
123 @(DIR=`pwd`; cd $(srcdir) ; \
124 for i in test/XPath/expr/* ; do \
125 if [ ! -d $$i ] ; then \
126 if [ ! -f result/XPath/expr/`basename $$i` ] ; then \
127 echo New test file `basename $$i` ; \
128 $$DIR/testXPath -f --expr $$i > result/XPath/expr/`basename $$i` ; \
129 else \
130 echo Testing `basename $$i` ; \
131 $$DIR/testXPath -f --expr $$i > result.`basename $$i` ; \
132 diff result/XPath/expr/`basename $$i` result.`basename $$i` ; \
133 rm result.`basename $$i` ; \
134 fi ; fi ; done)
135 @(DIR=`pwd`; cd $(srcdir) ; \
136 for i in test/XPath/docs/* ; do \
137 if [ ! -d $$i ] ; then \
138 name=`basename $$i`; \
139 for j in test/XPath/tests/$$name* ; do \
140 if [ ! -d $$j ] ; then \
141 if [ ! -f result/XPath/tests/`basename $$j` ] ; then \
142 echo New test file `basename $$i` ; \
143 $$DIR/testXPath -f -i $$i $$j > result/XPath/tests/`basename $$j` ; \
144 else \
145 echo Testing `basename $$j` ; \
146 $$DIR/testXPath -f -i $$i $$j > result.`basename $$j` ; \
147 diff result/XPath/tests/`basename $$j` result.`basename $$j` ; \
148 rm result.`basename $$j` ; \
149 fi ; fi ; done ; fi ; done)
150
Daniel Veillard011b63c1999-06-02 17:44:04 +0000151SAXtests : testSAX
152 @(DIR=`pwd`; cd $(srcdir) ; \
153 for i in test/* ; do \
154 if [ ! -d $$i ] ; then \
155 if [ ! -f SAXresult/`basename $$i` ] ; then \
156 echo New test file `basename $$i` ; \
157 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
158 else \
159 echo Testing `basename $$i` ; \
160 $$DIR/testSAX $$i > result.`basename $$i` ; \
161 diff SAXresult/`basename $$i` result.`basename $$i` ; \
162 rm result.`basename $$i` ; \
163 fi ; fi ; done)
164
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000165## Put `exec' in the name because this should be installed by
166## `install-exec', not `install-data'.
167
168confexecdir=$(libdir)
169confexec_DATA = xmlConf.sh
170
Daniel Veillard15b75af1999-07-26 16:42:37 +0000171EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult example/Makefile.am \
172 example/gjobread.c example/gjobs.xml
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000173
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000174dist-hook:
175 cp libxml.spec $(distdir)
176
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000177## We create xmlConf.sh here and not from configure because we want
178## to get the paths expanded correctly. Macros like srcdir are given
179## the value NONE in configure if the user doesn't specify them (this
180## is an autoconf feature, not a bug).
181
182xmlConf.sh: xmlConf.sh.in Makefile
183## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000184 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
185 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
186 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000187 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
188 && mv xmlConf.tmp xmlConf.sh