Fix for bug #1990430.
[mirror-ossqm-expat.git] / Makefile.in
blobc15e62d8f62c350891b4fd60a2760e66f08a8ed0
1 ################################################################
2 # Process this file with top-level configure script to produce Makefile
4 # Copyright 2000 Clark Cooper
6 # This file is part of EXPAT.
8 # EXPAT is free software; you can redistribute it and/or modify it
9 # under the terms of the License (based on the MIT/X license) contained
10 # in the file COPYING that comes with this distribution.
12 # EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
17 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18 # SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
21 SHELL = @SHELL@
23 srcdir = @srcdir@
24 top_srcdir = @top_srcdir@
25 VPATH = @srcdir@
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
30 bindir = @bindir@
31 libdir = @libdir@
32 includedir = @includedir@
33 man1dir = @mandir@/man1
34 pkgconfigdir = $(libdir)/pkgconfig
36 top_builddir = .
39 INSTALL = @INSTALL@
40 INSTALL_PROGRAM = @INSTALL_PROGRAM@
41 INSTALL_DATA = @INSTALL_DATA@
42 mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
44 MANFILE = $(srcdir)/doc/xmlwf.1
45 APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
46 LIBRARY = libexpat.la
48 DESTDIR = $(INSTALL_ROOT)
50 default: buildlib xmlwf/xmlwf
52 buildlib: $(LIBRARY) expat.pc
54 all: $(LIBRARY) expat.pc xmlwf/xmlwf examples/elements examples/outline
56 clean:
57 cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
58 cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
59 cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
60 cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
61 cd tests && rm -f chardata.o minicheck.o
62 rm -rf .libs libexpat.la
63 rm -f examples/core tests/core xmlwf/core
65 clobber: clean
67 distclean: clean
68 rm -f expat_config.h config.status config.log config.cache libtool
69 rm -f Makefile expat.pc
71 extraclean: distclean
72 rm -f expat_config.h.in configure
73 rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
75 check: tests/runtests tests/runtestspp
76 tests/runtests
77 tests/runtestspp
79 install: xmlwf/xmlwf installlib
80 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
81 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
82 $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
84 installlib: $(LIBRARY) $(APIHEADER) expat.pc
85 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
86 $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
87 for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
88 $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
90 uninstall: uninstalllib
91 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
92 rm -f $(DESTDIR)$(man1dir)/xmlwf.1
94 uninstalllib:
95 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
96 rm -f $(DESTDIR)$(includedir)/expat.h
97 rm -f $(DESTDIR)$(includedir)/expat_external.h
98 rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
100 # for VPATH builds (invoked by configure)
101 mkdir-init:
102 @for d in lib xmlwf examples tests ; do \
103 (mkdir $$d 2> /dev/null || test 1) ; \
104 done
106 CC = @CC@
107 CXX = @CXX@
108 LIBTOOL = @LIBTOOL@
110 INCLUDES = -I$(srcdir)/lib -I.
111 LDFLAGS = @LDFLAGS@
112 CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
113 CFLAGS = @CFLAGS@
114 CXXFLAGS = @CXXFLAGS@
115 VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
117 ### autoconf this?
118 LTFLAGS = --silent
120 COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
121 CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
122 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
123 LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
124 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
125 LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
127 LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
128 $(LIBRARY): $(LIB_OBJS)
129 $(LINK_LIB) $(LIB_OBJS)
131 expat.pc: $(top_builddir)/config.status
132 cd $(top_builddir) && $(SHELL) ./config.status $@
134 lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
135 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
137 lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
138 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
140 lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
141 lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
142 lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
143 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
146 XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
147 xmlwf/xmlwf.o: xmlwf/xmlwf.c
148 xmlwf/xmlfile.o: xmlwf/xmlfile.c
149 xmlwf/codepage.o: xmlwf/codepage.c
150 xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
151 xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
152 $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
154 examples/elements.o: examples/elements.c
155 examples/elements: examples/elements.o $(LIBRARY)
156 $(LINK_EXE) $< $(LIBRARY)
158 examples/outline.o: examples/outline.c
159 examples/outline: examples/outline.o $(LIBRARY)
160 $(LINK_EXE) $< $(LIBRARY)
162 tests/chardata.o: tests/chardata.c tests/chardata.h
163 tests/minicheck.o: tests/minicheck.c tests/minicheck.h
164 tests/runtests.o: tests/runtests.c tests/chardata.h
165 tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
166 $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
167 tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
168 tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
169 $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
171 tests/xmlts.zip:
172 wget --output-document=tests/xmlts.zip \
173 http://www.w3.org/XML/Test/xmlts20020606.zip
175 tests/XML-Test-Suite: tests/xmlts.zip
176 cd tests && unzip -q xmlts.zip
178 run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
179 tests/xmltest.sh
181 .SUFFIXES: .c .cpp .lo .o
183 .cpp.o:
184 $(CXXCOMPILE) -o $@ -c $<
185 .c.o:
186 $(COMPILE) -o $@ -c $<
187 .c.lo:
188 $(LTCOMPILE) -o $@ -c $<
190 .PHONY: buildlib all \
191 clean distclean extraclean maintainer-clean \
192 dist distdir \
193 install uninstall