2002-03-24 21:00:26 +00:00
|
|
|
# Makefile for libxml2, specific for Windows, MSVC and NMAKE.
|
|
|
|
#
|
|
|
|
# Take a look at the beginning and modify the variables to suit your
|
|
|
|
# environment. Having done that, you can do a
|
|
|
|
#
|
|
|
|
# nmake [all] to build the libxml and the accompanying utilities.
|
|
|
|
# nmake clean to remove all compiler output files and return to a
|
|
|
|
# clean state.
|
|
|
|
# nmake rebuild to rebuild everything from scratch. This basically does
|
|
|
|
# a 'nmake clean' and then a 'nmake all'.
|
|
|
|
# nmake install to install the library and its header files.
|
|
|
|
#
|
2002-12-18 14:53:54 +00:00
|
|
|
# March 2002, Igor Zlatkovic <igor@zlatkovic.com>
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# There should never be a need to modify anything below this line.
|
|
|
|
# ----------------------------------------------------------------
|
|
|
|
|
2003-11-27 18:39:01 +00:00
|
|
|
AUTOCONF = .\config.msvc
|
|
|
|
!include $(AUTOCONF)
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# Names of various input and output components.
|
|
|
|
XML_NAME = xml2
|
|
|
|
XML_BASENAME = lib$(XML_NAME)
|
|
|
|
XML_SO = $(XML_BASENAME).dll
|
|
|
|
XML_IMP = $(XML_BASENAME).lib
|
|
|
|
XML_DEF = $(XML_BASENAME).def
|
|
|
|
XML_A = $(XML_BASENAME)_a.lib
|
|
|
|
|
2003-11-27 18:39:01 +00:00
|
|
|
# Place where we let the compiler put its output.
|
|
|
|
BINDIR = bin.msvc
|
|
|
|
XML_INTDIR = int.msvc
|
|
|
|
XML_INTDIR_A = int.a.msvc
|
|
|
|
UTILS_INTDIR = int.utils.msvc
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# The preprocessor and its options.
|
|
|
|
CPP = cl.exe /EP
|
|
|
|
CPPFLAGS = /nologo /I$(XML_SRCDIR)\include
|
2002-10-31 16:00:22 +00:00
|
|
|
!if "$(WITH_THREADS)" != "no"
|
2002-04-10 21:57:11 +00:00
|
|
|
CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
|
|
|
|
!endif
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# The compiler and its options.
|
|
|
|
CC = cl.exe
|
2003-11-27 18:39:01 +00:00
|
|
|
CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W1 $(CRUNTIME)
|
2002-08-20 14:42:07 +00:00
|
|
|
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
|
2002-10-31 16:00:22 +00:00
|
|
|
!if "$(WITH_THREADS)" != "no"
|
2002-03-24 21:00:26 +00:00
|
|
|
CFLAGS = $(CFLAGS) /D "_REENTRANT"
|
|
|
|
!endif
|
2002-10-31 16:00:22 +00:00
|
|
|
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls"
|
|
|
|
CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS" /D "HAVE_COMPILER_TLS"
|
|
|
|
!else if "$(WITH_THREADS)" == "native"
|
|
|
|
CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS"
|
|
|
|
!else if "$(WITH_THREADS)" == "posix"
|
|
|
|
CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
|
|
|
|
!endif
|
2002-09-20 16:40:17 +00:00
|
|
|
!if "$(WITH_ZLIB)" == "1"
|
|
|
|
CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H"
|
|
|
|
!endif
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# The linker and its options.
|
|
|
|
LD = link.exe
|
|
|
|
LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
|
2002-08-20 14:42:07 +00:00
|
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
|
2002-03-24 21:00:26 +00:00
|
|
|
LIBS =
|
|
|
|
!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
|
|
|
|
LIBS = $(LIBS) wsock32.lib
|
|
|
|
!endif
|
|
|
|
!if "$(WITH_ICONV)" == "1"
|
|
|
|
LIBS = $(LIBS) iconv.lib
|
|
|
|
!endif
|
2002-09-20 16:40:17 +00:00
|
|
|
!if "$(WITH_ZLIB)" == "1"
|
|
|
|
LIBS = $(LIBS) zlib.lib
|
|
|
|
!endif
|
2002-10-31 16:00:22 +00:00
|
|
|
!if "$(WITH_THREADS)" == "posix"
|
|
|
|
LIBS = $(LIBS) pthreadVC.lib
|
|
|
|
!endif
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# The archiver and its options.
|
|
|
|
AR = lib.exe
|
|
|
|
ARFLAGS = /nologo
|
|
|
|
|
|
|
|
# Optimisation and debug symbols.
|
|
|
|
!if "$(DEBUG)" == "1"
|
|
|
|
CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
|
|
|
|
LDFLAGS = $(LDFLAGS) /DEBUG
|
|
|
|
!else
|
|
|
|
CFLAGS = $(CFLAGS) /D "NDEBUG" /O2
|
|
|
|
LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
|
|
|
|
!endif
|
|
|
|
|
|
|
|
# Libxml object files.
|
|
|
|
XML_OBJS = $(XML_INTDIR)\c14n.obj\
|
|
|
|
$(XML_INTDIR)\catalog.obj\
|
2003-10-21 09:27:57 +00:00
|
|
|
$(XML_INTDIR)\chvalid.obj\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(XML_INTDIR)\debugXML.obj\
|
2003-08-25 09:05:12 +00:00
|
|
|
$(XML_INTDIR)\dict.obj\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(XML_INTDIR)\DOCBparser.obj\
|
|
|
|
$(XML_INTDIR)\encoding.obj\
|
|
|
|
$(XML_INTDIR)\entities.obj\
|
|
|
|
$(XML_INTDIR)\error.obj\
|
|
|
|
$(XML_INTDIR)\globals.obj\
|
|
|
|
$(XML_INTDIR)\hash.obj\
|
|
|
|
$(XML_INTDIR)\HTMLparser.obj\
|
|
|
|
$(XML_INTDIR)\HTMLtree.obj\
|
2003-10-06 08:47:56 +00:00
|
|
|
$(XML_INTDIR)\legacy.obj\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(XML_INTDIR)\list.obj\
|
|
|
|
$(XML_INTDIR)\nanoftp.obj\
|
|
|
|
$(XML_INTDIR)\nanohttp.obj\
|
|
|
|
$(XML_INTDIR)\parser.obj\
|
|
|
|
$(XML_INTDIR)\parserInternals.obj\
|
2003-12-11 13:56:54 +00:00
|
|
|
$(XML_INTDIR)\pattern.obj\
|
2003-02-08 17:53:46 +00:00
|
|
|
$(XML_INTDIR)\relaxng.obj\
|
2003-08-25 09:05:12 +00:00
|
|
|
$(XML_INTDIR)\SAX2.obj\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(XML_INTDIR)\SAX.obj\
|
|
|
|
$(XML_INTDIR)\threads.obj\
|
|
|
|
$(XML_INTDIR)\tree.obj\
|
|
|
|
$(XML_INTDIR)\uri.obj\
|
|
|
|
$(XML_INTDIR)\valid.obj\
|
|
|
|
$(XML_INTDIR)\xinclude.obj\
|
|
|
|
$(XML_INTDIR)\xlink.obj\
|
|
|
|
$(XML_INTDIR)\xmlIO.obj\
|
|
|
|
$(XML_INTDIR)\xmlmemory.obj\
|
2002-12-16 18:45:29 +00:00
|
|
|
$(XML_INTDIR)\xmlreader.obj\
|
2002-04-16 17:57:17 +00:00
|
|
|
$(XML_INTDIR)\xmlregexp.obj\
|
2004-03-09 10:53:42 +00:00
|
|
|
$(XML_INTDIR)\xmlsave.obj\
|
2002-04-16 17:57:17 +00:00
|
|
|
$(XML_INTDIR)\xmlschemas.obj\
|
|
|
|
$(XML_INTDIR)\xmlschemastypes.obj\
|
|
|
|
$(XML_INTDIR)\xmlunicode.obj\
|
2003-11-27 18:39:01 +00:00
|
|
|
$(XML_INTDIR)\xmlwriter.obj\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(XML_INTDIR)\xpath.obj\
|
2004-01-07 23:38:02 +00:00
|
|
|
$(XML_INTDIR)\xpointer.obj\
|
|
|
|
$(XML_INTDIR)\xmlstring.obj
|
2002-03-24 21:00:26 +00:00
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
# Static libxml object files.
|
|
|
|
XML_OBJS_A = $(XML_INTDIR_A)\c14n.obj\
|
|
|
|
$(XML_INTDIR_A)\catalog.obj\
|
2003-10-21 09:27:57 +00:00
|
|
|
$(XML_INTDIR_A)\chvalid.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\debugXML.obj\
|
2003-08-25 09:05:12 +00:00
|
|
|
$(XML_INTDIR_A)\dict.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\DOCBparser.obj\
|
|
|
|
$(XML_INTDIR_A)\encoding.obj\
|
|
|
|
$(XML_INTDIR_A)\entities.obj\
|
|
|
|
$(XML_INTDIR_A)\error.obj\
|
|
|
|
$(XML_INTDIR_A)\globals.obj\
|
|
|
|
$(XML_INTDIR_A)\hash.obj\
|
|
|
|
$(XML_INTDIR_A)\HTMLparser.obj\
|
|
|
|
$(XML_INTDIR_A)\HTMLtree.obj\
|
2003-10-06 08:47:56 +00:00
|
|
|
$(XML_INTDIR_A)\legacy.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\list.obj\
|
|
|
|
$(XML_INTDIR_A)\nanoftp.obj\
|
|
|
|
$(XML_INTDIR_A)\nanohttp.obj\
|
|
|
|
$(XML_INTDIR_A)\parser.obj\
|
|
|
|
$(XML_INTDIR_A)\parserInternals.obj\
|
2003-12-11 13:56:54 +00:00
|
|
|
$(XML_INTDIR_A)\pattern.obj\
|
2003-02-08 17:53:46 +00:00
|
|
|
$(XML_INTDIR_A)\relaxng.obj\
|
2003-08-25 09:05:12 +00:00
|
|
|
$(XML_INTDIR_A)\SAX2.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\SAX.obj\
|
|
|
|
$(XML_INTDIR_A)\threads.obj\
|
|
|
|
$(XML_INTDIR_A)\tree.obj\
|
|
|
|
$(XML_INTDIR_A)\uri.obj\
|
|
|
|
$(XML_INTDIR_A)\valid.obj\
|
|
|
|
$(XML_INTDIR_A)\xinclude.obj\
|
|
|
|
$(XML_INTDIR_A)\xlink.obj\
|
|
|
|
$(XML_INTDIR_A)\xmlIO.obj\
|
|
|
|
$(XML_INTDIR_A)\xmlmemory.obj\
|
2002-12-16 18:45:29 +00:00
|
|
|
$(XML_INTDIR_A)\xmlreader.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\xmlregexp.obj\
|
2004-03-09 10:53:42 +00:00
|
|
|
$(XML_INTDIR_A)\xmlsave.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\xmlschemas.obj\
|
|
|
|
$(XML_INTDIR_A)\xmlschemastypes.obj\
|
|
|
|
$(XML_INTDIR_A)\xmlunicode.obj\
|
2003-11-27 18:39:01 +00:00
|
|
|
$(XML_INTDIR_A)\xmlwriter.obj\
|
2002-09-29 17:54:00 +00:00
|
|
|
$(XML_INTDIR_A)\xpath.obj\
|
2004-01-07 23:38:02 +00:00
|
|
|
$(XML_INTDIR_A)\xpointer.obj\
|
|
|
|
$(XML_INTDIR_A)\xmlstring.obj
|
2002-09-29 17:54:00 +00:00
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
# Xmllint and friends executables.
|
|
|
|
UTILS = $(BINDIR)\xmllint.exe\
|
|
|
|
$(BINDIR)\xmlcatalog.exe\
|
2002-04-16 17:57:17 +00:00
|
|
|
$(BINDIR)\testAutomata.exe\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(BINDIR)\testC14N.exe\
|
|
|
|
$(BINDIR)\testDocbook.exe\
|
|
|
|
$(BINDIR)\testHTML.exe\
|
2002-12-16 18:45:29 +00:00
|
|
|
$(BINDIR)\testReader.exe\
|
2003-02-08 17:53:46 +00:00
|
|
|
$(BINDIR)\testRelax.exe\
|
2002-04-16 17:57:17 +00:00
|
|
|
$(BINDIR)\testRegexp.exe\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(BINDIR)\testSAX.exe\
|
2002-04-16 17:57:17 +00:00
|
|
|
$(BINDIR)\testSchemas.exe\
|
2002-03-24 21:00:26 +00:00
|
|
|
$(BINDIR)\testURI.exe\
|
|
|
|
$(BINDIR)\testXPath.exe
|
2002-10-31 16:00:22 +00:00
|
|
|
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
|
|
|
|
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
|
|
|
|
!else if "$(WITH_THREADS)" == "posix"
|
|
|
|
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
|
|
|
!endif
|
2002-03-24 21:00:26 +00:00
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
all : libxml libxmla utils
|
2002-03-24 21:00:26 +00:00
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
libxml : $(BINDIR)\$(XML_SO)
|
|
|
|
|
|
|
|
libxmla : $(BINDIR)\$(XML_A)
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
utils : $(UTILS)
|
|
|
|
|
|
|
|
clean :
|
|
|
|
if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)
|
2002-09-29 17:54:00 +00:00
|
|
|
if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)
|
2002-03-24 21:00:26 +00:00
|
|
|
if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
|
|
|
|
if exist $(BINDIR) rmdir /S /Q $(BINDIR)
|
|
|
|
|
2002-11-14 17:43:24 +00:00
|
|
|
distclean : clean
|
|
|
|
if exist config.* del config.*
|
|
|
|
if exist Makefile del Makefile
|
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
rebuild : clean all
|
|
|
|
|
|
|
|
install : all
|
|
|
|
if not exist $(INCPREFIX)\libxml mkdir $(INCPREFIX)\libxml
|
|
|
|
if not exist $(BINPREFIX) mkdir $(BINPREFIX)
|
|
|
|
if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
|
|
|
|
copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml
|
|
|
|
copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
|
|
|
|
copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
|
|
|
|
copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
|
|
|
|
copy $(BINDIR)\*.exe $(BINPREFIX)
|
2002-07-10 19:22:22 +00:00
|
|
|
-copy $(BINDIR)\*.pdb $(BINPREFIX)
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# This is a target for me, to make a binary distribution. Not for the public use,
|
|
|
|
# keep your hands off :-)
|
|
|
|
BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
|
|
|
|
BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
|
|
|
|
bindist : all
|
|
|
|
$(MAKE) /nologo PREFIX=$(BDPREFIX) BINPREFIX=$(BDPREFIX)\util install
|
|
|
|
cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
|
|
|
|
|
|
|
|
|
|
|
|
# Makes the output directory.
|
|
|
|
$(BINDIR) :
|
|
|
|
if not exist $(BINDIR) mkdir $(BINDIR)
|
|
|
|
|
|
|
|
|
|
|
|
# Makes the libxml intermediate directory.
|
|
|
|
$(XML_INTDIR) :
|
|
|
|
if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
|
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
# Makes the static libxml intermediate directory.
|
|
|
|
$(XML_INTDIR_A) :
|
|
|
|
if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
|
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
# An implicit rule for libxml compilation.
|
|
|
|
{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj::
|
|
|
|
$(CC) $(CFLAGS) /Fo$(XML_INTDIR)\ /c $<
|
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
# An implicit rule for static libxml compilation.
|
|
|
|
{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj::
|
|
|
|
$(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /c $<
|
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
# Compiles libxml source. Uses the implicit rule for commands.
|
|
|
|
$(XML_OBJS) : $(XML_INTDIR)
|
|
|
|
|
2002-09-29 17:54:00 +00:00
|
|
|
# Compiles static libxml source. Uses the implicit rule for commands.
|
|
|
|
$(XML_OBJS_A) : $(XML_INTDIR_A)
|
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
# Creates the export definition file (DEF) for libxml.
|
|
|
|
$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR) $(XML_DEF).src
|
|
|
|
$(CPP) $(CPPFLAGS) $(XML_DEF).src > $(XML_INTDIR)\$(XML_DEF)
|
|
|
|
|
|
|
|
# Creates the libxml shared object.
|
|
|
|
$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
|
2003-08-25 09:05:12 +00:00
|
|
|
$(LD) $(LDFLAGS) /DLL \
|
2002-03-24 21:00:26 +00:00
|
|
|
/IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
|
|
|
|
|
2003-08-25 09:05:12 +00:00
|
|
|
#$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
|
|
|
|
# $(LD) $(LDFLAGS) /DLL /DEF:$(XML_INTDIR)\$(XML_DEF) \
|
|
|
|
# /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
|
|
|
|
|
2002-03-24 21:00:26 +00:00
|
|
|
# Creates the libxml archive.
|
2002-09-29 17:54:00 +00:00
|
|
|
$(BINDIR)\$(XML_A) : $(BINDIR) $(XML_OBJS_A)
|
|
|
|
$(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A) $(XML_OBJS_A)
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Makes the utils intermediate directory.
|
|
|
|
$(UTILS_INTDIR) :
|
|
|
|
if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
|
|
|
|
|
|
|
|
# An implicit rule for xmllint and friends.
|
|
|
|
!if "$(STATIC)" == "1"
|
|
|
|
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
|
|
|
|
$(CC) /D "LIBXML_STATIC" $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
|
|
|
|
$(LD) $(LDFLAGS) /OUT:$@ $(XML_A) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
|
|
|
|
!else
|
|
|
|
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
|
|
|
|
$(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
|
2002-10-31 16:00:22 +00:00
|
|
|
$(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
|
2002-03-24 21:00:26 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
# Builds xmllint and friends. Uses the implicit rule for commands.
|
2002-09-29 17:54:00 +00:00
|
|
|
$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla
|
2002-03-24 21:00:26 +00:00
|
|
|
|
|
|
|
# Source dependences should be autogenerated somehow here, but how to
|
|
|
|
# do it? I have no clue.
|
|
|
|
|
2004-04-29 14:04:09 +00:00
|
|
|
# TESTS
|
|
|
|
|
|
|
|
tests : XPathtests
|
|
|
|
|
2004-04-30 12:56:46 +00:00
|
|
|
XPathtests : $(BINDIR)\testXPath.exe
|
2004-04-29 14:04:09 +00:00
|
|
|
@echo. 2> .memdump
|
|
|
|
@echo ## XPath regression tests
|
|
|
|
@-$(BINDIR)\testXPath.exe | find /C "support not compiled in" 1>nul
|
|
|
|
@if %ERRORLEVEL% NEQ 0 @( \
|
|
|
|
echo Skipping debug not compiled in\
|
|
|
|
@exit 0 \
|
|
|
|
)
|
|
|
|
@for %%I in ($(XML_SRCDIR)\test\XPath\expr\*.*) do @( \
|
2004-04-30 12:56:46 +00:00
|
|
|
@IF NOT EXIST $(XML_SRCDIR)\result\XPath\expr\%%~nxI ( \
|
|
|
|
@echo New test %%~nxI &&\
|
|
|
|
@echo %%~nxI &&\
|
|
|
|
$(BINDIR)\testXPath.exe -f --expr %%I > $(XML_SRCDIR)/result/XPath/expr/%%~nxI &&\
|
2004-04-29 14:04:09 +00:00
|
|
|
findstr /C:"MEMORY ALLOCATED : 0" \
|
|
|
|
) ELSE ( \
|
2004-04-30 12:56:46 +00:00
|
|
|
$(BINDIR)\testXPath.exe -f --expr %%I 2>&1 > result.%%~nxI &&\
|
|
|
|
fc $(XML_SRCDIR)\result\XPath\expr\%%~nxI result.%%~nxI >nul &\
|
2004-04-29 14:04:09 +00:00
|
|
|
iF ERRORLEVEL 1 exit 1 & \
|
|
|
|
findstr "MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" >nul &&\
|
2004-04-30 12:56:46 +00:00
|
|
|
del result.%%~nxI \
|
2004-04-29 14:04:09 +00:00
|
|
|
) \
|
|
|
|
)
|
|
|
|
@for %%I in ($(XML_SRCDIR)\test\XPath\docs\*.*) do @( \
|
2004-04-30 12:56:46 +00:00
|
|
|
for %%J in ($(XML_SRCDIR)\test\XPath\tests\%%~nxI*.*) do @( \
|
|
|
|
if not exist $(XML_SRCDIR)\result\XPath\tests\%%~nxJ ( \
|
|
|
|
$(BINDIR)\testXPath.exe -f -i %%I %%J > $(XML_SRCDIR)\result\XPath\tests\%%~nxJ &&\
|
2004-04-29 14:04:09 +00:00
|
|
|
findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > nul \
|
|
|
|
) ELSE ( \
|
2004-04-30 12:56:46 +00:00
|
|
|
$(BINDIR)\testXPAth.exe -f -i %%I %%J 2>&1 > result.%%~nxJ &&\
|
2004-04-29 14:04:09 +00:00
|
|
|
findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0">null &&\
|
2004-04-30 12:56:46 +00:00
|
|
|
fc $(XML_SRCDIR)\result\XPath\tests\%%~nxJ result.%%~nxJ >null & \
|
2004-04-29 14:04:09 +00:00
|
|
|
IF ERRORLEVEL 1 (echo Error: %%I %%J & exit 1) & \
|
2004-04-30 12:56:46 +00:00
|
|
|
del result.%%~nxJ \
|
2004-04-29 14:04:09 +00:00
|
|
|
)\
|
|
|
|
)\
|
|
|
|
)
|
|
|
|
|
2004-04-30 12:56:46 +00:00
|
|
|
XMLtests : $(BINDIR)\xmllint.exe
|
|
|
|
@echo. 2> .memdump
|
|
|
|
@echo ## XML regression tests
|
|
|
|
-@for %%I in ($(XML_SRCDIR)\test\*) do @( \
|
|
|
|
if not exist $(XML_SRCDIR)\result\%%~nxI ( \
|
|
|
|
echo New test file %%~nxI &\
|
|
|
|
$(BINDIR)\xmllint.exe %%I > $(XML_SRCDIR)\result\%%~nxI && \
|
|
|
|
findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null \
|
|
|
|
) ELSE ( \
|
|
|
|
$(BINDIR)\xmllint.exe %%I 2>&1 > result.%%~nxI && \
|
|
|
|
findstr /C:"MEMORY ALLOC" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null && \
|
|
|
|
fc $(XML_SRCDIR)\result\%%~nxI result.%%~nxI > null && \
|
|
|
|
$(BINDIR)\xmllint.exe result.%%~nxI 2>&1 > result2.%%~nxI | findstr /V /C:"failed to load external entity" && \
|
|
|
|
fc result.%%~nxI result2.%%~nxI & \
|
|
|
|
del result.%%~nxI result2.%%~nxI\
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-04-29 14:04:09 +00:00
|
|
|
|