| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 import json | 5 import json |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 import buildbot_common | 9 import buildbot_common |
| 10 import build_version | 10 import build_version |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 269 |
| 270 if IsExample(desc): | 270 if IsExample(desc): |
| 271 ProcessHTML(srcroot, dstroot, desc, toolchains, configs, | 271 ProcessHTML(srcroot, dstroot, desc, toolchains, configs, |
| 272 first_toolchain) | 272 first_toolchain) |
| 273 if not desc.get('NO_PACKAGE_FILES'): | 273 if not desc.get('NO_PACKAGE_FILES'): |
| 274 GenerateManifest(srcroot, dstroot, desc) | 274 GenerateManifest(srcroot, dstroot, desc) |
| 275 | 275 |
| 276 return (name, desc['DEST']) | 276 return (name, desc['DEST']) |
| 277 | 277 |
| 278 | 278 |
| 279 def GenerateMasterMakefile(pepperdir, out_path, targets): | 279 def GenerateMasterMakefile(pepperdir, out_path, targets, deps): |
| 280 """Generate a Master Makefile that builds all examples. | 280 """Generate a Master Makefile that builds all examples. |
| 281 | 281 |
| 282 Args: | 282 Args: |
| 283 pepperdir: NACL_SDK_ROOT | 283 pepperdir: NACL_SDK_ROOT |
| 284 out_path: Root for output such that out_path+NAME = full path | 284 out_path: Root for output such that out_path+NAME = full path |
| 285 targets: List of targets names | 285 targets: List of targets names |
| 286 """ | 286 """ |
| 287 in_path = os.path.join(SDK_RESOURCE_DIR, 'Makefile.index.template') | 287 in_path = os.path.join(SDK_RESOURCE_DIR, 'Makefile.index.template') |
| 288 out_path = os.path.join(out_path, 'Makefile') | 288 out_path = os.path.join(out_path, 'Makefile') |
| 289 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) | 289 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) |
| 290 template_dict = { | 290 template_dict = { |
| 291 'projects': targets, | 291 'projects': targets, |
| 292 'deps' : deps, |
| 292 'rel_sdk' : rel_path, | 293 'rel_sdk' : rel_path, |
| 293 } | 294 } |
| 294 RunTemplateFileIfChanged(in_path, out_path, template_dict) | 295 RunTemplateFileIfChanged(in_path, out_path, template_dict) |
| 295 outdir = os.path.dirname(os.path.abspath(out_path)) | 296 outdir = os.path.dirname(os.path.abspath(out_path)) |
| 296 if getos.GetPlatform() == 'win': | 297 if getos.GetPlatform() == 'win': |
| 297 AddMakeBat(pepperdir, outdir) | 298 AddMakeBat(pepperdir, outdir) |
| OLD | NEW |