libexpat/expat/Makefile.in
Greg Stein 04d54677dc Add some cygwin fixes.
* Makefile.in:
  - from cygwin: add -no-undefined to the library link line

* conftools/get-version.sh: (new file)
  - script to extract the version number from expat.h

* configure.in:
  (some from the cygwin patch)
  - update the prereq to 2.52 instead of just 2.50
  - update the AC_INIT line to 2.52 standards: include the package
    name, version (with a lot of gunk to get this), and where to send
    bugs)
  - update the output file generation to 2.52 standards

* make-release.sh:
  - update to use the new get-version.sh script

* lib/expat.h:
  - from cygwin: add a little define for CYGWIN
2002-05-18 00:26:59 +00:00

173 lines
5.0 KiB
Makefile

################################################################
# Process this file with top-level configure script to produce Makefile
#
# Copyright 2000 Clark Cooper
#
# This file is part of EXPAT.
#
# EXPAT is free software; you can redistribute it and/or modify it
# under the terms of the License (based on the MIT/X license) contained
# in the file COPYING that comes with this distribution.
#
# EXPAT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN EXPAT.
#
# ---
# I started using automake, but
# 1) it seemed like overkill
# 2) I don't want all the GNU policies
# 3) I wanted more explicit control over what gets built
#
# So I'm doing my Makefile.in files manually. But a fair part is based
# on what I learned from perusing the Makefile.in's generated by automake,
# and the automake authors still get my kudos.
#
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
top_builddir = .
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
APIHEADER = expat.h
LIBRARY = libexpat.la
default: buildlib xmlwf/xmlwf
buildlib: lib/$(LIBRARY)
all: lib/$(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
clean:
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
find . -name core | xargs rm -f
distclean: clean
rm -f expat_config.h config.status config.log config.cache libtool
rm -f Makefile
extraclean: distclean
rm -f expat_config.h.in configure
rm -f conftools/config.guess conftools/config.sub
rm -f conftools/ltconfig conftools/ltmain.sh
check: tests/runtests
tests/runtests
install: xmlwf/xmlwf lib/$(LIBRARY) lib/$(APIHEADER)
$(mkinstalldirs) $(bindir) $(libdir) $(includedir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(bindir)/xmlwf
$(LIBTOOL) --mode=install $(INSTALL) lib/$(LIBRARY) $(libdir)/$(LIBRARY)
$(INSTALL_DATA) lib/$(APIHEADER) $(includedir)
$(INSTALL_DATA) doc/xmlwf.1 $(prefix)/man/man1
uninstall:
$(LIBTOOL) --mode=uninstall rm -f $(bindir)/xmlwf
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(LIBRARY)
rm -f $(includedir)/$(APIHEADER)
rm -f $(prefix)/man/man1/xmlwf.1
# for VPATH builds (invoked by configure)
mkdir-init:
@for d in lib xmlwf examples tests ; do \
(mkdir $$d 2> /dev/null || test 1) ; \
done
CC = @CC@
LIBTOOL = @LIBTOOL@
INCLUDES = -Ilib -I.
LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
### autoconf this?
LTFLAGS = --silent
COMPILE = $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) $(INCLUDES)
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
lib/$(LIBRARY): $(LIB_OBJS)
$(LINK_LIB) $(LIB_OBJS)
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
$(top_builddir)/expat_config.h
lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
$(top_builddir)/expat_config.h
lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
lib/ascii.h lib/asciitab.h lib/iasciitab.h lib/latin1tab.h \
lib/nametab.h lib/utf8tab.h lib/xmltok.h lib/xmltok_impl.h \
$(top_builddir)/expat_config.h
XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
xmlwf/xmlwf.o: xmlwf/xmlwf.c
xmlwf/xmlfile.o: xmlwf/xmlfile.c
xmlwf/codepage.o: xmlwf/codepage.c
xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
xmlwf/xmlwf: $(XMLWF_OBJS) lib/$(LIBRARY)
$(LINK_EXE) $(XMLWF_OBJS) lib/$(LIBRARY)
examples/elements.o: examples/elements.c
examples/elements: examples/elements.o lib/$(LIBRARY)
$(LINK_EXE) $< lib/$(LIBRARY)
examples/outline.o: examples/outline.c
examples/outline: examples/outline.o lib/$(LIBRARY)
$(LINK_EXE) $< lib/$(LIBRARY)
tests/chardata.o: tests/chardata.c tests/chardata.h
tests/runtests.o: tests/runtests.c tests/chardata.h
tests/runtests: tests/runtests.o tests/chardata.o lib/$(LIBRARY)
$(LINK_EXE) $^ -lcheck
tests/xmltest.zip:
cd tests && wget ftp://ftp.jclark.com/pub/xml/xmltest.zip
tests/xmltest: tests/xmltest.zip
cd tests && unzip -q xmltest.zip
run-xmltest: xmlwf/xmlwf tests/xmltest
tests/xmltest.sh
.SUFFIXES: .c .lo .o
.c.o:
$(COMPILE) -o $@ -c $<
.c.lo:
$(LTCOMPILE) -o $@ -c $<
.PHONY: buildlib all \
clean distclean extraclean maintainer-clean \
dist distdir \
install uninstall