2000-09-18 12:26:23 -04:00
|
|
|
################################################################
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
|
|
|
SHELL = @SHELL@
|
|
|
|
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2000-09-18 12:26:23 -04:00
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
2003-11-02 03:21:30 -05:00
|
|
|
man1dir = @mandir@/man1
|
2007-09-03 13:26:20 -04:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
2000-09-18 12:26:23 -04:00
|
|
|
|
|
|
|
top_builddir = .
|
|
|
|
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
2001-08-23 05:24:45 -04:00
|
|
|
mkinstalldirs = $(SHELL) $(top_srcdir)/conftools/mkinstalldirs
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
MANFILE = $(srcdir)/doc/xmlwf.1
|
2016-03-02 12:06:41 -05:00
|
|
|
APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h expat_config.h
|
2001-08-23 05:24:45 -04:00
|
|
|
LIBRARY = libexpat.la
|
|
|
|
|
2007-05-09 14:38:50 -04:00
|
|
|
DESTDIR = $(INSTALL_ROOT)
|
2001-08-23 05:24:45 -04:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
default: buildlib xmlwf/xmlwf@EXEEXT@
|
2001-02-28 23:28:27 -05:00
|
|
|
|
2007-09-03 13:26:20 -04:00
|
|
|
buildlib: $(LIBRARY) expat.pc
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2016-05-06 14:54:50 -04:00
|
|
|
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline $(MANFILE)
|
2000-09-18 12:26:23 -04:00
|
|
|
|
|
|
|
clean:
|
2012-02-20 21:50:08 -05:00
|
|
|
cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
|
|
|
cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
|
|
|
cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
|
2017-06-04 11:25:23 -04:00
|
|
|
cd tests && rm -rf .libs runtests@EXEEXT@ runtests.@OBJEXT@ runtestspp@EXEEXT@ runtestspp.@OBJEXT@
|
2017-05-03 12:22:21 -04:00
|
|
|
cd tests && rm -f chardata.@OBJEXT@ memcheck.@OBJEXT@ minicheck.@OBJEXT@
|
2002-08-23 17:53:29 -04:00
|
|
|
rm -rf .libs libexpat.la
|
2002-11-07 16:48:05 -05:00
|
|
|
rm -f examples/core tests/core xmlwf/core
|
2001-08-23 05:24:45 -04:00
|
|
|
|
2003-01-24 11:21:46 -05:00
|
|
|
clobber: clean
|
|
|
|
|
2001-08-23 05:24:45 -04:00
|
|
|
distclean: clean
|
2002-05-17 17:30:07 -04:00
|
|
|
rm -f expat_config.h config.status config.log config.cache libtool
|
2007-09-03 13:26:20 -04:00
|
|
|
rm -f Makefile expat.pc
|
2001-03-10 10:41:50 -05:00
|
|
|
|
|
|
|
extraclean: distclean
|
2002-05-17 17:30:07 -04:00
|
|
|
rm -f expat_config.h.in configure
|
2012-03-03 13:35:54 -05:00
|
|
|
rm -f aclocal.m4 m4/*
|
|
|
|
rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2017-06-04 11:25:23 -04:00
|
|
|
check: tests/runtests@EXEEXT@ tests/runtestspp@EXEEXT@
|
2017-06-04 11:43:47 -04:00
|
|
|
./run.sh tests/runtests@EXEEXT@
|
|
|
|
./run.sh tests/runtestspp@EXEEXT@
|
2001-07-24 23:05:22 -04:00
|
|
|
|
2016-05-06 14:54:50 -04:00
|
|
|
$(MANFILE):
|
|
|
|
$(MAKE) -C doc xmlwf.1
|
|
|
|
|
|
|
|
install: xmlwf/xmlwf@EXEEXT@ installlib $(MANFILE)
|
2007-05-09 14:38:50 -04:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
|
2012-02-20 21:50:08 -05:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
|
2007-05-09 14:38:50 -04:00
|
|
|
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
|
2002-06-03 14:16:07 -04:00
|
|
|
|
2007-09-03 13:26:20 -04:00
|
|
|
installlib: $(LIBRARY) $(APIHEADER) expat.pc
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
|
2007-05-09 14:38:50 -04:00
|
|
|
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
|
|
|
|
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
|
2007-09-03 13:26:20 -04:00
|
|
|
$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
|
2000-09-18 12:26:23 -04:00
|
|
|
|
2002-06-03 14:16:07 -04:00
|
|
|
uninstall: uninstalllib
|
2012-02-20 21:50:08 -05:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
|
2007-05-09 14:38:50 -04:00
|
|
|
rm -f $(DESTDIR)$(man1dir)/xmlwf.1
|
2002-06-03 14:16:07 -04:00
|
|
|
|
|
|
|
uninstalllib:
|
2007-05-09 14:38:50 -04:00
|
|
|
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
|
|
|
|
rm -f $(DESTDIR)$(includedir)/expat.h
|
|
|
|
rm -f $(DESTDIR)$(includedir)/expat_external.h
|
2007-09-03 13:26:20 -04:00
|
|
|
rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
|
2001-03-10 10:41:50 -05:00
|
|
|
|
2001-12-07 05:19:31 -05:00
|
|
|
# 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@
|
2006-03-06 09:24:36 -05:00
|
|
|
CXX = @CXX@
|
2001-12-07 05:19:31 -05:00
|
|
|
LIBTOOL = @LIBTOOL@
|
|
|
|
|
2002-07-11 14:54:42 -04:00
|
|
|
INCLUDES = -I$(srcdir)/lib -I.
|
2001-12-07 05:19:31 -05:00
|
|
|
LDFLAGS = @LDFLAGS@
|
2006-01-25 18:04:46 -05:00
|
|
|
CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
CXXFLAGS = @CXXFLAGS@
|
2001-12-07 05:19:31 -05:00
|
|
|
VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
|
|
|
|
|
|
|
|
### autoconf this?
|
2016-03-02 12:09:57 -05:00
|
|
|
LTFLAGS = --verbose
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2005-01-27 23:35:57 -05:00
|
|
|
COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
|
2006-01-25 18:04:46 -05:00
|
|
|
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
|
2001-12-07 05:19:31 -05:00
|
|
|
LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
|
2017-05-25 12:21:57 -04:00
|
|
|
LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) @LIBS@ -o $@
|
2001-12-07 05:19:31 -05:00
|
|
|
LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
|
2005-01-28 00:19:53 -05:00
|
|
|
LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
|
2002-07-11 14:54:42 -04:00
|
|
|
$(LIBRARY): $(LIB_OBJS)
|
2001-12-07 05:19:31 -05:00
|
|
|
$(LINK_LIB) $(LIB_OBJS)
|
|
|
|
|
2007-09-03 13:26:20 -04:00
|
|
|
expat.pc: $(top_builddir)/config.status
|
|
|
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
|
|
|
|
2017-06-10 19:12:58 -04:00
|
|
|
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/siphash.h lib/xmlrole.h lib/xmltok.h \
|
2004-05-07 16:00:48 -04:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
lib/xmlrole.lo: lib/xmlrole.c lib/ascii.h lib/xmlrole.h \
|
2004-05-07 16:00:48 -04:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
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 \
|
2004-05-07 16:00:48 -04:00
|
|
|
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
|
2001-12-07 05:19:31 -05:00
|
|
|
|
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
|
|
|
|
xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
|
|
|
|
xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
|
|
|
|
xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
|
2017-05-23 16:18:47 -04:00
|
|
|
xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c xmlwf/filemap.h
|
2012-02-20 21:50:08 -05:00
|
|
|
xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
|
2002-07-11 14:54:42 -04:00
|
|
|
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
examples/elements.@OBJEXT@: examples/elements.c
|
|
|
|
examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
|
2016-05-06 15:01:48 -04:00
|
|
|
$(LINK_EXE) examples/elements.@OBJEXT@ $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
examples/outline.@OBJEXT@: examples/outline.c
|
|
|
|
examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
|
2016-05-06 15:01:48 -04:00
|
|
|
$(LINK_EXE) examples/outline.@OBJEXT@ $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
|
|
|
|
tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
|
2017-04-25 18:01:56 -04:00
|
|
|
tests/memcheck.@OBJEXT@: tests/memcheck.c tests/memcheck.h
|
2017-06-10 18:03:28 -04:00
|
|
|
tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h tests/memcheck.h lib/siphash.h
|
2017-06-04 11:25:23 -04:00
|
|
|
tests/runtests@EXEEXT@: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
|
2017-04-25 18:01:56 -04:00
|
|
|
$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
|
|
|
|
tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h tests/memcheck.h
|
2017-06-04 11:25:23 -04:00
|
|
|
tests/runtestspp@EXEEXT@: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
|
2017-04-25 18:01:56 -04:00
|
|
|
$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ tests/memcheck.@OBJEXT@ $(LIBRARY)
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2012-03-11 00:13:12 -05:00
|
|
|
tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
|
|
|
|
tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
|
|
|
|
$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
|
|
|
|
|
|
|
|
run-benchmark: tests/benchmark/benchmark
|
|
|
|
tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
|
|
|
|
|
2002-09-03 19:19:30 -04:00
|
|
|
tests/xmlts.zip:
|
2017-06-27 11:15:55 -04:00
|
|
|
if test "$(XMLTS_ZIP)" = ""; then \
|
|
|
|
wget --output-document=tests/xmlts.zip \
|
|
|
|
https://www.w3.org/XML/Test/xmlts20080827.zip; \
|
|
|
|
else \
|
|
|
|
cp $(XMLTS_ZIP) tests/xmlts.zip; \
|
|
|
|
fi
|
2002-04-29 17:31:18 -04:00
|
|
|
|
2016-05-01 09:59:23 -04:00
|
|
|
tests/xmlconf: tests/xmlts.zip
|
2002-09-03 19:19:30 -04:00
|
|
|
cd tests && unzip -q xmlts.zip
|
2002-04-29 17:31:18 -04:00
|
|
|
|
2016-05-01 09:59:23 -04:00
|
|
|
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/xmlconf
|
2017-06-14 16:36:51 -04:00
|
|
|
tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf@EXEEXT@" 2>&1 | tee tests/xmltest.log
|
2017-06-28 12:57:24 -04:00
|
|
|
dos2unix tests/xmltest.log
|
|
|
|
diff -u tests/xmltest.log.expected tests/xmltest.log
|
2002-04-29 17:31:18 -04:00
|
|
|
|
2016-05-05 21:14:16 -04:00
|
|
|
.PHONY: qa
|
|
|
|
qa:
|
2016-05-15 08:11:11 -04:00
|
|
|
./qa.sh address
|
|
|
|
./qa.sh memory
|
|
|
|
./qa.sh undefined
|
|
|
|
./qa.sh coverage
|
2016-05-05 21:14:16 -04:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
.SUFFIXES: .c .cpp .lo .@OBJEXT@
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2012-02-20 21:50:08 -05:00
|
|
|
.cpp.@OBJEXT@:
|
2006-01-25 18:04:46 -05:00
|
|
|
$(CXXCOMPILE) -o $@ -c $<
|
2012-02-20 21:50:08 -05:00
|
|
|
.c.@OBJEXT@:
|
2001-12-07 05:19:31 -05:00
|
|
|
$(COMPILE) -o $@ -c $<
|
|
|
|
.c.lo:
|
|
|
|
$(LTCOMPILE) -o $@ -c $<
|
|
|
|
|
|
|
|
.PHONY: buildlib all \
|
2001-03-10 10:41:50 -05:00
|
|
|
clean distclean extraclean maintainer-clean \
|
|
|
|
dist distdir \
|
|
|
|
install uninstall
|