Makefile.am revision 3166ab1a1443bbffc43ed760ed078bafa4ba5e46
1## Process this file with automake to produce Makefile.in
2
3SUBDIRS = doc example
4
5INCLUDES = -I@srcdir@ @CORBA_CFLAGS@ $(VERSION_FLAGS)
6
7VERSION_FLAGS = -DLIBXML_VERSION=\"@LIBXML_VERSION@\"
8
9noinst_PROGRAMS=tester testSAX testHTML
10
11bin_SCRIPTS=xml-config
12
13lib_LTLIBRARIES = libxml.la
14
15libxml_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
16
17libxml_la_SOURCES = \
18		SAX.c \
19		entities.c \
20		encoding.c \
21		error.c \
22		parser.c \
23		HTMLparser.c \
24		debugXML.c \
25		tree.c \
26		HTMLtree.c \
27		valid.c
28
29xmlincdir = $(includedir)/gnome-xml
30xmlinc_HEADERS = \
31		entities.h \
32		encoding.h \
33		parser.h \
34		HTMLparser.h \
35		parserInternals.h \
36		debugXML.h \
37		xml-error.h \
38		tree.h \
39		xmlIO.h \
40		valid.h
41
42DEPS = $(top_builddir)/libxml.la
43LDADDS = $(top_builddir)/libxml.la @Z_LIBS@
44
45tester_SOURCES=tester.c
46tester_LDFLAGS = 
47tester_DEPENDENCIES = $(DEPS)
48tester_LDADD= $(LDADDS)
49
50testSAX_SOURCES=testSAX.c
51testSAX_LDFLAGS = 
52testSAX_DEPENDENCIES = $(DEPS)
53testSAX_LDADD= $(LDADDS)
54
55testHTML_SOURCES=testHTML.c
56testHTML_LDFLAGS = 
57testHTML_DEPENDENCIES = $(DEPS)
58testHTML_LDADD= $(LDADDS)
59
60check-local: tests
61
62testall : tests SVGtests SAXtests
63
64tests: 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
82	@(DIR=`pwd`; cd $(srcdir) ;  \
83	  for i in test/* ; do \
84	  if [ ! -d $$i ] ; then \
85	  if [ ! -f result/`basename $$i` ] ; then \
86	      echo New test file `basename $$i` ; \
87	      $$DIR/tester $$i > result/`basename $$i` ; \
88	  else \
89	      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` ; \
95	  fi ; fi ; done)
96
97SVGtests : 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
141## 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
147EXTRA_DIST = xmlConf.sh.in libxml.spec.in test result SAXresult
148
149dist-hook:
150	cp libxml.spec $(distdir)
151
152## 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.
159	sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
160	    -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
161	    -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
162	      < $(srcdir)/xmlConf.sh.in > xmlConf.tmp \
163	  && mv xmlConf.tmp xmlConf.sh
164