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

Unified Diff: chrome/app/policy/cloud_policy_codegen.gyp

Issue 9317034: Revert 120063 - Remove hand-rolled cases of protobufs generations/compilation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/test/test_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/policy/cloud_policy_codegen.gyp
===================================================================
--- chrome/app/policy/cloud_policy_codegen.gyp (revision 120065)
+++ chrome/app/policy/cloud_policy_codegen.gyp (working copy)
@@ -60,17 +60,37 @@
{
'target_name': 'cloud_policy_proto_compile',
'type': 'none',
- 'sources': [
- '<(policy_out_dir)/policy/cloud_policy.proto',
+ 'actions': [
+ {
+ 'action_name': 'compile_generated_proto',
+ 'inputs': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ '<(policy_out_dir)/policy/cloud_policy.proto',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/pyproto/device_management_pb/cloud_policy_pb2.py',
+ '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.h',
+ '<(protoc_out_dir)/<(proto_path_substr)/cloud_policy.pb.cc',
+ ],
+ 'action': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ '--proto_path=<(policy_out_dir)/policy',
+ '<(policy_out_dir)/policy/cloud_policy.proto',
+ '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)',
+ '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb',
+ ],
+ 'message': 'Compiling generated cloud policy protobuf',
+ },
],
- 'variables': {
- 'proto_in_dir': '<(policy_out_dir)/policy',
- 'proto_out_dir': '<(proto_path_substr)',
- },
'dependencies': [
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host',
'cloud_policy_code_generate',
],
- 'includes': [ '../../../build/protoc.gypi' ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(protoc_out_dir)',
+ ]
+ },
},
{
'target_name': 'cloud_policy_backend_header_compile',
@@ -81,14 +101,36 @@
'<(proto_rel_path)/device_management_local.proto',
'<(proto_rel_path)/old_generic_format.proto',
],
- 'variables': {
- 'proto_in_dir': '<(proto_rel_path)',
- 'proto_out_dir': '<(proto_path_substr)',
- },
+ 'rules': [
+ {
+ 'rule_name': 'gen_proto',
+ 'extension': 'proto',
+ 'inputs': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/pyproto/device_management_pb/<(RULE_INPUT_ROOT)_pb2.py',
+ '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.h',
+ '<(protoc_out_dir)/<(proto_path_substr)/<(RULE_INPUT_ROOT).pb.cc',
+ ],
+ 'action': [
+ '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)',
+ '--proto_path=<(proto_rel_path)',
+ '<(proto_rel_path)/<(RULE_INPUT_NAME)',
+ '--cpp_out=<(protoc_out_dir)/<(proto_path_substr)',
+ '--python_out=<(PRODUCT_DIR)/pyproto/device_management_pb',
+ ],
+ 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
+ },
+ ],
'dependencies': [
- 'cloud_policy_code_generate',
+ '<(DEPTH)/third_party/protobuf/protobuf.gyp:protoc#host',
],
- 'includes': [ '../../../build/protoc.gypi' ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(protoc_out_dir)',
+ ]
+ },
},
{
'target_name': 'policy',
« no previous file with comments | « no previous file | net/test/test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698