OLD | NEW |
1 # Copyright 2008, Google Inc. | 1 # Copyright 2008, Google Inc. |
2 # All rights reserved. | 2 # All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 'DerivedSources', | 42 'DerivedSources', |
43 'DerivedSources/include', | 43 'DerivedSources/include', |
44 'include', | 44 'include', |
45 ], | 45 ], |
46 CPPDEFINES = [ | 46 CPPDEFINES = [ |
47 'U_STATIC_IMPLEMENTATION', | 47 'U_STATIC_IMPLEMENTATION', |
48 'LIBXML_STATIC', | 48 'LIBXML_STATIC', |
49 ], | 49 ], |
50 ) | 50 ) |
51 | 51 |
52 if env['PLATFORM'] == 'win32': | 52 if env.Bit('windows'): |
53 env.Append( | 53 env.Append( |
54 CCFLAGS = [ | 54 CCFLAGS = [ |
55 '/TC', | 55 '/TC', |
56 '/wd4800', | 56 '/wd4800', |
57 ], | 57 ], |
58 ) | 58 ) |
59 elif env['PLATFORM'] == 'posix': | 59 elif env.Bit('linux'): |
60 env.Append( | 60 env.Append( |
61 CPPDEFINES = [ | 61 CPPDEFINES = [ |
62 '_REENTRANT', | 62 '_REENTRANT', |
63 ], | 63 ], |
64 ) | 64 ) |
65 if '-Wall' in env['CCFLAGS']: | 65 if '-Wall' in env['CCFLAGS']: |
66 # We're not responsible for bad warning hygiene in this third party code. | 66 # We're not responsible for bad warning hygiene in this third party code. |
67 env['CCFLAGS'].remove('-Werror') | 67 env['CCFLAGS'].remove('-Werror') |
68 | 68 |
69 | 69 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 'xmlstring.c', | 109 'xmlstring.c', |
110 'xmlunicode.c', | 110 'xmlunicode.c', |
111 'xmlwriter.c', | 111 'xmlwriter.c', |
112 'xpath.c', | 112 'xpath.c', |
113 'xpointer.c', | 113 'xpointer.c', |
114 ] | 114 ] |
115 | 115 |
116 env.ChromeStaticLibrary('libxml', input_files) | 116 env.ChromeStaticLibrary('libxml', input_files) |
117 | 117 |
118 | 118 |
119 if env['PLATFORM'] == 'win32': | 119 if env.Bit('windows'): |
120 config_files = [ | 120 config_files = [ |
121 # The configure.js script must be first in this list; the | 121 # The configure.js script must be first in this list; the |
122 # env.Command() call below executes the first list element. | 122 # env.Command() call below executes the first list element. |
123 | 123 |
124 'win32/configure.js', | 124 'win32/configure.js', |
125 'win32/Makefile.msvc', | 125 'win32/Makefile.msvc', |
126 | 126 |
127 'config.h.in', | 127 'config.h.in', |
128 'configure.in', | 128 'configure.in', |
129 'libxml-2.0-uninstalled.pc.in', | 129 'libxml-2.0-uninstalled.pc.in', |
130 'libxml-2.0.pc.in', | 130 'libxml-2.0.pc.in', |
131 'libxml.spec.in', | 131 'libxml.spec.in', |
132 'xml2-config.in', | 132 'xml2-config.in', |
133 'xml2Conf.sh.in', | 133 'xml2Conf.sh.in', |
134 | 134 |
135 'include/libxml/xmlversion.h.in', | 135 'include/libxml/xmlversion.h.in', |
136 'include/win32config.h', | 136 'include/win32config.h', |
137 ] | 137 ] |
138 | 138 |
139 copied_files = [] | 139 copied_files = [] |
140 for cf in config_files: | 140 for cf in config_files: |
141 result = env.Command('DerivedSources/' + cf, cf, Copy('$TARGET', '$SOURCE')) | 141 result = env.Command('DerivedSources/' + cf, cf, Copy('$TARGET', '$SOURCE')) |
142 copied_files.extend(result) | 142 copied_files.extend(result) |
143 | 143 |
144 env.Command(['DerivedSources/config.h', | 144 env.Command(['DerivedSources/config.h', |
145 'DerivedSources/include/libxml/xmlversion.h'], | 145 'DerivedSources/include/libxml/xmlversion.h'], |
146 copied_files, | 146 copied_files, |
147 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS', | 147 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS', |
148 CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes') | 148 CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes') |
149 elif env['PLATFORM'] == 'posix': | 149 elif env.Bit('linux'): |
150 config_files = [ | 150 config_files = [ |
151 'config.h', | 151 'config.h', |
152 'include/libxml/xmlversion.h', | 152 'include/libxml/xmlversion.h', |
153 'xml2-config', | 153 'xml2-config', |
154 ] | 154 ] |
155 for cf in config_files: | 155 for cf in config_files: |
156 result = env.Command('DerivedSources/' + cf, 'linux/' + cf, | 156 result = env.Command('DerivedSources/' + cf, 'linux/' + cf, |
157 Copy('$TARGET', '$SOURCE')) | 157 Copy('$TARGET', '$SOURCE')) |
OLD | NEW |