blob: e06d4640033efd419d8a026541972c100cb9785e [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 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 Veillard01791d51998-07-24 19:24:09 +000064tests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000065 @(DIR=`pwd`; cd $(srcdir) ; \
66 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000067 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000068 if [ ! -f result/`basename $$i` ] ; then \
69 echo New test file `basename $$i` ; \
70 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000071 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000072 echo Testing `basename $$i` ; \
73 $$DIR/tester $$i > result.`basename $$i` ; \
74 diff result/`basename $$i` result.`basename $$i` ; \
75 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
76 diff result.`basename $$i` result2.`basename $$i` ; \
77 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000078 fi ; fi ; done)
79
Daniel Veillard011b63c1999-06-02 17:44:04 +000080SVGtests : tester
81 @(DIR=`pwd`; cd $(srcdir) ; \
82 for i in test/SVG/* ; do \
83 if [ ! -d $$i ] ; then \
84 if [ ! -f result/SVG/`basename $$i` ] ; then \
85 echo New test file `basename $$i` ; \
86 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
87 else \
88 echo Testing `basename $$i` ; \
89 $$DIR/tester $$i > result.`basename $$i` ; \
90 diff result/SVG/`basename $$i` result.`basename $$i` ; \
91 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
92 diff result.`basename $$i` result2.`basename $$i` ; \
93 rm result.`basename $$i` result2.`basename $$i` ; \
94 fi ; fi ; done)
95
96SAXtests : testSAX
97 @(DIR=`pwd`; cd $(srcdir) ; \
98 for i in test/* ; do \
99 if [ ! -d $$i ] ; then \
100 if [ ! -f SAXresult/`basename $$i` ] ; then \
101 echo New test file `basename $$i` ; \
102 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
103 else \
104 echo Testing `basename $$i` ; \
105 $$DIR/testSAX $$i > result.`basename $$i` ; \
106 diff SAXresult/`basename $$i` result.`basename $$i` ; \
107 rm result.`basename $$i` ; \
108 fi ; fi ; done)
109
110#tests : tester
111# @(for i in $(srcdir)/test/* ; do \
112# if [ ! -d $$i ] ; then \
113# j=`echo $$i | sed -e 's,^.*/,,'`; \
114# if [ ! -f $(srcdir)/result/$$j ] ; then \
115# echo New test file $$j ; \
116# ./tester $$i > $(srcdir)/result/$$j ; \
117# else \
118# echo Testing $$j ; \
119# ./tester $$i > result.$$j ; \
120# diff $(srcdir)/result/$$j result.$$j ; \
121# rm result.$$j ; \
122# fi ; fi ; done)
123
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000124## Put `exec' in the name because this should be installed by
125## `install-exec', not `install-data'.
126
127confexecdir=$(libdir)
128confexec_DATA = xmlConf.sh
129
Daniel Veillard011b63c1999-06-02 17:44:04 +0000130EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000131
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000132dist-hook:
133 cp libxml.spec $(distdir)
134
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000135## We create xmlConf.sh here and not from configure because we want
136## to get the paths expanded correctly. Macros like srcdir are given
137## the value NONE in configure if the user doesn't specify them (this
138## is an autoconf feature, not a bug).
139
140xmlConf.sh: xmlConf.sh.in Makefile
141## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000142 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
143 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
144 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000145 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
146 && mv xmlConf.tmp xmlConf.sh