Chromium Code Reviews| Index: chrome/app/policy/cloud_policy_codegen.gyp |
| diff --git a/chrome/app/policy/cloud_policy_codegen.gyp b/chrome/app/policy/cloud_policy_codegen.gyp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fd5e98c8ffa6d43b8c8ba6971b43aa5f098c5e3c |
| --- /dev/null |
| +++ b/chrome/app/policy/cloud_policy_codegen.gyp |
| @@ -0,0 +1,195 @@ |
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +{ |
| + 'variables': { |
| + 'chromium_code': 1, |
| + 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', |
| + 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', |
| + 'generate_policy_source_script': |
|
Mark Mentovai
2011/02/10 18:42:19
Everything in here that’s a path needs to be in a
Jakob Kummerow
2011/02/14 16:14:26
Done. (Except for 'proto_path_substr' which is use
|
| + ['python', '../../tools/build/generate_policy_source.py'], |
| + 'policy_constant_header': '<(policy_out_dir)/policy/policy_constants.h', |
| + 'policy_constant_source': '<(policy_out_dir)/policy/policy_constants.cc', |
| + 'configuration_policy_type_header': |
| + '<(policy_out_dir)/policy/configuration_policy_type.h', |
| + 'protobuf_decoder': '<(policy_out_dir)/policy/cloud_policy_generated.cc', |
| + 'cloud_policy_proto': '<(policy_out_dir)/policy/cloud_policy.proto', |
| + 'proto_path_substr': 'chrome/browser/policy/proto', |
| + 'proto_rel_path': '../../../<(proto_path_substr)', |
| + }, |
| + 'targets': [ |
| + { |
| + 'target_name': 'cloud_policy_code_generate', |
| + 'type': 'none', |
| + 'actions': [ |
| + { |
|
Mark Mentovai
2011/02/10 18:42:19
Weird indent here. It should only be two spaces in
Jakob Kummerow
2011/02/14 16:14:26
Done. I'm surprised that I didn't notice that myse
|
| + 'inputs': [ |
| + 'policy_templates.json', |
| + '../../tools/build/generate_policy_source.py' |
| + ], |
| + 'outputs': [ |
| + '<(policy_constant_header)', |
| + '<(policy_constant_source)', |
| + '<(configuration_policy_type_header)', |
| + '<(protobuf_decoder)', |
| + '<(cloud_policy_proto)', |
| + ], |
| + 'action_name': 'generate_policy_source', |
| + 'action': [ |
| + '<@(generate_policy_source_script)', |
| + '--policy-constants-header=<(policy_constant_header)', |
| + '--policy-constants-source=<(policy_constant_source)', |
| + '--policy-type-header=<(configuration_policy_type_header)', |
| + '--policy-protobuf=<(cloud_policy_proto)', |
| + '--protobuf-decoder=<(protobuf_decoder)', |
| + '<(OS)', |
| + 'policy_templates.json', |
| + ], |
| + 'message': 'Generating policy source', |
| + }, |
| + ], |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(policy_out_dir)', |
| + '<(protoc_out_dir)', |
| + ], |
| + }, |
|
Mark Mentovai
2011/02/10 18:42:19
Looks like this is where the weird indentation end
Jakob Kummerow
2011/02/14 16:14:26
Done.
|
| + }, |
| + { |
| + 'target_name': 'cloud_policy_proto_compile', |
| + 'type': 'none', |
| + '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', |
| + }, |
| + ], |
| + 'dependencies': [ |
| + '../../../third_party/protobuf/protobuf.gyp:protoc#host', |
| + 'cloud_policy_code_generate', |
| + ], |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(protoc_out_dir)', |
| + ] |
| + }, |
| + }, |
| + { |
| + 'target_name': 'cloud_policy_backend_header_compile', |
| + 'type': 'none', |
| + 'sources': [ |
| + '<(proto_rel_path)/device_management_backend.proto', |
| + '<(proto_rel_path)/device_management_local.proto', |
| + ], |
| + '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=<(policy_out_dir)/policy', |
| + '--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': [ |
| + '../../../third_party/protobuf/protobuf.gyp:protoc#host', |
| + 'cloud_policy_proto_compile', |
| + ], |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(protoc_out_dir)', |
| + ] |
| + }, |
| + }, |
| + { |
| + 'target_name': 'policy', |
| + 'type': '<(library)', |
| + 'hard_dependency': 1, |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(policy_out_dir)' |
| + ], |
| + }, |
| + 'sources': [ |
| + '<(policy_constant_header)', |
| + '<(policy_constant_source)', |
| + '<(configuration_policy_type_header)', |
| + '<(protobuf_decoder)', |
| + ], |
| + 'include_dirs': [ |
| + '../../..', |
| + ], |
| + 'dependencies': [ |
| + 'cloud_policy_code_generate', |
| + 'cloud_policy_proto_compile', |
| + 'cloud_policy_backend_header_compile', |
| + '../../../third_party/protobuf/protobuf.gyp:protobuf_lite', |
| + ], |
| + }, |
| + ], |
| + 'conditions': [ |
| + ['OS=="win"', { |
| + 'targets': [ |
| + { |
| + 'target_name': 'policy_win64', |
| + 'type': '<(library)', |
| + 'hard_dependency': 1, |
| + 'sources': [ |
| + '<(policy_constant_header)', |
| + '<(policy_constant_source)', |
| + '<(configuration_policy_type_header)', |
| + ], |
| + 'direct_dependent_settings': { |
| + 'include_dirs': [ |
| + '<(policy_out_dir)' |
| + ], |
| + }, |
| + 'dependencies': [ |
| + 'cloud_policy_code_generate', |
| + ], |
| + 'configurations': { |
| + 'Common_Base': { |
| + 'msvs_target_platform': 'x64', |
| + }, |
| + }, |
| + }, |
| + ], |
| + }], |
| + ], # 'conditions' |
| +} |
| + |
| +# Local Variables: |
| +# tab-width:2 |
| +# indent-tabs-mode:nil |
| +# End: |
| +# vim: set expandtab tabstop=2 shiftwidth=2: |