blob: 75e753426e2dd3367d93d84d6ecf6e9fb11505e2 [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 Veillard27fb0751998-10-17 06:47:46 +00005INCLUDES = -I@srcdir@ @CORBA_CFLAGS@
6
Daniel Veillard011b63c1999-06-02 17:44:04 +00007noinst_PROGRAMS=tester testSAX
Daniel Veillard01791d51998-07-24 19:24:09 +00008
Daniel Veillarda6e1d121998-10-04 14:41:05 +00009bin_SCRIPTS=xml-config
10
Daniel Veillard0dc897e1998-07-26 04:12:22 +000011lib_LTLIBRARIES = libxml.la
Daniel Veillard01791d51998-07-24 19:24:09 +000012
Daniel Veillard0dc897e1998-07-26 04:12:22 +000013libxml_la_SOURCES = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000014 SAX.c \
15 entities.c \
Daniel Veillard891e4041998-10-19 00:43:02 +000016 encoding.c \
Daniel Veillard260a68f1998-08-13 03:39:55 +000017 error.c \
18 parser.c \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000019 debugXML.c \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000020 tree.c \
21 valid.c
Daniel Veillard260a68f1998-08-13 03:39:55 +000022
Tom Tromeyc19653d1998-08-14 01:22:43 +000023xmlincdir = $(includedir)/gnome-xml
24xmlinc_HEADERS = \
Daniel Veillard260a68f1998-08-13 03:39:55 +000025 entities.h \
Daniel Veillard891e4041998-10-19 00:43:02 +000026 encoding.h \
Daniel Veillard260a68f1998-08-13 03:39:55 +000027 parser.h \
Daniel Veillard35925471999-02-25 08:46:07 +000028 parserInternals.h \
Daniel Veillardbaf4cd51998-10-27 22:56:57 +000029 debugXML.h \
Daniel Veillardd109e371999-03-05 06:26:45 +000030 xml-error.h \
Daniel Veillard39a1f9a1999-01-17 19:11:59 +000031 tree.h \
32 valid.h
Daniel Veillard01791d51998-07-24 19:24:09 +000033
Daniel Veillard0dc897e1998-07-26 04:12:22 +000034DEPS = $(top_builddir)/libxml.la
35LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
Daniel Veillard01791d51998-07-24 19:24:09 +000036
37tester_SOURCES=tester.c
38tester_LDFLAGS =
39tester_DEPENDENCIES = $(DEPS)
40tester_LDADD= $(LDADDS)
41
Daniel Veillard011b63c1999-06-02 17:44:04 +000042testSAX_SOURCES=testSAX.c
43testSAX_LDFLAGS =
44testSAX_DEPENDENCIES = $(DEPS)
45testSAX_LDADD= $(LDADDS)
46
Raja R Harinatha86c23e1999-03-05 22:14:01 +000047check-local: tests
48
Daniel Veillard011b63c1999-06-02 17:44:04 +000049testall : tests SVGtests SAXtests
50
Daniel Veillard01791d51998-07-24 19:24:09 +000051tests : tester
Daniel Veillard011b63c1999-06-02 17:44:04 +000052 @(DIR=`pwd`; cd $(srcdir) ; \
53 for i in test/* ; do \
Daniel Veillard01791d51998-07-24 19:24:09 +000054 if [ ! -d $$i ] ; then \
Daniel Veillard011b63c1999-06-02 17:44:04 +000055 if [ ! -f result/`basename $$i` ] ; then \
56 echo New test file `basename $$i` ; \
57 $$DIR/tester $$i > result/`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000058 else \
Daniel Veillard011b63c1999-06-02 17:44:04 +000059 echo Testing `basename $$i` ; \
60 $$DIR/tester $$i > result.`basename $$i` ; \
61 diff result/`basename $$i` result.`basename $$i` ; \
62 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
63 diff result.`basename $$i` result2.`basename $$i` ; \
64 rm result.`basename $$i` result2.`basename $$i` ; \
Daniel Veillard01791d51998-07-24 19:24:09 +000065 fi ; fi ; done)
66
Daniel Veillard011b63c1999-06-02 17:44:04 +000067SVGtests : tester
68 @(DIR=`pwd`; cd $(srcdir) ; \
69 for i in test/SVG/* ; do \
70 if [ ! -d $$i ] ; then \
71 if [ ! -f result/SVG/`basename $$i` ] ; then \
72 echo New test file `basename $$i` ; \
73 $$DIR/tester $$i > result/SVG/`basename $$i` ; \
74 else \
75 echo Testing `basename $$i` ; \
76 $$DIR/tester $$i > result.`basename $$i` ; \
77 diff result/SVG/`basename $$i` result.`basename $$i` ; \
78 $$DIR/tester result.`basename $$i` > result2.`basename $$i` ; \
79 diff result.`basename $$i` result2.`basename $$i` ; \
80 rm result.`basename $$i` result2.`basename $$i` ; \
81 fi ; fi ; done)
82
83SAXtests : testSAX
84 @(DIR=`pwd`; cd $(srcdir) ; \
85 for i in test/* ; do \
86 if [ ! -d $$i ] ; then \
87 if [ ! -f SAXresult/`basename $$i` ] ; then \
88 echo New test file `basename $$i` ; \
89 $$DIR/testSAX $$i > SAXresult/`basename $$i` ; \
90 else \
91 echo Testing `basename $$i` ; \
92 $$DIR/testSAX $$i > result.`basename $$i` ; \
93 diff SAXresult/`basename $$i` result.`basename $$i` ; \
94 rm result.`basename $$i` ; \
95 fi ; fi ; done)
96
97#tests : tester
98# @(for i in $(srcdir)/test/* ; do \
99# if [ ! -d $$i ] ; then \
100# j=`echo $$i | sed -e 's,^.*/,,'`; \
101# if [ ! -f $(srcdir)/result/$$j ] ; then \
102# echo New test file $$j ; \
103# ./tester $$i > $(srcdir)/result/$$j ; \
104# else \
105# echo Testing $$j ; \
106# ./tester $$i > result.$$j ; \
107# diff $(srcdir)/result/$$j result.$$j ; \
108# rm result.$$j ; \
109# fi ; fi ; done)
110
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000111## Put `exec' in the name because this should be installed by
112## `install-exec', not `install-data'.
113
114confexecdir=$(libdir)
115confexec_DATA = xmlConf.sh
116
Daniel Veillard011b63c1999-06-02 17:44:04 +0000117EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000118
Michael Fulbright63dc42c1999-02-21 21:20:12 +0000119dist-hook:
120 cp libxml.spec $(distdir)
121
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000122## We create xmlConf.sh here and not from configure because we want
123## to get the paths expanded correctly. Macros like srcdir are given
124## the value NONE in configure if the user doesn't specify them (this
125## is an autoconf feature, not a bug).
126
127xmlConf.sh: xmlConf.sh.in Makefile
128## Use sed and then mv to avoid problems if the user interrupts.
Miguel de Icaza60681bd1998-09-30 19:28:59 +0000129 sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
130 -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
131 -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
Arturo Espinosa15fe6e71998-09-07 17:27:57 +0000132 < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
133 && mv xmlConf.tmp xmlConf.sh