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

Side by Side Diff: sdk_build/data/cpp/cpp.sdk

Issue 1748073002: SDK: Add a Makefile to build the C++ stuff. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 # This file contains steps for "building" a C/C++ SDK. It is processed by 5 # This file contains steps for "building" a C/C++ SDK. It is processed by
6 # //mojo/sdk_build/build_sdk.py. 6 # //mojo/sdk_build/build_sdk.py.
7 # TODO(vtl): This isn't done yet. 7 # TODO(vtl): This isn't done yet. (Or is it?)
8 8
9 import re 9 import re
10 10
11 EXCLUDE_FILES=[".*", "*.gn", "*.gni", "PRESUBMIT.py", "*_win.*"] 11 EXCLUDE_FILES=[".*", "*.gn", "*.gni", "PRESUBMIT.py", "*_win.*"]
12 EXCLUDE_PATHS=["*/tests/*"] 12 EXCLUDE_PATHS=["*/tests/*"]
13 13
14 WriteFile("MOJO_SDK_VERSION", "%s\n" % GitGetRevision()) 14 WriteFile("MOJO_SDK_VERSION", "%s\n" % GitGetRevision())
15 15
16 CopyDir("mojo/public", 16 CopyDir("mojo/public",
17 "mojo/public", 17 "mojo/public",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 CopyDir("mojo/public/python/dummy_mojo_system", 59 CopyDir("mojo/public/python/dummy_mojo_system",
60 "mojo/public/python/dummy_mojo_system", 60 "mojo/public/python/dummy_mojo_system",
61 recursive=True) 61 recursive=True)
62 CopyDir("mojo/public/python/mojo_bindings", 62 CopyDir("mojo/public/python/mojo_bindings",
63 "mojo/public/python/mojo_bindings", 63 "mojo/public/python/mojo_bindings",
64 recursive=True) 64 recursive=True)
65 65
66 # Scripts to download binaries. 66 # Scripts to download binaries.
67 CopyFiles(["sdk_build/data/common/download_file_from_google_storage.py", 67 CopyFiles(["sdk_build/data/common/download_file_from_google_storage.py",
68 "sdk_build/data/common/download_mojom_tool.sh", 68 "sdk_build/data/common/download_mojom_tool.sh",
69 "sdk_build/data/cpp/download_clang.sh"], 69 "sdk_build/data/cpp/download_clang.sh",
70 "sdk_build/data/cpp/setup.sh"],
70 "mojo_sdk_setup") 71 "mojo_sdk_setup")
71 72
72 # Figure out the version of clang, and include that. (This is a little janky, 73 # Figure out the version of clang, and include that. (This is a little janky,
73 # but it's how we roll.) 74 # but it's how we roll.)
74 clang_update_script = ReadFile("tools/clang/scripts/update.sh") 75 clang_update_script = ReadFile("tools/clang/scripts/update.sh")
75 clang_revision = re.search(r"^CLANG_REVISION=(\d+)$", 76 clang_revision = re.search(r"^CLANG_REVISION=(\d+)$",
76 clang_update_script, 77 clang_update_script,
77 re.MULTILINE).group(1) 78 re.MULTILINE).group(1)
78 clang_sub_revision = re.search(r"^CLANG_SUB_REVISION=(\d+)$", 79 clang_sub_revision = re.search(r"^CLANG_SUB_REVISION=(\d+)$",
79 clang_update_script, 80 clang_update_script,
80 re.MULTILINE).group(1) 81 re.MULTILINE).group(1)
81 WriteFile("mojo_sdk_setup/data/CLANG_VERSION", 82 WriteFile("mojo_sdk_setup/data/CLANG_VERSION",
82 "%s-%s\n" % (clang_revision, clang_sub_revision)) 83 "%s-%s\n" % (clang_revision, clang_sub_revision))
83 84
84 # Seed an example. 85 # Seed an example.
85 CopyDir("examples/hello_mojo", 86 CopyDir("examples/hello_mojo",
86 "examples/hello_mojo", 87 "examples/hello_mojo",
87 recursive=True, 88 recursive=True,
88 exclude_file_patterns=EXCLUDE_FILES) 89 exclude_file_patterns=EXCLUDE_FILES)
90
91 # Put in a simple example Makefile (in the root directory).
92 CopyFiles("sdk_build/data/cpp/Makefile", "")
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698