diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2007-08-03 13:46:43 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2007-08-03 13:46:43 +0000 |
commit | 2f0db738b45fea2e86b2e682df2902e8bcd515a0 (patch) | |
tree | d58c5f7f422aaf42060a5c08ba3c0cbcedc8a3a9 /win32 | |
parent | 0d275b6b1772333c6d5f71bca009aa3fd805489e (diff) | |
download | libxslt-2f0db738b45fea2e86b2e682df2902e8bcd515a0.tar.gz libxslt-2f0db738b45fea2e86b2e682df2902e8bcd515a0.tar.bz2 libxslt-2f0db738b45fea2e86b2e682df2902e8bcd515a0.zip |
apply patch from Rob Richards to improve build with VS2005 Daniel
* win32/Makefile.msvc win32/configure.js: apply patch from
Rob Richards to improve build with VS2005
Daniel
svn path=/trunk/; revision=1435
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.msvc | 12 | ||||
-rw-r--r-- | win32/configure.js | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 16ffbbea..b5810dee 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -141,6 +141,14 @@ EXSLT_OBJS_A = $(EXSLT_INTDIR_A)\common.obj\ # Xsltproc and friends executables. UTILS = $(BINDIR)\xsltproc.exe +!if "$(VCMANIFEST)" == "1" +_VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 +_VC_MANIFEST_EMBED_DLL= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 +!else +_VC_MANIFEST_EMBED_EXE= +_VC_MANIFEST_EMBED_DLL= +!endif + all : libxslt libxslta libexslt libexslta utils libxslt : $(BINDIR)\$(XSLT_SO) @@ -233,6 +241,7 @@ $(BINDIR)\$(XSLT_SO) : $(BINDIR) $(XSLT_OBJS) $(XSLT_INTDIR)\$(XSLT_DEF) /VERSION:$(LIBXSLT_MAJOR_VERSION).$(LIBXSLT_MINOR_VERSION) \ /IMPLIB:$(BINDIR)\$(XSLT_IMP) /OUT:$(BINDIR)\$(XSLT_SO) \ $(XSLT_OBJS) $(LIBS) libxml2.lib + @$(_VC_MANIFEST_EMBED_DLL) #$(BINDIR)\$(XSLT_SO) : $(BINDIR) $(XSLT_OBJS) $(XSLT_INTDIR)\$(XSLT_DEF) # $(LD) $(LDFLAGS) /DLL /DEF:$(XSLT_INTDIR)\$(XSLT_DEF) \ @@ -278,6 +287,7 @@ $(BINDIR)\$(EXSLT_SO) : $(BINDIR) $(EXSLT_OBJS) $(EXSLT_INTDIR)\$(EXSLT_DEF) lib /VERSION:$(LIBEXSLT_MAJOR_VERSION).$(LIBEXSLT_MINOR_VERSION) \ /IMPLIB:$(BINDIR)\$(EXSLT_IMP) /OUT:$(BINDIR)\$(EXSLT_SO) \ $(EXSLT_OBJS) $(XSLT_IMP) $(LIBS) libxml2.lib + @$(_VC_MANIFEST_EMBED_DLL) #$(BINDIR)\$(EXSLT_SO) : $(BINDIR) $(EXSLT_OBJS) $(EXSLT_INTDIR)\$(EXSLT_DEF) libxslt # $(LD) $(LDFLAGS) /DLL /DEF:$(EXSLT_INTDIR)\$(EXSLT_DEF) \ @@ -308,11 +318,13 @@ APPLIBS = $(APPLIBS) zlib.lib $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \ $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< $(LD) $(LDFLAGS) /OUT:$@ $(XSLT_A) $(EXSLT_A) $(APPLIBS) $(UTILS_INTDIR)\$(<B).obj + @$(_VC_MANIFEST_EMBED_EXE) !else APPLIBS = $(LIBS) libxml2.lib {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: $(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< $(LD) $(LDFLAGS) /OUT:$@ $(XSLT_IMP) $(EXSLT_IMP) $(APPLIBS) $(UTILS_INTDIR)\$(<B).obj + @$(_VC_MANIFEST_EMBED_EXE) !endif # Builds xsltproc and friends. Uses the implicit rule for commands. diff --git a/win32/configure.js b/win32/configure.js index baf7235e..f28e9da1 100644 --- a/win32/configure.js +++ b/win32/configure.js @@ -51,6 +51,7 @@ var withModules = false; var dirSep = "\\"; var compiler = "msvc"; var cruntime = "/MD"; +var vcmanifest = false; var buildDebug = 0; var buildStatic = 0; var buildPrefix = "."; @@ -108,6 +109,7 @@ function usage() txt += "\nWin32 build options, default value given in parentheses:\n\n"; txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n"; + txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "yes" : "no") + ")\n"; txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n"; txt += " static: Link xsltproc statically to libxslt (" + (buildStatic? "yes" : "no") + ")\n"; txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n"; @@ -201,6 +203,7 @@ function discoverVersion() vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude); vf.WriteLine("LIB=$(LIB);" + buildLib); vf.WriteLine("CRUNTIME=" + cruntime); + vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0")); } else if (compiler == "mingw") { vf.WriteLine("INCLUDE+=;" + buildInclude); vf.WriteLine("LIB+=;" + buildLib); @@ -344,6 +347,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { compiler = arg.substring(opt.length + 1, arg.length); else if (opt == "cruntime") cruntime = arg.substring(opt.length + 1, arg.length); + else if (opt == "vcmanifest") + vcmanifest = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "static") buildStatic = strToBool(arg.substring(opt.length + 1, arg.length)); else if (opt == "prefix") @@ -478,6 +483,7 @@ txtOut += "-------------------------\n"; txtOut += " Compiler: " + compiler + "\n"; if (compiler == "msvc") txtOut += " C-Runtime option: " + cruntime + "\n"; + txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n"; txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n"; txtOut += " Static xsltproc: " + boolToStr(buildStatic) + "\n"; txtOut += " Install prefix: " + buildPrefix + "\n"; |