(metux) Corrected permissions for installed expat.la file
[mirror-ossqm-expat.git] / Makefile.in
blobbce80f647cf3d07f4f78f4833421cf5e6d57651c
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
43 STRIP = @STRIP@
45 MANFILE = $(srcdir)/doc/xmlwf.1
46 APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
47 LIBRARY = libexpat.la
49 DESTDIR = $(INSTALL_ROOT)
51 default: buildlib xmlwf/xmlwf
53 buildlib: $(LIBRARY) expat.pc
55 all: $(LIBRARY) expat.pc xmlwf/xmlwf examples/elements examples/outline
57 clean:
58 cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
59 cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
60 cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
61 cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
62 cd tests && rm -f chardata.o minicheck.o
63 rm -rf .libs libexpat.la
64 rm -f examples/core tests/core xmlwf/core
66 clobber: clean
68 distclean: clean
69 rm -f expat_config.h config.status config.log config.cache libtool
70 rm -f Makefile expat.pc
72 extraclean: distclean
73 rm -f expat_config.h.in configure
74 rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
76 check: tests/runtests tests/runtestspp
77 tests/runtests
78 tests/runtestspp
80 install: xmlwf/xmlwf installlib
81 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
82 $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) --strip-program=$(STRIP) -s xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
83 $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
85 installlib: $(LIBRARY) $(APIHEADER) expat.pc
86 $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
87 $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
88 chmod ugo-x $(DESTDIR)$(libdir)/$(LIBRARY)
89 for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
90 $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
92 uninstall: uninstalllib
93 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
94 rm -f $(DESTDIR)$(man1dir)/xmlwf.1
96 uninstalllib:
97 $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
98 rm -f $(DESTDIR)$(includedir)/expat.h
99 rm -f $(DESTDIR)$(includedir)/expat_external.h
100 rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
102 # for VPATH builds (invoked by configure)
103 mkdir-init:
104 @for d in lib xmlwf examples tests ; do \
105 (mkdir $$d 2> /dev/null || test 1) ; \
106 done
108 CC = @CC@
109 CXX = @CXX@
110 LIBTOOL = @LIBTOOL@
112 INCLUDES = -I$(srcdir)/lib -I.
113 LDFLAGS = @LDFLAGS@
114 CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
115 CFLAGS = @CFLAGS@
116 CXXFLAGS = @CXXFLAGS@
117 VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
119 ### autoconf this?
120 LTFLAGS = --silent
122 COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
123 CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
124 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
125 LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
126 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
127 LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
129 LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
130 $(LIBRARY): $(LIB_OBJS)
131 $(LINK_LIB) $(LIB_OBJS)
133 expat.pc: $(top_builddir)/config.status
134 cd $(top_builddir) && $(SHELL) ./config.status $@
136 lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
137 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
139 lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
140 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
142 lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
143 lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
144 lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
145 $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
148 XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
149 xmlwf/xmlwf.o: xmlwf/xmlwf.c
150 xmlwf/xmlfile.o: xmlwf/xmlfile.c
151 xmlwf/codepage.o: xmlwf/codepage.c
152 xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
153 xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
154 $(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
156 examples/elements.o: examples/elements.c
157 examples/elements: examples/elements.o $(LIBRARY)
158 $(LINK_EXE) $< $(LIBRARY)
160 examples/outline.o: examples/outline.c
161 examples/outline: examples/outline.o $(LIBRARY)
162 $(LINK_EXE) $< $(LIBRARY)
164 tests/chardata.o: tests/chardata.c tests/chardata.h
165 tests/minicheck.o: tests/minicheck.c tests/minicheck.h
166 tests/runtests.o: tests/runtests.c tests/chardata.h
167 tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
168 $(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
169 tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
170 tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
171 $(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
173 tests/xmlts.zip:
174 wget --output-document=tests/xmlts.zip \
175 http://www.w3.org/XML/Test/xmlts20020606.zip
177 tests/XML-Test-Suite: tests/xmlts.zip
178 cd tests && unzip -q xmlts.zip
180 run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
181 tests/xmltest.sh
183 .SUFFIXES: .c .cpp .lo .o
185 .cpp.o:
186 $(CXXCOMPILE) -o $@ -c $<
187 .c.o:
188 $(COMPILE) -o $@ -c $<
189 .c.lo:
190 $(LTCOMPILE) -o $@ -c $<
192 .PHONY: buildlib all \
193 clean distclean extraclean maintainer-clean \
194 dist distdir \
195 install uninstall