2003-08-28 12:34:00 +00:00
# Makefile for libxml2, specific for Windows, BCB6 and Borland make.
#
# Take a look at the beginning and modify the variables to suit your
# environment. Having done that, you can do a
#
# make [all] to build the libxml and the accompanying utilities.
# make clean to remove all compiler output files and return to a
# clean state.
# make rebuild to rebuild everything from scratch. This basically does
# a 'nmake clean' and then a 'nmake all'.
# make install to install the library and its header files.
#
2003-08-29 10:25:39 +00:00
# August 2003, Eric Zurcher <Eric.Zurcher@csiro.au>
2003-08-28 12:34:00 +00:00
# based on the MSVC version of
# March 2002, Igor Zlatkovic <igor@zlatkovic.com>
2003-08-29 10:25:39 +00:00
#
2003-08-28 12:34:00 +00:00
# There should never be a need to modify anything below this line.
# ----------------------------------------------------------------
2003-11-27 18:39:01 +00:00
AUTOCONF = .\c onfig.bcb
! i n c l u d e $( AUTOCONF )
2003-08-28 12:34:00 +00:00
! i f ! $ d ( B C B )
BCB = $( MAKEDIR) \. .
! e n d i f
2003-08-29 10:25:39 +00:00
. a u t o d e p e n d
2003-08-28 12:34:00 +00:00
# Names of various input and output components.
XML_NAME = xml2
2003-08-29 10:25:39 +00:00
XML_BASENAME = lib$( XML_NAME)
2003-08-28 12:34:00 +00:00
XML_SO = $( XML_BASENAME) .dll
XML_IMP = $( XML_BASENAME) .lib
XML_DEF = $( XML_BASENAME) .def
XML_A = $( XML_BASENAME) _a.lib
2003-08-29 10:25:39 +00:00
DUMMY = dir.exists
2003-08-28 12:34:00 +00:00
# Place where we let the compiler put its intermediate trash.
2003-11-27 18:39:01 +00:00
BINDIR = bin.bcb
XML_INTDIR = int.bcb
XML_INTDIR_A = int.a.bcb
UTILS_INTDIR = int.utils.bcb
2003-08-28 12:34:00 +00:00
# The preprocessor and its options.
CPP = cpp32.exe -P- -DWIN32
2010-03-19 06:31:55 -04:00
CPPFLAGS = -I" $( XML_SRCDIR) \include " -DNOLIBTOOL
2003-08-28 12:34:00 +00:00
! i f "$(WITH_THREADS)" ! = "no"
CPPFLAGS = $( CPPFLAGS) -D_REENTRANT -D__MT__
! e n d i f
# The compiler and its options.
CC = bcc32.exe
2010-03-19 06:31:55 -04:00
CFLAGS = -q -DWIN32 -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ= 2 -DNOLIBTOOL -w-
2004-03-25 09:35:49 +00:00
CFLAGS = $( CFLAGS) -I" $( XML_SRCDIR) " -I" $( XML_SRCDIR) \include " -I" $( INCPREFIX) " -I" $( INCLUDE) "
2003-08-28 12:34:00 +00:00
! i f "$(WITH_THREADS)" ! = "no"
CFLAGS = $( CFLAGS) -D_REENTRANT -tWM
! e n d i f
2003-12-01 11:33:27 +00:00
! i f "$(DYNRUNTIME)" = = "1"
CFLAGS = $( CFLAGS) -tWR
2003-11-26 20:55:06 +00:00
! e n d i f
2003-08-28 12:34:00 +00:00
! i f "$(WITH_THREADS)" = = "yes" | | "$(WITH_THREADS)" = = "ctls"
CFLAGS = $( CFLAGS) -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
! e l s e i f "$(WITH_THREADS)" = = "native"
CFLAGS = $( CFLAGS) -DHAVE_WIN32_THREADS
! e l s e i f "$(WITH_THREADS)" = = "posix"
CFLAGS = $( CFLAGS) -DHAVE_PTHREAD_H
! e n d i f
! i f "$(WITH_ZLIB)" = = "1"
CFLAGS = $( CFLAGS) -DHAVE_ZLIB_H
! e n d i f
Various "make distcheck" and portability fixups
Makefile.am:
* Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
variable, it allows overriding the value at the command line, and
(notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
assignment when @MODULE_PLATFORM_LIBS@ is empty
* Changed how the THREADS_W32 mechanism switches the build between
testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
allows this to work cleanly and plays well with dependencies
* testapi.c should be specified as BUILT_SOURCES
* Create symlinks to the test/ and result/ subdirs so that the runtests
target is usable in out-of-source-tree builds
* Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
* Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
instead of just "rm" is good form
* (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
pass
configure.in:
* Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
* AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
superceded by LT_INIT
* Don't rebuild docs by default, as this requires GNU Make (as
implemented)
* Check for uint32_t as some platforms don't provide it
* Check for some more functions, and undefine HAVE_MMAP if we don't also
HAVE_MUNMAP (one system I tested on actually needed this)
* Changed THREADS_W32 from a filename insert into an Automake conditional
* The "Copyright" file will not be in the current directory if builddir !=
srcdir
doc/Makefile.am:
* EXTRA_DIST cannot use wildcards when they refer to generated files; this
breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
"check-extra-dist", to simplify checking that the two variables are
equivalent. (Note that this works only when builddir == srcdir)
(I can implement this differently if desired; this is just one way of
doing it)
* Don't define an "all" target; this steps on Automake's toes
* Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
dependencies (as Make doesn't process the wildcards otherwise) and
qualifying appropriate files with $(srcdir)
(Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
which we can count on as this is GNU-Make-only code anyway)
doc/devhelp/Makefile.am:
* Qualified appropriate files with $(srcdir)
* Added an "uninstall-local" rule so that "make distcheck" passes
doc/examples/Makefile.am:
* Rather than use a wildcard that doesn't work, use a substitution that
most Make programs can handle
doc/examples/index.py:
* Do the same here
include/libxml/nanoftp.h:
* Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
Include$ grep -R INVALID_SOCKET .
./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0)
./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0)
include/libxml/xmlversion.h.in:
* Support ancient GCCs (I was actually able to build the library with 2.5
but for this bit)
python/Makefile.am:
* Expanded CLEANFILES to allow "make distcheck" to pass
python/tests/Makefile.am:
* Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
"make distcheck" to pass
testRelax.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
systems have the header but not the function)
testSchemas.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
testapi.c:
* Don't use putenv() if it's not available
threads.c:
* This fixes the following build error on Solaris 8:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \
-D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
-xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o
"threads.c", line 442: controlling expressions must have scalar type
"threads.c", line 512: controlling expressions must have scalar type
cc: acomp failed for threads.c
*** Error code 1
trio.c:
* Define isascii() if the system doesn't provide it
trio.h:
* The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
win32/configure.js:
* Added support for the LZMA compression option
win32/Makefile.{bcb,mingw,msvc}:
* Added appropriate bits to support WITH_LZMA=1
* Install the header files under $(INCPREFIX)\libxml2\libxml instead of
$(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
xml2-config.in:
* @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
`xml2-config --libs` to provide a complete set of dependencies
xmllint.c:
* Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
! i f "$(WITH_LZMA)" = = "1"
CFLAGS = $( CFLAGS) -DHAVE_LZMA_H
! e n d i f
2003-08-28 12:34:00 +00:00
# The linker and its options.
LD = ilink32.exe
LDFLAGS = -q -U$( LIBXML_MAJOR_VERSION) .$( LIBXML_MINOR_VERSION)
2009-03-25 09:51:19 +00:00
LDFLAGS = $( LDFLAGS) -L" $( BINDIR) ; $( LIBPREFIX) ; $( LIB) ; $( BCB) \lib; $( BCB) \lib\PSdk "
2003-08-28 12:34:00 +00:00
LIBS = import32.lib
2003-12-01 11:33:27 +00:00
! i f "$(WITH_THREADS)" ! = "no" & & "$(DYNRUNTIME)" = = "1"
2003-08-28 12:34:00 +00:00
LIBS = $( LIBS) cw32mti.lib
2003-12-01 11:33:27 +00:00
! e l i f "$(WITH_THREADS)" ! = "no"
LIBS = $( LIBS) cw32mt.lib
! e l i f "$(DYNRUNTIME)" = = "1"
2003-08-28 12:34:00 +00:00
LIBS = $( LIBS) cw32i.lib
2003-12-01 11:33:27 +00:00
! e l s e
LIBS = $( LIBS) cw32.lib
2003-08-28 12:34:00 +00:00
! e n d i f
! i f "$(WITH_FTP)" = = "1" | | "$(WITH_HTTP)" = = "1"
2009-03-25 09:51:19 +00:00
LIBS = $( LIBS) wsock32.lib ws2_32.lib
2003-08-28 12:34:00 +00:00
! e n d i f
! i f "$(WITH_ICONV)" = = "1"
2003-08-29 10:25:39 +00:00
LIBS = $( LIBS) iconvomf.lib
2003-08-28 12:34:00 +00:00
! e n d i f
! i f "$(WITH_ZLIB)" = = "1"
2003-08-29 10:25:39 +00:00
LIBS = $( LIBS) zlibomf.lib
2003-08-28 12:34:00 +00:00
! e n d i f
Various "make distcheck" and portability fixups
Makefile.am:
* Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
variable, it allows overriding the value at the command line, and
(notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
assignment when @MODULE_PLATFORM_LIBS@ is empty
* Changed how the THREADS_W32 mechanism switches the build between
testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
allows this to work cleanly and plays well with dependencies
* testapi.c should be specified as BUILT_SOURCES
* Create symlinks to the test/ and result/ subdirs so that the runtests
target is usable in out-of-source-tree builds
* Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
* Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
instead of just "rm" is good form
* (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
pass
configure.in:
* Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
* AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
superceded by LT_INIT
* Don't rebuild docs by default, as this requires GNU Make (as
implemented)
* Check for uint32_t as some platforms don't provide it
* Check for some more functions, and undefine HAVE_MMAP if we don't also
HAVE_MUNMAP (one system I tested on actually needed this)
* Changed THREADS_W32 from a filename insert into an Automake conditional
* The "Copyright" file will not be in the current directory if builddir !=
srcdir
doc/Makefile.am:
* EXTRA_DIST cannot use wildcards when they refer to generated files; this
breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
"check-extra-dist", to simplify checking that the two variables are
equivalent. (Note that this works only when builddir == srcdir)
(I can implement this differently if desired; this is just one way of
doing it)
* Don't define an "all" target; this steps on Automake's toes
* Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
dependencies (as Make doesn't process the wildcards otherwise) and
qualifying appropriate files with $(srcdir)
(Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
which we can count on as this is GNU-Make-only code anyway)
doc/devhelp/Makefile.am:
* Qualified appropriate files with $(srcdir)
* Added an "uninstall-local" rule so that "make distcheck" passes
doc/examples/Makefile.am:
* Rather than use a wildcard that doesn't work, use a substitution that
most Make programs can handle
doc/examples/index.py:
* Do the same here
include/libxml/nanoftp.h:
* Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
Include$ grep -R INVALID_SOCKET .
./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0)
./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0)
include/libxml/xmlversion.h.in:
* Support ancient GCCs (I was actually able to build the library with 2.5
but for this bit)
python/Makefile.am:
* Expanded CLEANFILES to allow "make distcheck" to pass
python/tests/Makefile.am:
* Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
"make distcheck" to pass
testRelax.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
systems have the header but not the function)
testSchemas.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
testapi.c:
* Don't use putenv() if it's not available
threads.c:
* This fixes the following build error on Solaris 8:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \
-D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
-xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o
"threads.c", line 442: controlling expressions must have scalar type
"threads.c", line 512: controlling expressions must have scalar type
cc: acomp failed for threads.c
*** Error code 1
trio.c:
* Define isascii() if the system doesn't provide it
trio.h:
* The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
win32/configure.js:
* Added support for the LZMA compression option
win32/Makefile.{bcb,mingw,msvc}:
* Added appropriate bits to support WITH_LZMA=1
* Install the header files under $(INCPREFIX)\libxml2\libxml instead of
$(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
xml2-config.in:
* @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
`xml2-config --libs` to provide a complete set of dependencies
xmllint.c:
* Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
! i f "$(WITH_LZMA)" = = "1"
LIBS = $( LIBS) liblzma.lib
! e n d i f
2003-08-28 12:34:00 +00:00
! i f "$(WITH_THREADS)" = = "posix"
LIBS = $( LIBS) pthreadVC.lib
! e n d i f
2005-01-04 15:10:22 +00:00
! i f "$(WITH_MODULES)" = = "1"
LIBS = $( LIBS) kernel32.lib
! e n d i f
2003-08-28 12:34:00 +00:00
# The archiver and its options.
AR = tlib.exe
ARFLAGS = /P64 /0
# Optimisation and debug symbols.
! i f "$(DEBUG)" = = "1"
CFLAGS = $( CFLAGS) -D_DEBUG -Od -v
LDFLAGS = $( LDFLAGS) -v
! e l s e
CFLAGS = $( CFLAGS) -DNDEBUG -O2
LDFLAGS = $( LDFLAGS)
! e n d i f
# Libxml object files.
2012-08-15 13:52:09 +08:00
XML_OBJS = $( XML_INTDIR) \b uf.obj\
$( XML_INTDIR) \c 14n.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \c atalog.obj\
2003-10-21 09:27:57 +00:00
$( XML_INTDIR) \c hvalid.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \d ebugXML.obj\
$( XML_INTDIR) \d ict.obj\
$( XML_INTDIR) \D OCBparser.obj\
$( XML_INTDIR) \e ncoding.obj\
$( XML_INTDIR) \e ntities.obj\
$( XML_INTDIR) \e rror.obj\
$( XML_INTDIR) \g lobals.obj\
$( XML_INTDIR) \h ash.obj\
$( XML_INTDIR) \H TMLparser.obj\
$( XML_INTDIR) \H TMLtree.obj\
2003-10-06 08:47:56 +00:00
$( XML_INTDIR) \l egacy.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \l ist.obj\
$( XML_INTDIR) \n anoftp.obj\
$( XML_INTDIR) \n anohttp.obj\
$( XML_INTDIR) \p arser.obj\
$( XML_INTDIR) \p arserInternals.obj\
2003-12-11 13:56:54 +00:00
$( XML_INTDIR) \p attern.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \r elaxng.obj\
$( XML_INTDIR) \S AX.obj\
$( XML_INTDIR) \S AX2.obj\
2006-03-09 08:43:32 +00:00
$( XML_INTDIR) \s chematron.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \t hreads.obj\
$( XML_INTDIR) \t ree.obj\
$( XML_INTDIR) \u ri.obj\
$( XML_INTDIR) \v alid.obj\
$( XML_INTDIR) \x include.obj\
$( XML_INTDIR) \x link.obj\
$( XML_INTDIR) \x mlIO.obj\
$( XML_INTDIR) \x mlmemory.obj\
$( XML_INTDIR) \x mlreader.obj\
$( XML_INTDIR) \x mlregexp.obj\
2005-01-04 15:10:22 +00:00
$( XML_INTDIR) \x mlmodule.obj\
2004-03-09 10:53:42 +00:00
$( XML_INTDIR) \x mlsave.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \x mlschemas.obj\
$( XML_INTDIR) \x mlschemastypes.obj\
$( XML_INTDIR) \x mlunicode.obj\
2003-11-27 18:39:01 +00:00
$( XML_INTDIR) \x mlwriter.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR) \x path.obj\
2004-01-07 23:38:02 +00:00
$( XML_INTDIR) \x pointer.obj\
$( XML_INTDIR) \x mlstring.obj
2003-08-28 12:34:00 +00:00
# Static libxml object files.
2012-08-15 13:52:09 +08:00
XML_OBJS_A = $( XML_INTDIR_A) \b uf.obj\
$( XML_INTDIR_A) \c 14n.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \c atalog.obj\
2003-10-21 09:27:57 +00:00
$( XML_INTDIR_A) \c hvalid.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \d ebugXML.obj\
$( XML_INTDIR_A) \d ict.obj\
$( XML_INTDIR_A) \D OCBparser.obj\
$( XML_INTDIR_A) \e ncoding.obj\
$( XML_INTDIR_A) \e ntities.obj\
$( XML_INTDIR_A) \e rror.obj\
$( XML_INTDIR_A) \g lobals.obj\
$( XML_INTDIR_A) \h ash.obj\
$( XML_INTDIR_A) \H TMLparser.obj\
$( XML_INTDIR_A) \H TMLtree.obj\
2003-10-06 08:47:56 +00:00
$( XML_INTDIR_A) \l egacy.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \l ist.obj\
$( XML_INTDIR_A) \n anoftp.obj\
$( XML_INTDIR_A) \n anohttp.obj\
$( XML_INTDIR_A) \p arser.obj\
$( XML_INTDIR_A) \p arserInternals.obj\
2003-12-11 13:56:54 +00:00
$( XML_INTDIR_A) \p attern.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \r elaxng.obj\
$( XML_INTDIR_A) \S AX.obj\
$( XML_INTDIR_A) \S AX2.obj\
2006-03-09 08:43:32 +00:00
$( XML_INTDIR_A) \s chematron.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \t hreads.obj\
$( XML_INTDIR_A) \t ree.obj\
$( XML_INTDIR_A) \u ri.obj\
$( XML_INTDIR_A) \v alid.obj\
$( XML_INTDIR_A) \x include.obj\
$( XML_INTDIR_A) \x link.obj\
$( XML_INTDIR_A) \x mlIO.obj\
$( XML_INTDIR_A) \x mlmemory.obj\
$( XML_INTDIR_A) \x mlreader.obj\
$( XML_INTDIR_A) \x mlregexp.obj\
2005-01-04 15:10:22 +00:00
$( XML_INTDIR_A) \x mlmodule.obj\
2004-03-09 10:53:42 +00:00
$( XML_INTDIR_A) \x mlsave.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \x mlschemas.obj\
$( XML_INTDIR_A) \x mlschemastypes.obj\
$( XML_INTDIR_A) \x mlunicode.obj\
2003-11-27 18:39:01 +00:00
$( XML_INTDIR_A) \x mlwriter.obj\
2003-08-28 12:34:00 +00:00
$( XML_INTDIR_A) \x path.obj\
2004-01-07 23:38:02 +00:00
$( XML_INTDIR_A) \x pointer.obj\
$( XML_INTDIR_A) \x mlstring.obj
2003-08-28 12:34:00 +00:00
# Xmllint and friends executables.
UTILS = $( BINDIR) \x mllint.exe\
$( BINDIR) \x mlcatalog.exe\
$( BINDIR) \t estAutomata.exe\
$( BINDIR) \t estC14N.exe\
$( BINDIR) \t estDocbook.exe\
$( BINDIR) \t estHTML.exe\
$( BINDIR) \t estReader.exe\
$( BINDIR) \t estRelax.exe\
$( BINDIR) \t estRegexp.exe\
2005-01-04 15:10:22 +00:00
$( BINDIR) \t estModule.exe\
2003-08-28 12:34:00 +00:00
$( BINDIR) \t estSAX.exe\
$( BINDIR) \t estSchemas.exe\
$( BINDIR) \t estURI.exe\
2005-07-05 10:40:52 +00:00
$( BINDIR) \t estXPath.exe\
2006-02-01 11:28:14 +00:00
$( BINDIR) \r untest.exe\
$( BINDIR) \r unsuite.exe\
2012-08-15 13:52:09 +08:00
$( BINDIR) \t estapi.exe\
$( BINDIR) \t estlimits.exe
2003-08-28 12:34:00 +00:00
! i f "$(WITH_THREADS)" = = "yes" | | "$(WITH_THREADS)" = = "ctls" | | "$(WITH_THREADS)" = = "native"
UTILS = $( UTILS) $( BINDIR) \t estThreadsWin32.exe
! e l s e i f "$(WITH_THREADS)" = = "posix"
UTILS = $( UTILS) $( BINDIR) \t estThreads.exe
! e n d i f
all : libxml libxmla utils
libxml : $( BINDIR ) \$( XML_SO )
libxmla : $( BINDIR ) \$( XML_A )
utils : $( UTILS )
clean :
if exist $( XML_INTDIR) rmdir /S /Q $( XML_INTDIR)
if exist $( XML_INTDIR_A) rmdir /S /Q $( XML_INTDIR_A)
if exist $( UTILS_INTDIR) rmdir /S /Q $( UTILS_INTDIR)
if exist $( BINDIR) rmdir /S /Q $( BINDIR)
distclean : clean
if exist config.* del config.*
if exist Makefile del Makefile
rebuild : clean all
2005-04-06 21:14:06 +00:00
install-libs : all
Various "make distcheck" and portability fixups
Makefile.am:
* Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
variable, it allows overriding the value at the command line, and
(notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
assignment when @MODULE_PLATFORM_LIBS@ is empty
* Changed how the THREADS_W32 mechanism switches the build between
testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
allows this to work cleanly and plays well with dependencies
* testapi.c should be specified as BUILT_SOURCES
* Create symlinks to the test/ and result/ subdirs so that the runtests
target is usable in out-of-source-tree builds
* Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
* Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
instead of just "rm" is good form
* (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
pass
configure.in:
* Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
* AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
superceded by LT_INIT
* Don't rebuild docs by default, as this requires GNU Make (as
implemented)
* Check for uint32_t as some platforms don't provide it
* Check for some more functions, and undefine HAVE_MMAP if we don't also
HAVE_MUNMAP (one system I tested on actually needed this)
* Changed THREADS_W32 from a filename insert into an Automake conditional
* The "Copyright" file will not be in the current directory if builddir !=
srcdir
doc/Makefile.am:
* EXTRA_DIST cannot use wildcards when they refer to generated files; this
breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
"check-extra-dist", to simplify checking that the two variables are
equivalent. (Note that this works only when builddir == srcdir)
(I can implement this differently if desired; this is just one way of
doing it)
* Don't define an "all" target; this steps on Automake's toes
* Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
dependencies (as Make doesn't process the wildcards otherwise) and
qualifying appropriate files with $(srcdir)
(Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
which we can count on as this is GNU-Make-only code anyway)
doc/devhelp/Makefile.am:
* Qualified appropriate files with $(srcdir)
* Added an "uninstall-local" rule so that "make distcheck" passes
doc/examples/Makefile.am:
* Rather than use a wildcard that doesn't work, use a substitution that
most Make programs can handle
doc/examples/index.py:
* Do the same here
include/libxml/nanoftp.h:
* Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
Include$ grep -R INVALID_SOCKET .
./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0)
./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0)
include/libxml/xmlversion.h.in:
* Support ancient GCCs (I was actually able to build the library with 2.5
but for this bit)
python/Makefile.am:
* Expanded CLEANFILES to allow "make distcheck" to pass
python/tests/Makefile.am:
* Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
"make distcheck" to pass
testRelax.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
systems have the header but not the function)
testSchemas.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
testapi.c:
* Don't use putenv() if it's not available
threads.c:
* This fixes the following build error on Solaris 8:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \
-D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
-xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o
"threads.c", line 442: controlling expressions must have scalar type
"threads.c", line 512: controlling expressions must have scalar type
cc: acomp failed for threads.c
*** Error code 1
trio.c:
* Define isascii() if the system doesn't provide it
trio.h:
* The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
win32/configure.js:
* Added support for the LZMA compression option
win32/Makefile.{bcb,mingw,msvc}:
* Added appropriate bits to support WITH_LZMA=1
* Install the header files under $(INCPREFIX)\libxml2\libxml instead of
$(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
xml2-config.in:
* @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
`xml2-config --libs` to provide a complete set of dependencies
xmllint.c:
* Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
if not exist " $( INCPREFIX) \libxml2 " mkdir " $( INCPREFIX) \libxml2 "
if not exist " $( INCPREFIX) \libxml2\libxml " mkdir " $( INCPREFIX) \libxml2\libxml "
2004-03-25 09:35:49 +00:00
if not exist " $( BINPREFIX) " mkdir " $( BINPREFIX) "
if not exist " $( LIBPREFIX) " mkdir " $( LIBPREFIX) "
Various "make distcheck" and portability fixups
Makefile.am:
* Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make
variable, it allows overriding the value at the command line, and
(notably) it avoids a Make parse error in the libxml2_la_LDFLAGS
assignment when @MODULE_PLATFORM_LIBS@ is empty
* Changed how the THREADS_W32 mechanism switches the build between
testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL
allows this to work cleanly and plays well with dependencies
* testapi.c should be specified as BUILT_SOURCES
* Create symlinks to the test/ and result/ subdirs so that the runtests
target is usable in out-of-source-tree builds
* Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes
* Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f"
instead of just "rm" is good form
* (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to
pass
configure.in:
* Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am
* AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been
superceded by LT_INIT
* Don't rebuild docs by default, as this requires GNU Make (as
implemented)
* Check for uint32_t as some platforms don't provide it
* Check for some more functions, and undefine HAVE_MMAP if we don't also
HAVE_MUNMAP (one system I tested on actually needed this)
* Changed THREADS_W32 from a filename insert into an Automake conditional
* The "Copyright" file will not be in the current directory if builddir !=
srcdir
doc/Makefile.am:
* EXTRA_DIST cannot use wildcards when they refer to generated files; this
breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU
Make $(wildcard) directives to build up a list of files, and EXTRA_DIST,
as a literal expansion of EXTRA_DIST_wc. I also added a new rule,
"check-extra-dist", to simplify checking that the two variables are
equivalent. (Note that this works only when builddir == srcdir)
(I can implement this differently if desired; this is just one way of
doing it)
* Don't define an "all" target; this steps on Automake's toes
* Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for
dependencies (as Make doesn't process the wildcards otherwise) and
qualifying appropriate files with $(srcdir)
(Note that $(srcdir) is not needed in the dependencies, thanks to VPATH,
which we can count on as this is GNU-Make-only code anyway)
doc/devhelp/Makefile.am:
* Qualified appropriate files with $(srcdir)
* Added an "uninstall-local" rule so that "make distcheck" passes
doc/examples/Makefile.am:
* Rather than use a wildcard that doesn't work, use a substitution that
most Make programs can handle
doc/examples/index.py:
* Do the same here
include/libxml/nanoftp.h:
* Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET:
user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\
Include$ grep -R INVALID_SOCKET .
./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0)
./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0)
include/libxml/xmlversion.h.in:
* Support ancient GCCs (I was actually able to build the library with 2.5
but for this bit)
python/Makefile.am:
* Expanded CLEANFILES to allow "make distcheck" to pass
python/tests/Makefile.am:
* Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow
"make distcheck" to pass
testRelax.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some
systems have the header but not the function)
testSchemas.c:
* Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H
testapi.c:
* Don't use putenv() if it's not available
threads.c:
* This fixes the following build error on Solaris 8:
libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \
-D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \
-xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o
"threads.c", line 442: controlling expressions must have scalar type
"threads.c", line 512: controlling expressions must have scalar type
cc: acomp failed for threads.c
*** Error code 1
trio.c:
* Define isascii() if the system doesn't provide it
trio.h:
* The trio library's HAVE_CONFIG_H header is not the same as LibXML2's
HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion
win32/configure.js:
* Added support for the LZMA compression option
win32/Makefile.{bcb,mingw,msvc}:
* Added appropriate bits to support WITH_LZMA=1
* Install the header files under $(INCPREFIX)\libxml2\libxml instead of
$(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools
xml2-config.in:
* @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for
`xml2-config --libs` to provide a complete set of dependencies
xmllint.c:
* Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
copy $( XML_SRCDIR) \i nclude\l ibxml\* .h " $( INCPREFIX) \libxml2\libxml "
2004-03-25 09:35:49 +00:00
copy $( BINDIR) \$ ( XML_SO) " $( SOPREFIX) "
copy $( BINDIR) \$ ( XML_A) " $( LIBPREFIX) "
copy $( BINDIR) \$ ( XML_IMP) " $( LIBPREFIX) "
copy $( BINDIR) \* .exe " $( BINPREFIX) "
2003-08-28 12:34:00 +00:00
2005-04-06 21:14:06 +00:00
install : install -libs
copy $( BINDIR) \* .exe " $( BINPREFIX) "
install-dist : install -libs
2004-06-09 14:32:47 +00:00
copy $( BINDIR) \x ml*.exe " $( BINPREFIX) "
2003-08-28 12:34:00 +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
2005-04-06 21:14:06 +00:00
$( MAKE) /nologo PREFIX = $( BDPREFIX) SOPREFIX = $( BDPREFIX) \b in install-dist
2003-08-28 12:34:00 +00:00
cscript //NoLogo configure.js genreadme $( XML_BASENAME) $( BDVERSION) $( BDPREFIX) \r eadme.txt
# Makes the output directory.
2003-08-29 10:25:39 +00:00
$(BINDIR)\$(DUMMY) :
2003-08-28 12:34:00 +00:00
if not exist $( BINDIR) mkdir $( BINDIR)
2003-08-29 10:25:39 +00:00
touch $( BINDIR) \$ ( DUMMY)
2003-08-28 12:34:00 +00:00
# Makes the libxml intermediate directory.
2003-08-29 10:25:39 +00:00
$(XML_INTDIR)\$(DUMMY) :
2003-08-28 12:34:00 +00:00
if not exist $( XML_INTDIR) mkdir $( XML_INTDIR)
2003-08-29 10:25:39 +00:00
touch $( XML_INTDIR) \$ ( DUMMY)
2003-08-28 12:34:00 +00:00
# Makes the static libxml intermediate directory.
2003-08-29 10:25:39 +00:00
$(XML_INTDIR_A)\$(DUMMY) :
2003-08-28 12:34:00 +00:00
if not exist $( XML_INTDIR_A) mkdir $( XML_INTDIR_A)
2003-08-29 10:25:39 +00:00
touch $( XML_INTDIR_A) \$ ( DUMMY)
2003-08-28 12:34:00 +00:00
# An implicit rule for libxml compilation.
{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj :
$( CC) $( CFLAGS) -n$( XML_INTDIR) -c $<
# An implicit rule for static libxml compilation.
{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj :
$( CC) $( CFLAGS) -DLIBXML_STATIC -n$( XML_INTDIR_A) \ -c $<
# Compiles libxml source. Uses the implicit rule for commands.
2003-08-29 10:25:39 +00:00
$(XML_OBJS) : $( XML_INTDIR ) \$( DUMMY )
2003-08-28 12:34:00 +00:00
# Compiles static libxml source. Uses the implicit rule for commands.
2003-08-29 10:25:39 +00:00
$(XML_OBJS_A) : $( XML_INTDIR_A ) \$( DUMMY )
2003-08-28 12:34:00 +00:00
#def4bcb.exe : def4bcb.c
# Creates the export definition file (DEF) for libxml.
2003-08-29 10:25:39 +00:00
#$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR)\$(DUMMY) $(XML_DEF).src def4bcb.exe
# $(CPP) $(CPPFLAGS) -o $(XML_INTDIR)\$(XML_DEF).tmp $(XML_DEF).src
# def4bcb -msnames < $(XML_INTDIR)\$(XML_DEF).tmp > $(XML_INTDIR)\$(XML_DEF)
2003-08-28 12:34:00 +00:00
# Creates the libxml shared object.
2003-08-29 10:25:39 +00:00
$(BINDIR)\$(XML_SO) : $( BINDIR ) \$( DUMMY ) $( XML_OBJS )
$( LD) $( LDFLAGS) -Tpd -Gi c0d32.obj $( XML_OBJS) ,$( BINDIR) \$ ( XML_SO) ,,$( LIBS)
#$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
# $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS),$(XML_INTDIR)\$(XML_DEF)
2003-08-28 12:34:00 +00:00
# Creates the libxml archive.
2003-08-29 10:25:39 +00:00
$(BINDIR)\$(XML_A) : $( BINDIR ) \$( DUMMY ) $( XML_OBJS_A )
2003-08-28 12:34:00 +00:00
$( AR) $( BINDIR) \$ ( XML_A) $( ARFLAGS) /u $( XML_OBJS_A)
# Makes the utils intermediate directory.
2003-08-29 10:25:39 +00:00
$(UTILS_INTDIR)\$(DUMMY) :
2003-08-28 12:34:00 +00:00
if not exist $( UTILS_INTDIR) mkdir $( UTILS_INTDIR)
2003-08-29 10:25:39 +00:00
touch $( UTILS_INTDIR) \$ ( DUMMY)
2003-08-28 12:34:00 +00:00
# An implicit rule for xmllint and friends.
! i f "$(STATIC)" = = "1"
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe :
2003-11-26 20:55:06 +00:00
$( CC) -DLIBXML_STATIC -w -tWC $( CFLAGS) -o$( UTILS_INTDIR) \$ & .obj -c $<
2003-08-28 12:34:00 +00:00
$( LD) $( LDFLAGS) c0x32.obj $( UTILS_INTDIR) \$ & .obj,$@ ,,$( LIBS) $( XML_A)
! e l s e
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe :
2003-11-26 20:55:06 +00:00
$( CC) $( CFLAGS) -tWC -o$( UTILS_INTDIR) \$ & .obj -c $<
2003-08-28 12:34:00 +00:00
$( LD) $( LDFLAGS) c0x32.obj $( UTILS_INTDIR) \$ & .obj $( XML_IMP) ,$@ ,,$( LIBS)
! e n d i f
# Builds xmllint and friends. Uses the implicit rule for commands.
2003-08-29 10:25:39 +00:00
$(UTILS) : $( UTILS_INTDIR ) \$( DUMMY ) $( BINDIR ) \$( DUMMY ) $( BINDIR ) \$( XML_SO ) $( BINDIR ) \$( XML_A )
2003-08-28 12:34:00 +00:00
# Source dependences should be autogenerated somehow here, but how to
# do it? I have no clue.