| 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 env = env.Clone() | |
| 33 | |
| 34 env.Prepend( | |
| 35 CPPPATH = [ | |
| 36 '$ICU38_DIR/public/common', | |
| 37 '$ICU38_DIR/public/18n', | |
| 38 '$ZLIB_DIR', | |
| 39 'DerivedSources', | |
| 40 'DerivedSources/include', | |
| 41 'include', | |
| 42 ], | |
| 43 ) | |
| 44 | |
| 45 env.Append( | |
| 46 CPPDEFINES = [ | |
| 47 'U_STATIC_IMPLEMENTATION', | |
| 48 'LIBXML_STATIC', | |
| 49 ], | |
| 50 ) | |
| 51 | |
| 52 if env['PLATFORM'] == 'win32': | |
| 53 env.Append( | |
| 54 CCFLAGS = [ | |
| 55 '/TC', | |
| 56 '/wd4800', | |
| 57 ], | |
| 58 ) | |
| 59 elif env['PLATFORM'] == 'posix': | |
| 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 = [ | |
| 71 'c14n.c', | |
| 72 'catalog.c', | |
| 73 'chvalid.c', | |
| 74 'debugXML.c', | |
| 75 'dict.c', | |
| 76 'DOCBparser.c', | |
| 77 'encoding.c', | |
| 78 'entities.c', | |
| 79 'error.c', | |
| 80 'globals.c', | |
| 81 'hash.c', | |
| 82 'HTMLparser.c', | |
| 83 'HTMLtree.c', | |
| 84 'legacy.c', | |
| 85 'list.c', | |
| 86 'nanoftp.c', | |
| 87 'nanohttp.c', | |
| 88 'parser.c', | |
| 89 'parserInternals.c', | |
| 90 'pattern.c', | |
| 91 'relaxng.c', | |
| 92 'SAX.c', | |
| 93 'SAX2.c', | |
| 94 'schematron.c', | |
| 95 'threads.c', | |
| 96 'tree.c', | |
| 97 'uri.c', | |
| 98 'valid.c', | |
| 99 'xinclude.c', | |
| 100 'xlink.c', | |
| 101 'xmlIO.c', | |
| 102 'xmlmemory.c', | |
| 103 'xmlmodule.c', | |
| 104 'xmlreader.c', | |
| 105 'xmlregexp.c', | |
| 106 'xmlsave.c', | |
| 107 'xmlschemas.c', | |
| 108 'xmlschemastypes.c', | |
| 109 'xmlstring.c', | |
| 110 'xmlunicode.c', | |
| 111 'xmlwriter.c', | |
| 112 'xpath.c', | |
| 113 'xpointer.c', | |
| 114 ] | |
| 115 | |
| 116 env.ChromeStaticLibrary('libxml', input_files) | |
| 117 | |
| 118 | |
| 119 if env['PLATFORM'] == 'win32': | |
| 120 config_files = [ | |
| 121 # The configure.js script must be first in this list; the | |
| 122 # env.Command() call below executes the first list element. | |
| 123 | |
| 124 'win32/configure.js', | |
| 125 'win32/Makefile.msvc', | |
| 126 | |
| 127 'config.h.in', | |
| 128 'configure.in', | |
| 129 'libxml-2.0-uninstalled.pc.in', | |
| 130 'libxml-2.0.pc.in', | |
| 131 'libxml.spec.in', | |
| 132 'xml2-config.in', | |
| 133 'xml2Conf.sh.in', | |
| 134 | |
| 135 'include/libxml/xmlversion.h.in', | |
| 136 'include/win32config.h', | |
| 137 ] | |
| 138 | |
| 139 copied_files = [] | |
| 140 for cf in config_files: | |
| 141 result = env.Command('DerivedSources/' + cf, cf, Copy('$TARGET', '$SOURCE')) | |
| 142 copied_files.extend(result) | |
| 143 | |
| 144 env.Command(['DerivedSources/config.h', | |
| 145 'DerivedSources/include/libxml/xmlversion.h'], | |
| 146 copied_files, | |
| 147 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS', | |
| 148 CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes') | |
| 149 elif env['PLATFORM'] == 'posix': | |
| 150 config_files = [ | |
| 151 'config.h', | |
| 152 'include/libxml/xmlversion.h', | |
| 153 'xml2-config', | |
| 154 ] | |
| 155 for cf in config_files: | |
| 156 result = env.Command('DerivedSources/' + cf, 'linux/' + cf, | |
| 157 Copy('$TARGET', '$SOURCE')) | |
| OLD | NEW |