makefile 中由于大量使用了cmd /C ""样式去执行mkdir和copy操作,导致mingw最后出错,因为会从mingw切换至cmd界面。因此需要把相关代码进行修改.
# Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make.
#
# 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.
#
# November 2002, Igor Zlatkovic <igor@zlatkovic.com>
# There should never be a need to modify anything below this line.
# ----------------------------------------------------------------
AUTOCONF = .\config.mingw
include $(AUTOCONF)
# 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_A = $(XML_BASENAME).a
# Place where we let the compiler put its output.
BINDIR = bin.mingw
XML_INTDIR = int.mingw
XML_INTDIR_A = int.a.mingw
UTILS_INTDIR = int.utils.mingw
# The preprocessor and its options.
CPP = gcc.exe -E
CPPFLAGS += -I$(XML_SRCDIR)/include -DNOLIBTOOL
ifeq ($(WITH_THREADS),1)
CPPFLAGS += -D_REENTRANT
endif
# The compiler and its options.
CC = gcc.exe
CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS -DNOLIBTOOL
CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE)
ifneq ($(WITH_THREADS),no)
CFLAGS += -D_REENTRANT
endif
ifeq ($(WITH_THREADS),yes)
CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
endif
ifeq ($(WITH_THREADS),ctls)
CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
endif
ifeq ($(WITH_THREADS),native)
CFLAGS += -DHAVE_WIN32_THREADS
endif
ifeq ($(WITH_THREADS),posix)
CFLAGS += -DHAVE_PTHREAD_H
endif
ifeq ($(WITH_ZLIB),1)
CFLAGS += -DHAVE_ZLIB_H
endif
ifeq ($(WITH_LZMA),1)
CFLAGS += -DHAVE