Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: third_party/yasm/yasm.gyp

Issue 9181008: Add .exe extension in gyp to fix yasm build deps (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # The yasm build process creates a slew of small C subprograms that 5 # The yasm build process creates a slew of small C subprograms that
6 # dynamically generate files at various point in the build process. This makes 6 # dynamically generate files at various point in the build process. This makes
7 # the build integration moderately complex. 7 # the build integration moderately complex.
8 # 8 #
9 # There are three classes of dynamically generated files: 9 # There are three classes of dynamically generated files:
10 # 1) C source files that should be included in the build (eg., lc3bid.c) 10 # 1) C source files that should be included in the build (eg., lc3bid.c)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 '-pedantic', 48 '-pedantic',
49 ], 49 ],
50 50
51 # Locations for various generated artifacts. 51 # Locations for various generated artifacts.
52 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/yasm', 52 'shared_generated_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/yasm',
53 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm', 53 'generated_dir': '<(INTERMEDIATE_DIR)/third_party/yasm',
54 54
55 # Various files referenced by multiple targets. 55 # Various files referenced by multiple targets.
56 'version_file': 'version.mac', # Generated by genversion. 56 'version_file': 'version.mac', # Generated by genversion.
57 'genmodule_source': 'genmodule_outfile.c', 57 'genmodule_source': 'genmodule_outfile.c',
58
59 'conditions': [
60 ['OS=="win"', {
61 'exe_ext': '.exe',
62 },{
63 'exe_ext' : '',
64 }]
65 ],
58 }, 66 },
59 'targets': [ 67 'targets': [
60 { 68 {
61 'target_name': 'yasm', 69 'target_name': 'yasm',
62 'type': 'executable', 70 'type': 'executable',
63 'toolsets': ['host'], 71 'toolsets': ['host'],
64 'dependencies': [ 72 'dependencies': [
65 'config_sources', 73 'config_sources',
66 'genmacro', 74 'genmacro',
67 'genmodule', 75 'genmodule',
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 '<@(yasm_include_dirs)', 163 '<@(yasm_include_dirs)',
156 '<(shared_generated_dir)', 164 '<(shared_generated_dir)',
157 '<(generated_dir)', 165 '<(generated_dir)',
158 ], 166 ],
159 'defines': [ '<@(yasm_defines)' ], 167 'defines': [ '<@(yasm_defines)' ],
160 'cflags': [ '<@(yasm_cflags)', ], 168 'cflags': [ '<@(yasm_cflags)', ],
161 'rules': [ 169 'rules': [
162 { 170 {
163 'rule_name': 'generate_gperf', 171 'rule_name': 'generate_gperf',
164 'extension': 'gperf', 172 'extension': 'gperf',
165 'inputs': [ '<(PRODUCT_DIR)/genperf' ], 173 'inputs': [ '<(PRODUCT_DIR)/genperf<(exe_ext)' ],
166 'outputs': [ 174 'outputs': [
167 '<(generated_dir)/<(RULE_INPUT_ROOT).c', 175 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
168 ], 176 ],
169 'action': ['<(PRODUCT_DIR)/genperf', 177 'action': ['<(PRODUCT_DIR)/genperf',
170 '<(RULE_INPUT_PATH)', 178 '<(RULE_INPUT_PATH)',
171 '<(generated_dir)/<(RULE_INPUT_ROOT).c', 179 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
172 ], 180 ],
173 # These files are #included, so do not treat them as sources. 181 # These files are #included, so do not treat them as sources.
174 'process_outputs_as_sources': 0, 182 'process_outputs_as_sources': 0,
175 'message': 'yasm gperf for <(RULE_INPUT_PATH).', 183 'message': 'yasm gperf for <(RULE_INPUT_PATH).',
176 }, 184 },
177 { 185 {
178 'rule_name': 'generate_re2c', 186 'rule_name': 'generate_re2c',
179 'extension': 're', 187 'extension': 're',
180 'inputs': [ '<(PRODUCT_DIR)/re2c' ], 188 'inputs': [ '<(PRODUCT_DIR)/re2c<(exe_ext)' ],
181 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ], 189 'outputs': [ '<(generated_dir)/<(RULE_INPUT_ROOT).c', ],
182 'action': [ 190 'action': [
183 '<(PRODUCT_DIR)/re2c', 191 '<(PRODUCT_DIR)/re2c',
184 '-b', 192 '-b',
185 '-o', 193 '-o',
186 '<(generated_dir)/<(RULE_INPUT_ROOT).c', 194 '<(generated_dir)/<(RULE_INPUT_ROOT).c',
187 '<(RULE_INPUT_PATH)', 195 '<(RULE_INPUT_PATH)',
188 ], 196 ],
189 'process_outputs_as_sources': 1, 197 'process_outputs_as_sources': 1,
190 'message': 'yasm re2c for <(RULE_INPUT_PATH).', 198 'message': 'yasm re2c for <(RULE_INPUT_PATH).',
191 }, 199 },
192 ], 200 ],
193 'actions': [ 201 'actions': [
194 ### 202 ###
195 ### genmacro calls. 203 ### genmacro calls.
196 ### 204 ###
197 { 205 {
198 'action_name': 'generate_nasm_macros', 206 'action_name': 'generate_nasm_macros',
199 'variables': { 207 'variables': {
200 'infile': 'source/patched-yasm/modules/parsers/nasm/nasm-std.mac', 208 'infile': 'source/patched-yasm/modules/parsers/nasm/nasm-std.mac',
201 'varname': 'nasm_standard_mac', 209 'varname': 'nasm_standard_mac',
202 'outfile': '<(generated_dir)/nasm-macros.c', 210 'outfile': '<(generated_dir)/nasm-macros.c',
203 }, 211 },
204 'inputs': [ '<(PRODUCT_DIR)/genmacro', '<(infile)', ], 212 'inputs': [ '<(PRODUCT_DIR)/genmacro<(exe_ext)', '<(infile)', ],
205 'outputs': [ '<(outfile)', ], 213 'outputs': [ '<(outfile)', ],
206 'action': ['<(PRODUCT_DIR)/genmacro', 214 'action': ['<(PRODUCT_DIR)/genmacro',
207 '<(outfile)', '<(varname)', '<(infile)', ], 215 '<(outfile)', '<(varname)', '<(infile)', ],
208 # Not a direct source because this is #included by 216 # Not a direct source because this is #included by
209 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c 217 # source/patched-yasm/modules/parsers/nasm/nasm-parser.c
210 'process_outputs_as_sources': 1, 218 'process_outputs_as_sources': 1,
211 'message': 'yasm genmacro for <(infile).', 219 'message': 'yasm genmacro for <(infile).',
212 }, 220 },
213 { 221 {
214 'action_name': 'generate_nasm_version', 222 'action_name': 'generate_nasm_version',
215 'variables': { 223 'variables': {
216 'infile': '<(shared_generated_dir)/<(version_file)', 224 'infile': '<(shared_generated_dir)/<(version_file)',
217 'varname': 'nasm_version_mac', 225 'varname': 'nasm_version_mac',
218 'outfile': '<(generated_dir)/nasm-version.c', 226 'outfile': '<(generated_dir)/nasm-version.c',
219 }, 227 },
220 'inputs': [ '<(PRODUCT_DIR)/genmacro', '<(infile)', ], 228 'inputs': [ '<(PRODUCT_DIR)/genmacro<(exe_ext)', '<(infile)', ],
221 'outputs': [ '<(outfile)', ], 229 'outputs': [ '<(outfile)', ],
222 'action': ['<(PRODUCT_DIR)/genmacro', 230 'action': ['<(PRODUCT_DIR)/genmacro',
223 '<(outfile)', '<(varname)', '<(infile)', 231 '<(outfile)', '<(varname)', '<(infile)',
224 ], 232 ],
225 # Not a direct source because this is #included by 233 # Not a direct source because this is #included by
226 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c 234 # source/patched-yasm/modules/preprocs/nasm/nasm-preproc.c
227 'process_outputs_as_sources': 0, 235 'process_outputs_as_sources': 0,
228 'message': 'yasm genmacro for <(infile).', 236 'message': 'yasm genmacro for <(infile).',
229 }, 237 },
230 { 238 {
231 'action_name': 'generate_win64_gas', 239 'action_name': 'generate_win64_gas',
232 'variables': { 240 'variables': {
233 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-gas.mac', 241 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-gas.mac',
234 'varname': 'win64_gas_stdmac', 242 'varname': 'win64_gas_stdmac',
235 'outfile': '<(generated_dir)/win64-gas.c', 243 'outfile': '<(generated_dir)/win64-gas.c',
236 }, 244 },
237 'inputs': [ '<(PRODUCT_DIR)/genmacro', '<(infile)', ], 245 'inputs': [ '<(PRODUCT_DIR)/genmacro<(exe_ext)', '<(infile)', ],
238 'outputs': [ '<(outfile)', ], 246 'outputs': [ '<(outfile)', ],
239 'action': ['<(PRODUCT_DIR)/genmacro', 247 'action': ['<(PRODUCT_DIR)/genmacro',
240 '<(outfile)', '<(varname)', '<(infile)', 248 '<(outfile)', '<(varname)', '<(infile)',
241 ], 249 ],
242 # Not a direct source because this is #included by 250 # Not a direct source because this is #included by
243 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c 251 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c
244 'process_outputs_as_sources': 0, 252 'process_outputs_as_sources': 0,
245 'message': 'yasm genmacro for <(infile).', 253 'message': 'yasm genmacro for <(infile).',
246 }, 254 },
247 { 255 {
248 'action_name': 'generate_win64_nasm', 256 'action_name': 'generate_win64_nasm',
249 'variables': { 257 'variables': {
250 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-nasm.mac', 258 'infile': 'source/patched-yasm/modules/objfmts/coff/win64-nasm.mac',
251 'varname': 'win64_nasm_stdmac', 259 'varname': 'win64_nasm_stdmac',
252 'outfile': '<(generated_dir)/win64-nasm.c', 260 'outfile': '<(generated_dir)/win64-nasm.c',
253 }, 261 },
254 'inputs': [ '<(PRODUCT_DIR)/genmacro', '<(infile)', ], 262 'inputs': [ '<(PRODUCT_DIR)/genmacro<(exe_ext)', '<(infile)', ],
255 'outputs': [ '<(outfile)', ], 263 'outputs': [ '<(outfile)', ],
256 'action': ['<(PRODUCT_DIR)/genmacro', 264 'action': ['<(PRODUCT_DIR)/genmacro',
257 '<(outfile)', 265 '<(outfile)',
258 '<(varname)', 266 '<(varname)',
259 '<(infile)', 267 '<(infile)',
260 ], 268 ],
261 # Not a direct source because this is #included by 269 # Not a direct source because this is #included by
262 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c 270 # source/patched-yasm/modules/objfmts/coff/coff-objfmt.c
263 'process_outputs_as_sources': 0, 271 'process_outputs_as_sources': 0,
264 'message': 'yasm genmacro for <(infile).', 272 'message': 'yasm genmacro for <(infile).',
265 }, 273 },
266 274
267 ### 275 ###
268 ### genstring call. 276 ### genstring call.
269 ### 277 ###
270 { 278 {
271 'action_name': 'generate_license', 279 'action_name': 'generate_license',
272 'variables': { 280 'variables': {
273 'infile': 'source/patched-yasm/COPYING', 281 'infile': 'source/patched-yasm/COPYING',
274 'varname': 'license_msg', 282 'varname': 'license_msg',
275 'outfile': '<(generated_dir)/license.c', 283 'outfile': '<(generated_dir)/license.c',
276 }, 284 },
277 'inputs': [ '<(PRODUCT_DIR)/genstring', '<(infile)', ], 285 'inputs': [ '<(PRODUCT_DIR)/genstring<(exe_ext)', '<(infile)', ],
278 'outputs': [ '<(outfile)', ], 286 'outputs': [ '<(outfile)', ],
279 'action': ['<(PRODUCT_DIR)/genstring', 287 'action': ['<(PRODUCT_DIR)/genstring',
280 '<(varname)', 288 '<(varname)',
281 '<(outfile)', 289 '<(outfile)',
282 '<(infile)', 290 '<(infile)',
283 ], 291 ],
284 # Not a direct source because this is #included by 292 # Not a direct source because this is #included by
285 # source/patched-yasm/frontends/yasm/yasm.c 293 # source/patched-yasm/frontends/yasm/yasm.c
286 'process_outputs_as_sources': 0, 294 'process_outputs_as_sources': 0,
287 'message': 'Generating yasm embeddable license.', 295 'message': 'Generating yasm embeddable license.',
288 }, 296 },
289 297
290 ### 298 ###
291 ### A re2c call that doesn't fit into the rule below. 299 ### A re2c call that doesn't fit into the rule below.
292 ### 300 ###
293 { 301 {
294 'action_name': 'generate_lc3b_token', 302 'action_name': 'generate_lc3b_token',
295 'variables': { 303 'variables': {
296 'infile': 'source/patched-yasm/modules/arch/lc3b/lc3bid.re', 304 'infile': 'source/patched-yasm/modules/arch/lc3b/lc3bid.re',
297 # The license file is #included by yasm.c. 305 # The license file is #included by yasm.c.
298 'outfile': '<(generated_dir)/lc3bid.c', 306 'outfile': '<(generated_dir)/lc3bid.c',
299 }, 307 },
300 'inputs': [ '<(PRODUCT_DIR)/re2c', '<(infile)', ], 308 'inputs': [ '<(PRODUCT_DIR)/re2c<(exe_ext)', '<(infile)', ],
301 'outputs': [ '<(outfile)', ], 309 'outputs': [ '<(outfile)', ],
302 'action': [ 310 'action': [
303 '<(PRODUCT_DIR)/re2c', 311 '<(PRODUCT_DIR)/re2c',
304 '-s', 312 '-s',
305 '-o', '<(outfile)', 313 '-o', '<(outfile)',
306 '<(infile)' 314 '<(infile)'
307 ], 315 ],
308 'process_outputs_as_sources': 1, 316 'process_outputs_as_sources': 1,
309 'message': 'Generating yasm tokens for lc3b.', 317 'message': 'Generating yasm tokens for lc3b.',
310 }, 318 },
311 319
312 ### 320 ###
313 ### genmodule call. 321 ### genmodule call.
314 ### 322 ###
315 { 323 {
316 'action_name': 'generate_module', 324 'action_name': 'generate_module',
317 'variables': { 325 'variables': {
318 'makefile': 'source/config/<(OS)/Makefile', 326 'makefile': 'source/config/<(OS)/Makefile',
319 'module_in': 'source/patched-yasm/libyasm/module.in', 327 'module_in': 'source/patched-yasm/libyasm/module.in',
320 'outfile': '<(generated_dir)/module.c', 328 'outfile': '<(generated_dir)/module.c',
321 }, 329 },
322 'inputs': [ 330 'inputs': [
323 '<(PRODUCT_DIR)/genmodule', 331 '<(PRODUCT_DIR)/genmodule<(exe_ext)',
324 '<(module_in)', 332 '<(module_in)',
325 '<(makefile)' 333 '<(makefile)'
326 ], 334 ],
327 'outputs': [ '<(generated_dir)/module.c' ], 335 'outputs': [ '<(generated_dir)/module.c' ],
328 'action': [ 336 'action': [
329 '<(PRODUCT_DIR)/genmodule', 337 '<(PRODUCT_DIR)/genmodule',
330 '<(module_in)', 338 '<(module_in)',
331 '<(makefile)', 339 '<(makefile)',
332 '<(outfile)' 340 '<(outfile)'
333 ], 341 ],
(...skipping 21 matching lines...) Expand all
355 'genversion', 363 'genversion',
356 ], 364 ],
357 'sources': [ 365 'sources': [
358 'source/patched-yasm/modules/arch/x86/x86cpu.gperf', 366 'source/patched-yasm/modules/arch/x86/x86cpu.gperf',
359 'source/patched-yasm/modules/arch/x86/x86regtmod.gperf', 367 'source/patched-yasm/modules/arch/x86/x86regtmod.gperf',
360 ], 368 ],
361 'rules': [ 369 'rules': [
362 { 370 {
363 'rule_name': 'generate_gperf', 371 'rule_name': 'generate_gperf',
364 'extension': 'gperf', 372 'extension': 'gperf',
365 'inputs': [ '<(PRODUCT_DIR)/genperf' ], 373 'inputs': [ '<(PRODUCT_DIR)/genperf<(exe_ext)' ],
366 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ], 374 'outputs': [ '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', ],
367 'action': [ 375 'action': [
368 '<(PRODUCT_DIR)/genperf', 376 '<(PRODUCT_DIR)/genperf',
369 '<(RULE_INPUT_PATH)', 377 '<(RULE_INPUT_PATH)',
370 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c', 378 '<(shared_generated_dir)/<(RULE_INPUT_ROOT).c',
371 ], 379 ],
372 'process_outputs_as_sources': 0, 380 'process_outputs_as_sources': 0,
373 'message': 'yasm genperf for <(RULE_INPUT_PATH).', 381 'message': 'yasm genperf for <(RULE_INPUT_PATH).',
374 }, 382 },
375 ], 383 ],
(...skipping 13 matching lines...) Expand all
389 'action': [ 397 'action': [
390 'python', 398 'python',
391 '<(gen_insn_path)', 399 '<(gen_insn_path)',
392 '<(shared_generated_dir)', 400 '<(shared_generated_dir)',
393 ], 401 ],
394 'message': 'Running <(gen_insn_path).', 402 'message': 'Running <(gen_insn_path).',
395 'process_outputs_as_sources': 0, 403 'process_outputs_as_sources': 0,
396 }, 404 },
397 { 405 {
398 'action_name': 'generate_version', 406 'action_name': 'generate_version',
399 'inputs': [ '<(PRODUCT_DIR)/genversion' ], 407 'inputs': [ '<(PRODUCT_DIR)/genversion<(exe_ext)' ],
400 'outputs': [ '<(shared_generated_dir)/<(version_file)', ], 408 'outputs': [ '<(shared_generated_dir)/<(version_file)', ],
401 'action': [ 409 'action': [
402 '<(PRODUCT_DIR)/genversion', 410 '<(PRODUCT_DIR)/genversion',
403 '<(shared_generated_dir)/<(version_file)' 411 '<(shared_generated_dir)/<(version_file)'
404 ], 412 ],
405 'message': 'Generating yasm version file: ' 413 'message': 'Generating yasm version file: '
406 '<(shared_generated_dir)/<(version_file).', 414 '<(shared_generated_dir)/<(version_file).',
407 'process_outputs_as_sources': 0, 415 'process_outputs_as_sources': 0,
408 }, 416 },
409 ], 417 ],
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 'include_dirs': [ 533 'include_dirs': [
526 '<@(yasm_include_dirs)', 534 '<@(yasm_include_dirs)',
527 535
528 ], 536 ],
529 'cflags': [ 537 'cflags': [
530 '-std=gnu99', 538 '-std=gnu99',
531 ], 539 ],
532 }, 540 },
533 ], 541 ],
534 } 542 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698