| OLD | NEW |
| (Empty) |
| 1 # Copyright 2008, Google Inc. | |
| 2 # All rights reserved. | |
| 3 # | |
| 4 # Redistribution and use in source and binary forms, with or without | |
| 5 # modification, are permitted provided that the following conditions are | |
| 6 # met: | |
| 7 # | |
| 8 # * Redistributions of source code must retain the above copyright | |
| 9 # notice, this list of conditions and the following disclaimer. | |
| 10 # * Redistributions in binary form must reproduce the above | |
| 11 # copyright notice, this list of conditions and the following disclaimer | |
| 12 # in the documentation and/or other materials provided with the | |
| 13 # distribution. | |
| 14 # * Neither the name of Google Inc. nor the names of its | |
| 15 # contributors may be used to endorse or promote products derived from | |
| 16 # this software without specific prior written permission. | |
| 17 # | |
| 18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
| 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
| 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
| 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
| 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
| 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
| 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 29 | |
| 30 Import('env') | |
| 31 | |
| 32 if env.WantSystemLib('libxml'): | |
| 33 Return() | |
| 34 | |
| 35 env = env.Clone() | |
| 36 | |
| 37 env.Prepend( | |
| 38 CPPPATH = [ | |
| 39 '$ICU38_DIR/public/common', | |
| 40 '$ICU38_DIR/public/18n', | |
| 41 '$ZLIB_DIR', | |
| 42 'DerivedSources', | |
| 43 'DerivedSources/include', | |
| 44 'include', | |
| 45 ], | |
| 46 CPPDEFINES = [ | |
| 47 'U_STATIC_IMPLEMENTATION', | |
| 48 'LIBXML_STATIC', | |
| 49 ], | |
| 50 ) | |
| 51 | |
| 52 if env.Bit('windows'): | |
| 53 env.Append( | |
| 54 CCFLAGS = [ | |
| 55 '/TC', | |
| 56 '/wd4800', | |
| 57 ], | |
| 58 ) | |
| 59 elif env.Bit('linux'): | |
| 60 env.Append( | |
| 61 CPPDEFINES = [ | |
| 62 '_REENTRANT', | |
| 63 ], | |
| 64 ) | |
| 65 if '-Wall' in env['CCFLAGS']: | |
| 66 # We're not responsible for bad warning hygiene in this third party code. | |
| 67 env['CCFLAGS'].remove('-Werror') | |
| 68 | |
| 69 | |
| 70 input_files = ChromeFileList([ | |
| 71 # TODO(sgk): violate standard indentation so we don't have to | |
| 72 # reindent too much when we remove the explicit MSVSFilter() calls | |
| 73 # in favor of generating the hierarchy to reflect the file system. | |
| 74 MSVSFilter('include', [ | |
| 75 'include/win32config.h', | |
| 76 'include/wsockcompat.h', | |
| 77 MSVSFilter('libxml', [ | |
| 78 'include/libxml/c14n.h', | |
| 79 'include/libxml/catalog.h', | |
| 80 'include/libxml/chvalid.h', | |
| 81 'include/libxml/debugXML.h', | |
| 82 'include/libxml/dict.h', | |
| 83 'include/libxml/DOCBparser.h', | |
| 84 'include/libxml/encoding.h', | |
| 85 'include/libxml/entities.h', | |
| 86 'include/libxml/globals.h', | |
| 87 'include/libxml/hash.h', | |
| 88 'include/libxml/HTMLparser.h', | |
| 89 'include/libxml/HTMLtree.h', | |
| 90 'include/libxml/list.h', | |
| 91 'include/libxml/nanoftp.h', | |
| 92 'include/libxml/nanohttp.h', | |
| 93 'include/libxml/parser.h', | |
| 94 'include/libxml/parserInternals.h', | |
| 95 'include/libxml/pattern.h', | |
| 96 'include/libxml/relaxng.h', | |
| 97 'include/libxml/SAX.h', | |
| 98 'include/libxml/SAX2.h', | |
| 99 'include/libxml/schemasInternals.h', | |
| 100 'include/libxml/schematron.h', | |
| 101 'include/libxml/threads.h', | |
| 102 'include/libxml/tree.h', | |
| 103 'include/libxml/uri.h', | |
| 104 'include/libxml/valid.h', | |
| 105 'include/libxml/xinclude.h', | |
| 106 'include/libxml/xlink.h', | |
| 107 'include/libxml/xmlautomata.h', | |
| 108 'include/libxml/xmlerror.h', | |
| 109 'include/libxml/xmlexports.h', | |
| 110 'include/libxml/xmlIO.h', | |
| 111 'include/libxml/xmlmemory.h', | |
| 112 'include/libxml/xmlmodule.h', | |
| 113 'include/libxml/xmlreader.h', | |
| 114 'include/libxml/xmlregexp.h', | |
| 115 'include/libxml/xmlsave.h', | |
| 116 'include/libxml/xmlschemas.h', | |
| 117 'include/libxml/xmlschemastypes.h', | |
| 118 'include/libxml/xmlstring.h', | |
| 119 'include/libxml/xmlunicode.h', | |
| 120 'include/libxml/xmlversion.h', | |
| 121 'include/libxml/xmlwriter.h', | |
| 122 'include/libxml/xpath.h', | |
| 123 'include/libxml/xpathInternals.h', | |
| 124 'include/libxml/xpointer.h', | |
| 125 ]), | |
| 126 ]), | |
| 127 'acconfig.h', | |
| 128 'c14n.c', | |
| 129 'catalog.c', | |
| 130 'chvalid.c', | |
| 131 'config.h', | |
| 132 'debugXML.c', | |
| 133 'dict.c', | |
| 134 'DOCBparser.c', | |
| 135 'elfgcchack.h', | |
| 136 'encoding.c', | |
| 137 'entities.c', | |
| 138 'error.c', | |
| 139 'globals.c', | |
| 140 'hash.c', | |
| 141 'HTMLparser.c', | |
| 142 'HTMLtree.c', | |
| 143 'legacy.c', | |
| 144 'libxml.h', | |
| 145 'list.c', | |
| 146 'nanoftp.c', | |
| 147 'nanohttp.c', | |
| 148 'parser.c', | |
| 149 'parserInternals.c', | |
| 150 'pattern.c', | |
| 151 'relaxng.c', | |
| 152 'SAX.c', | |
| 153 'SAX2.c', | |
| 154 'schematron.c', | |
| 155 'threads.c', | |
| 156 'tree.c', | |
| 157 'uri.c', | |
| 158 'valid.c', | |
| 159 'xinclude.c', | |
| 160 'xlink.c', | |
| 161 'xmlIO.c', | |
| 162 'xmlmemory.c', | |
| 163 'xmlmodule.c', | |
| 164 'xmlreader.c', | |
| 165 'xmlregexp.c', | |
| 166 'xmlsave.c', | |
| 167 'xmlschemas.c', | |
| 168 'xmlschemastypes.c', | |
| 169 'xmlstring.c', | |
| 170 'xmlunicode.c', | |
| 171 'xmlwriter.c', | |
| 172 'xpath.c', | |
| 173 'xpointer.c', | |
| 174 ]) | |
| 175 | |
| 176 env.ChromeLibrary('libxml', input_files) | |
| 177 | |
| 178 p = env.ChromeMSVSProject('$LIBXML_DIR/build/libxml.vcproj', | |
| 179 dest=('$CHROME_SRC_DIR/third_party/libxml/' + | |
| 180 '/build/libxml.vcproj'), | |
| 181 guid='{F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7}', | |
| 182 keyword='Win32Proj', | |
| 183 # TODO(sgk): when we can intuit the hierarchy | |
| 184 # from the built targets. | |
| 185 #buildtargets=TODO, | |
| 186 files=input_files, | |
| 187 tools=[ | |
| 188 'VCPreBuildEventTool', | |
| 189 'VCCustomBuildTool', | |
| 190 'VCXMLDataGeneratorTool', | |
| 191 'VCWebServiceProxyGeneratorTool', | |
| 192 'VCMIDLTool', | |
| 193 'VCCLCompilerTool', | |
| 194 'VCManagedResourceCompilerTool', | |
| 195 'VCResourceCompilerTool', | |
| 196 'VCPreLinkEventTool', | |
| 197 'VCLibrarianTool', | |
| 198 'VCALinkTool', | |
| 199 'VCXDCMakeTool', | |
| 200 'VCBscMakeTool', | |
| 201 'VCFxCopTool', | |
| 202 'VCPostBuildEventTool', | |
| 203 ], | |
| 204 ConfigurationType='4') | |
| 205 | |
| 206 p.AddConfig('Debug|Win32', | |
| 207 InheritedPropertySheets=[ | |
| 208 '$(SolutionDir)../build/debug.vsprops', | |
| 209 './libxml.vsprops', | |
| 210 ]) | |
| 211 | |
| 212 p.AddConfig('Release|Win32', | |
| 213 InheritedPropertySheets=[ | |
| 214 '$(SolutionDir)../build/release.vsprops', | |
| 215 './libxml.vsprops', | |
| 216 ]) | |
| 217 | |
| 218 if env.Bit('windows'): | |
| 219 config_files = [ | |
| 220 'config.h', | |
| 221 'include/libxml/xmlversion.h', | |
| 222 ] | |
| 223 for cf in config_files: | |
| 224 result = env.Command('DerivedSources/' + cf, 'win32/' + cf, | |
| 225 Copy('$TARGET', '$SOURCE')) | |
| 226 elif env.Bit('linux'): | |
| 227 config_files = [ | |
| 228 'config.h', | |
| 229 'include/libxml/xmlversion.h', | |
| 230 'xml2-config', | |
| 231 ] | |
| 232 for cf in config_files: | |
| 233 result = env.Command('DerivedSources/' + cf, 'linux/' + cf, | |
| 234 Copy('$TARGET', '$SOURCE')) | |
| OLD | NEW |