diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 19:24:39 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 19:24:39 +0000 |
commit | 8f12b5681c0dbb4945e9d0d9ee3e0b4bf0d58124 (patch) | |
tree | 62be7a1b1304b8d2617441abb30013257272ca6c /third_party | |
parent | b33b54ed935286912384afdce6838cdfe7343874 (diff) | |
download | chromium_src-8f12b5681c0dbb4945e9d0d9ee3e0b4bf0d58124.zip chromium_src-8f12b5681c0dbb4945e9d0d9ee3e0b4bf0d58124.tar.gz chromium_src-8f12b5681c0dbb4945e9d0d9ee3e0b4bf0d58124.tar.bz2 |
Remove the build time generation of config.h and xmlversion.h.
This adds a bat file which will generate config.h and xmlversion.h
into the win32 directory. I updated include paths and everything
seems to build.
Review URL: http://codereview.chromium.org/18243
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libxml/README.google | 2 | ||||
-rwxr-xr-x | third_party/libxml/build/generate-win32-headers.bat | 9 | ||||
-rw-r--r-- | third_party/libxml/build/libxml.vsprops | 1 | ||||
-rw-r--r-- | third_party/libxml/build/libxml_config.bat | 13 | ||||
-rw-r--r-- | third_party/libxml/build/libxml_config.rules | 17 | ||||
-rw-r--r-- | third_party/libxml/build/libxml_config.vcproj | 74 | ||||
-rw-r--r-- | third_party/libxml/build/using_libxml.vsprops | 2 | ||||
-rw-r--r-- | third_party/libxml/libxml.scons | 30 | ||||
-rwxr-xr-x | third_party/libxml/win32/config.h | 124 | ||||
-rwxr-xr-x | third_party/libxml/win32/include/libxml/xmlversion.h | 415 |
10 files changed, 556 insertions, 131 deletions
diff --git a/third_party/libxml/README.google b/third_party/libxml/README.google index 8d2b1d6..f97a7a6 100644 --- a/third_party/libxml/README.google +++ b/third_party/libxml/README.google @@ -31,4 +31,6 @@ To import a new snapshot of libxml: - Update google.patch - 'cd linux && sh ../configure --without-iconv' to re-generate config.h and include/libxml/xmlversion.h. +- run build/generate-win32-headers.bat to re-generate config.h and + include/libxml/xmlversion.h for the windows build - Update this README to reflect the new version number. diff --git a/third_party/libxml/build/generate-win32-headers.bat b/third_party/libxml/build/generate-win32-headers.bat new file mode 100755 index 0000000..1d0f85d --- /dev/null +++ b/third_party/libxml/build/generate-win32-headers.bat @@ -0,0 +1,9 @@ +REM Generate config.h and xmlversion.h. We put the generated files in +REM win32 so they don't get included on other platforms. + +cd %~dp0\..\win32 +cscript //E:jscript configure.js compiler=msvc iconv=no icu=yes +move ..\config.h . + +md include\libxml +move ..\include\libxml\xmlversion.h include\libxml\ diff --git a/third_party/libxml/build/libxml.vsprops b/third_party/libxml/build/libxml.vsprops index 9f01fdf..a8392e2c 100644 --- a/third_party/libxml/build/libxml.vsprops +++ b/third_party/libxml/build/libxml.vsprops @@ -8,5 +8,6 @@ <Tool Name="VCCLCompilerTool" DisableSpecificWarnings="4101;4133" + AdditionalIncludeDirectories=""$(SolutionDir)..\third_party\libxml\win32";"$(SolutionDir)..\third_party\libxml\win32\include"" /> </VisualStudioPropertySheet> diff --git a/third_party/libxml/build/libxml_config.bat b/third_party/libxml/build/libxml_config.bat deleted file mode 100644 index b0ec1e2..0000000 --- a/third_party/libxml/build/libxml_config.bat +++ /dev/null @@ -1,13 +0,0 @@ -:: %1 is the input file js file -:: %2 is the solution directory - -:: Change to the directory of the input file -cd %~p1 - -:: Make config.h -cscript //E:jscript %1 compiler=msvc iconv=no icu=yes -if errorlevel 1 echo %1: error: The javascript file failed to run. - -:: Make sure the timestamp on config.h is current. -%2..\third_party\cygwin\bin\touch.exe ..\config.h - diff --git a/third_party/libxml/build/libxml_config.rules b/third_party/libxml/build/libxml_config.rules deleted file mode 100644 index 46967cc..0000000 --- a/third_party/libxml/build/libxml_config.rules +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<VisualStudioToolFile - Name="libxml config file" - Version="8.00" - > - <Rules> - <CustomBuildRule - Name="libxml config file" - DisplayName="libxml config file" - CommandLine=".\libxml_config.bat [inputs] $(SolutionDir)" - Outputs="$(ProjectDir)..\config.h" - FileExtensions="*.js" - ExecutionDescription="Generating config.h..." - > - </CustomBuildRule> - </Rules> -</VisualStudioToolFile> diff --git a/third_party/libxml/build/libxml_config.vcproj b/third_party/libxml/build/libxml_config.vcproj deleted file mode 100644 index a635f1b..0000000 --- a/third_party/libxml/build/libxml_config.vcproj +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="libxml_config" - ProjectGUID="{31D88CBF-DC28-47A8-8838-BF81D528EE74}" - RootNamespace="libxml_config" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - <ToolFile - RelativePath=".\libxml_config.rules" - /> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - ConfigurationType="10" - InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="libxml config file" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - ConfigurationType="10" - InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="libxml config file" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <File - RelativePath="..\win32\configure.js" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/third_party/libxml/build/using_libxml.vsprops b/third_party/libxml/build/using_libxml.vsprops index 7900ced..0c7311c 100644 --- a/third_party/libxml/build/using_libxml.vsprops +++ b/third_party/libxml/build/using_libxml.vsprops @@ -6,7 +6,7 @@ > <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)..\third_party\libxml\include"" + AdditionalIncludeDirectories=""$(SolutionDir)..\third_party\libxml\include";"$(SolutionDir)..\third_party\libxml\win32\include"" PreprocessorDefinitions="LIBXML_STATIC" /> <Tool diff --git a/third_party/libxml/libxml.scons b/third_party/libxml/libxml.scons index d7f05fa..438e3fd 100644 --- a/third_party/libxml/libxml.scons +++ b/third_party/libxml/libxml.scons @@ -127,34 +127,12 @@ env.ChromeMSVSProject('$LIBXML_DIR/build/libxml_config.vcproj', if env.Bit('windows'): config_files = [ - # The configure.js script must be first in this list; the - # env.Command() call below executes the first list element. - - 'win32/configure.js', - 'win32/Makefile.msvc', - - 'config.h.in', - 'configure.in', - 'libxml-2.0-uninstalled.pc.in', - 'libxml-2.0.pc.in', - 'libxml.spec.in', - 'xml2-config.in', - 'xml2Conf.sh.in', - - 'include/libxml/xmlversion.h.in', - 'include/win32config.h', + 'config.h', + 'include/libxml/xmlversion.h', ] - - copied_files = [] for cf in config_files: - result = env.Command('DerivedSources/' + cf, cf, Copy('$TARGET', '$SOURCE')) - copied_files.extend(result) - - env.Command(['DerivedSources/config.h', - 'DerivedSources/include/libxml/xmlversion.h'], - copied_files, - 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS', - CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes') + result = env.Command('DerivedSources/' + cf, 'win32/' + cf, + Copy('$TARGET', '$SOURCE')) elif env.Bit('linux'): config_files = [ 'config.h', diff --git a/third_party/libxml/win32/config.h b/third_party/libxml/win32/config.h new file mode 100755 index 0000000..3fc9be5 --- /dev/null +++ b/third_party/libxml/win32/config.h @@ -0,0 +1,124 @@ +#ifndef __LIBXML_WIN32_CONFIG__ +#define __LIBXML_WIN32_CONFIG__ + +#define HAVE_CTYPE_H +#define HAVE_STDARG_H +#define HAVE_MALLOC_H +#define HAVE_ERRNO_H + +#if defined(_WIN32_WCE) +#undef HAVE_ERRNO_H +#include <windows.h> +#include "wincecompat.h" +#else +#define HAVE_SYS_STAT_H +#define HAVE__STAT +#define HAVE_STAT +#define HAVE_STDLIB_H +#define HAVE_TIME_H +#define HAVE_FCNTL_H +#include <io.h> +#include <direct.h> +#endif + +#include <libxml/xmlversion.h> + +#ifndef ICONV_CONST +#define ICONV_CONST const +#endif + +#ifdef NEED_SOCKETS +#include <wsockcompat.h> +#endif + +/* + * Windows platforms may define except + */ +#undef except + +#define HAVE_ISINF +#define HAVE_ISNAN +#include <math.h> +#if defined(_MSC_VER) || defined(__BORLANDC__) +/* MS C-runtime has functions which can be used in order to determine if + a given floating-point variable contains NaN, (+-)INF. These are + preferred, because floating-point technology is considered propriatary + by MS and we can assume that their functions know more about their + oddities than we do. */ +#include <float.h> +/* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass + function. */ +#ifndef isinf +#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \ + : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0)) +#endif +/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */ +#ifndef isnan +#define isnan(d) (_isnan(d)) +#endif +#else /* _MSC_VER */ +#ifndef isinf +static int isinf (double d) { + int expon = 0; + double val = frexp (d, &expon); + if (expon == 1025) { + if (val == 0.5) { + return 1; + } else if (val == -0.5) { + return -1; + } else { + return 0; + } + } else { + return 0; + } +} +#endif +#ifndef isnan +static int isnan (double d) { + int expon = 0; + double val = frexp (d, &expon); + if (expon == 1025) { + if (val == 0.5) { + return 0; + } else if (val == -0.5) { + return 0; + } else { + return 1; + } + } else { + return 0; + } +} +#endif +#endif /* _MSC_VER */ + +#if defined(_MSC_VER) +#define mkdir(p,m) _mkdir(p) +#define snprintf _snprintf +#if _MSC_VER < 1500 +#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a) +#endif +#elif defined(__MINGW32__) +#define mkdir(p,m) _mkdir(p) +#endif + +/* Threading API to use should be specified here for compatibility reasons. + This is however best specified on the compiler's command-line. */ +#if defined(LIBXML_THREAD_ENABLED) +#if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE) +#define HAVE_WIN32_THREADS +#endif +#endif + +/* Some third-party libraries far from our control assume the following + is defined, which it is not if we don't include windows.h. */ +#if !defined(FALSE) +#define FALSE 0 +#endif +#if !defined(TRUE) +#define TRUE (!(FALSE)) +#endif + +#endif /* __LIBXML_WIN32_CONFIG__ */ + diff --git a/third_party/libxml/win32/include/libxml/xmlversion.h b/third_party/libxml/win32/include/libxml/xmlversion.h new file mode 100755 index 0000000..6763c10 --- /dev/null +++ b/third_party/libxml/win32/include/libxml/xmlversion.h @@ -0,0 +1,415 @@ +/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.6.32"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 20632
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "20632"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA ""
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(20632);
+
+#ifndef VMS
+#if 0
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if 1
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if 1
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 1
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if 1
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if 1
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 0
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 1
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 0
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if 0
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if 0
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if 1
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".dll"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 0
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
|