| Index: native_client_sdk/src/build_tools/generate_make.py
|
| diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py
|
| index 17fbcc904d596e37df969b74ac701b7aa98114bc..2b402d5699793ee1f1707da7d79adb4a23e29ef7 100644
|
| --- a/native_client_sdk/src/build_tools/generate_make.py
|
| +++ b/native_client_sdk/src/build_tools/generate_make.py
|
| @@ -26,6 +26,11 @@ def IsExample(desc):
|
|
|
| def GenerateSourceCopyList(desc):
|
| sources = []
|
| + # Some examples use their own Makefile/sources/etc.
|
| + if 'TARGETS' not in desc:
|
| + # Only copy the DATA files.
|
| + return desc.get('DATA', [])
|
| +
|
| # Add sources for each target
|
| for target in desc['TARGETS']:
|
| sources.extend(target['SOURCES'])
|
| @@ -196,6 +201,14 @@ def ProcessProject(pepperdir, srcroot, dstroot, desc, toolchains, configs=None,
|
|
|
| make_path = os.path.join(out_dir, 'Makefile')
|
|
|
| + outdir = os.path.dirname(os.path.abspath(make_path))
|
| + if getos.GetPlatform() == 'win':
|
| + AddMakeBat(pepperdir, outdir)
|
| +
|
| + # If this project has no TARGETS, then we don't need to generate anything.
|
| + if 'TARGETS' not in desc:
|
| + return (name, desc['DEST'])
|
| +
|
| if IsNexe(desc):
|
| template = os.path.join(SDK_RESOURCE_DIR, 'Makefile.example.template')
|
| else:
|
| @@ -219,10 +232,6 @@ def ProcessProject(pepperdir, srcroot, dstroot, desc, toolchains, configs=None,
|
| }
|
| RunTemplateFileIfChanged(template, make_path, template_dict)
|
|
|
| - outdir = os.path.dirname(os.path.abspath(make_path))
|
| - if getos.GetPlatform() == 'win':
|
| - AddMakeBat(pepperdir, outdir)
|
| -
|
| if IsExample(desc):
|
| ProcessHTML(srcroot, dstroot, desc, toolchains, configs,
|
| first_toolchain)
|
|
|