blob: 0f239c3cec38024aba7a2b4e9b4b0434efb5114c [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 Veillardbe70ff71999-07-05 16:50:46 +00009noinst_PROGRAMS=tester testSAX testHTML
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 Veillardbaf4cd51998-10-27 22:56:57 +000024 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000025 tree.c \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000026 HTMLtree.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000027 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000028
Tom Tromeyc19653d1998-08-14 01:22:43 +000029xmlincdir = $(includedir)/gnome-xml
30xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000031 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000032 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000033 parser.h \
Daniel Veillard5233ffc1999-07-06 22:25:25 +000034 HTMLparser.h \
Daniel Veillard35925471999-02-25 08:46:07 +000035 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000036 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000037 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000038 tree.h \
Daniel Veillard14fff061999-06-22 21:49:07 +000039 xmlIO.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000040 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000041
Daniel Veillard0dc897e1998-07-26 04:12:22 +000042DEPS = $(top_builddir)/libxml.la
43LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000044
45tester_SOURCES=tester.c
46tester_LDFLAGS =
47tester_DEPENDENCIES = $(DEPS)
48tester_LDADD= $(LDADDS)
49
Daniel Veillard011b63c1999-06-02 17:44:04 +000050testSAX_SOURCES=testSAX.c
51testSAX_LDFLAGS =
52testSAX_DEPENDENCIES = $(DEPS)
53testSAX_LDADD= $(LDADDS)
54
Daniel Veillardbe70ff71999-07-05 16:50:46 +000055testHTML_SOURCES=testHTML.c
56testHTML_LDFLAGS =
57testHTML_DEPENDENCIES = $(DEPS)
58testHTML_LDADD= $(LDADDS)
59
Raja R Harinatha86c23e1999-03-05 22:14:01 +000060check-local: tests
61
Daniel Veillard011b63c1999-06-02 17:44:04 +000062testall : tests SVGtests SAXtests
63
Daniel Veillard82150d81999-07-07 07:32:15 +000064tests: HTMLtests XMLtests
65HTMLtests : testHTML
66 @(DIR=`pwd`; cd $(srcdir) ; \
67 for i in test/HTML/* ; do \
68 if [ ! -d $$i ] ; then \
69 if [ ! -f result/HTML/`basename $$i` ] ; then \
70 echo New test file `basename $$i` ; \
71 $$DIR/testHTML $$i > result/HTML/`basename $$i` ; \
72 else \
73 echo Testing `basename $$i` ; \
74 $$DIR/testHTML $$i > result.`basename $$i` ; \
75 diff result/HTML/`basename $$i` result.`basename $$i` ; \
76 $$DIR/testHTML result.`basename $$i` > result2.`basename $$i` ; \
77 diff result.`basename $$i` result2.`basename $$i` ; \
78 rm result.`basename $$i` result2.`basename $$i` ; \
79 fi ; fi ; done)
80
81XMLtests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000082 @(DIR=`pwd`; cd $(srcdir) ; \
83 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000084 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000085 if [ ! -f result/`basename $$i` ] ; then \
86 echo New test file `basename $$i` ; \
87 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000088 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000089 echo Testing `basename $$i` ; \
90 $$DIR/tester $$i > result.`basename $$i` ; \
91 diff result/`basename $$i` result.`basename $$i` ; \
92 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
93 diff result.`basename $$i` result2.`basename $$i` ; \
94 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000095 fi ; fi ; done)
96
Daniel Veillard011b63c1999-06-02 17:44:04 +000097SVGtests : tester
98 @(DIR=`pwd`; cd $(srcdir) ; \
99 for i in test/SVG/* ; do \
100 if [ ! -d $$i ] ; then \
101 if [ ! -f result/SVG/`basename $$i` ] ; then \
102 echo New test file `basename $$i` ; \
103 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
104 else \
105 echo Testing `basename $$i` ; \
106 $$DIR/tester $$i > result.`basename $$i` ; \
107 diff result/SVG/`basename $$i` result.`basename $$i` ; \
108 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
109 diff result.`basename $$i` result2.`basename $$i` ; \
110 rm result.`basename $$i` result2.`basename $$i` ; \
111 fi ; fi ; done)
112
113SAXtests : testSAX
114 @(DIR=`pwd`; cd $(srcdir) ; \
115 for i in test/* ; do \
116 if [ ! -d $$i ] ; then \
117 if [ ! -f SAXresult/`basename $$i` ] ; then \
118 echo New test file `basename $$i` ; \
119 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
120 else \
121 echo Testing `basename $$i` ; \
122 $$DIR/testSAX $$i > result.`basename $$i` ; \
123 diff SAXresult/`basename $$i` result.`basename $$i` ; \
124 rm result.`basename $$i` ; \
125 fi ; fi ; done)
126
127#tests : tester
128# @(for i in $(srcdir)/test/* ; do \
129# if [ ! -d $$i ] ; then \
130# j=`echo $$i | sed -e 's,^.*/,,'`; \
131# if [ ! -f $(srcdir)/result/$$j ] ; then \
132# echo New test file $$j ; \
133# ./tester $$i > $(srcdir)/result/$$j ; \
134# else \
135# echo Testing $$j ; \
136# ./tester $$i > result.$$j ; \
137# diff $(srcdir)/result/$$j result.$$j ; \
138# rm result.$$j ; \
139# fi ; fi ; done)
140
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000141## Put `exec' in the name because this should be installed by
142## `install-exec', not `install-data'.
143
144confexecdir=$(libdir)
145confexec_DATA = xmlConf.sh
146
Daniel Veillard011b63c1999-06-02 17:44:04 +0000147EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000148
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000149dist-hook:
150 cp libxml.spec $(distdir)
151
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000152## We create xmlConf.sh here and not from configure because we want
153## to get the paths expanded correctly. Macros like srcdir are given
154## the value NONE in configure if the user doesn't specify them (this
155## is an autoconf feature, not a bug).
156
157xmlConf.sh: xmlConf.sh.in Makefile
158## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000159 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
160 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
161 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000162 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
163 && mv xmlConf.tmp xmlConf.sh