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

Unified Diff: tools/gn/substitution_type.cc

Issue 1751903003: Add "bundle_data" target as first step for adding bundle support to gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-typos
Patch Set: Rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/substitution_type.h ('k') | tools/gn/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_type.cc
diff --git a/tools/gn/substitution_type.cc b/tools/gn/substitution_type.cc
index b66e0870965d7dc26495643e73c45c750b5789a3..93a32bd6e4c57264ac9d7e283e70ee997796083c 100644
--- a/tools/gn/substitution_type.cc
+++ b/tools/gn/substitution_type.cc
@@ -46,6 +46,11 @@ const char* kSubstitutionNames[SUBSTITUTION_NUM_TYPES] = {
"{{output_extension}}", // SUBSTITUTION_OUTPUT_EXTENSION
"{{solibs}}", // SUBSTITUTION_SOLIBS
+ "{{bundle_root_dir}}", // SUBSTITUTION_BUNDLE_ROOT_DIR
+ "{{bundle_resources_dir}}", // SUBSTITUTION_BUNDLE_RESOURCES_DIR
+ "{{bundle_executable_dir}}", // SUBSTITUTION_BUNDLE_EXECUTABLE_DIR
+ "{{bundle_plugins_dir}}", // SUBSTITUTION_BUNDLE_PLUGINS_DIR
+
"{{response_file_name}}", // SUBSTITUTION_RSP_FILE_NAME
};
@@ -89,6 +94,11 @@ const char* kSubstitutionNinjaNames[SUBSTITUTION_NUM_TYPES] = {
"output_extension", // SUBSTITUTION_OUTPUT_EXTENSION
"solibs", // SUBSTITUTION_SOLIBS
+ "bundle_root_dir", // SUBSTITUTION_BUNDLE_ROOT_DIR
+ "bundle_resources_dir", // SUBSTITUTION_BUNDLE_RESOURCES_DIR
+ "bundle_executable_dir", // SUBSTITUTION_BUNDLE_EXECUTABLE_DIR
+ "bundle_plugins_dir", // SUBSTITUTION_BUNDLE_PLUGINS_DIR
+
"rspfile", // SUBSTITUTION_RSP_FILE_NAME
};
@@ -116,6 +126,24 @@ bool SubstitutionIsInOutputDir(SubstitutionType type) {
type == SUBSTITUTION_TARGET_OUT_DIR;
}
+bool SubstitutionIsInBundleDir(SubstitutionType type) {
+ return type == SUBSTITUTION_BUNDLE_ROOT_DIR ||
+ type == SUBSTITUTION_BUNDLE_RESOURCES_DIR ||
+ type == SUBSTITUTION_BUNDLE_EXECUTABLE_DIR ||
+ type == SUBSTITUTION_BUNDLE_PLUGINS_DIR;
+}
+
+bool IsValidBundleDataSubstitution(SubstitutionType type) {
+ return type == SUBSTITUTION_LITERAL ||
+ type == SUBSTITUTION_SOURCE_NAME_PART ||
+ type == SUBSTITUTION_SOURCE_FILE_PART ||
+ type == SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR ||
+ type == SUBSTITUTION_BUNDLE_ROOT_DIR ||
+ type == SUBSTITUTION_BUNDLE_RESOURCES_DIR ||
+ type == SUBSTITUTION_BUNDLE_EXECUTABLE_DIR ||
+ type == SUBSTITUTION_BUNDLE_PLUGINS_DIR;
+}
+
bool IsValidSourceSubstitution(SubstitutionType type) {
return type == SUBSTITUTION_LITERAL ||
type == SUBSTITUTION_SOURCE ||
« no previous file with comments | « tools/gn/substitution_type.h ('k') | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698