summaryrefslogtreecommitdiffstats
path: root/chrome/policy_templates.gypi
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 13:49:20 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-16 13:49:20 +0000
commit991573eea1ab5aeefb920ef46a055271713d694a (patch)
tree2383d405f522d0441452d3befe9160e968a5f35e /chrome/policy_templates.gypi
parent7f123d2a3dc472dd796c13e2d7d599446fe9831d (diff)
downloadchromium_src-991573eea1ab5aeefb920ef46a055271713d694a.zip
chromium_src-991573eea1ab5aeefb920ef46a055271713d694a.tar.gz
chromium_src-991573eea1ab5aeefb920ef46a055271713d694a.tar.bz2
Move chrome/app/policy into components/policy.
This move enables using the files derived from policy_templates.json in iOS builds. List of changes: - cloud_policy_codegen.gyp and policy_templates.gypi have been merged into components/policy.gypi - policy_templates.json moved into components/policy/resources/ - policy_templates.grd and *.xtb files moved into components/policy/resources/ - syntax_check_policy_templates_json.py and chrome/tools/build/generate_policy_source.py moved into components/policy/tools BUG=271392 R=jochen@chromium.org, pastarmovj@chromium.org Review URL: https://codereview.chromium.org/108513011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/policy_templates.gypi')
-rw-r--r--chrome/policy_templates.gypi90
1 files changed, 90 insertions, 0 deletions
diff --git a/chrome/policy_templates.gypi b/chrome/policy_templates.gypi
new file mode 100644
index 0000000..adf33de
--- /dev/null
+++ b/chrome/policy_templates.gypi
@@ -0,0 +1,90 @@
+# Copyright 2013 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'pack_policy_templates',
+ 'type': 'none',
+ 'conditions': [
+ ['OS=="win" or OS=="mac" or OS=="linux"', {
+ 'dependencies': [
+ '../components/components.gyp:policy_templates',
+ ],
+ }],
+ ['OS=="win"', {
+ 'variables': {
+ 'version_path': '<(grit_out_dir)/app/policy/VERSION',
+ },
+ 'actions': [
+ {
+ 'action_name': 'add_version',
+ 'inputs': [
+ 'VERSION',
+ ],
+ 'outputs': [
+ '<(version_path)',
+ ],
+ 'action': [
+ 'cp',
+ '<@(_inputs)',
+ '<@(_outputs)',
+ ],
+ 'msvs_cygwin_shell': 1,
+ },
+ {
+ # Add all the templates generated at the previous step into
+ # a zip archive.
+ 'action_name': 'pack_templates',
+ 'variables': {
+ 'grit_grd_file': '../components/policy/resources/policy_templates.grd',
+ 'grit_info_cmd': [
+ 'python',
+ '<(DEPTH)/tools/grit/grit_info.py',
+ '<@(grit_defines)',
+ ],
+ 'template_files': [
+ '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grit_grd_file))',
+ ],
+ 'zip_script': '../components/policy/tools/make_policy_zip.py',
+ },
+ 'inputs': [
+ '<(version_path)',
+ '<@(template_files)',
+ '<(zip_script)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/policy_templates.zip',
+ ],
+ 'action': [
+ 'python',
+ '<(zip_script)',
+ '--output',
+ '<@(_outputs)',
+ '--basedir', '<(grit_out_dir)/app/policy',
+ # The list of files in the destination zip is derived from
+ # the list of output nodes in the following grd file.
+ # This whole trickery is necessary because we cannot pass
+ # the entire list of file names as command line arguments,
+ # because they would exceed the length limit on Windows.
+ '--grd_input',
+ '<(grit_grd_file)',
+ '--grd_strip_path_prefix',
+ 'app/policy',
+ '--extra_input',
+ 'VERSION',
+ # Module to be used to process grd_input'.
+ '--grit_info',
+ '<(DEPTH)/tools/grit/grit_info.py',
+ '<@(grit_defines)',
+ ],
+ 'message': 'Packing generated templates into <(_outputs)',
+ 'msvs_cygwin_shell': 1,
+ },
+ ],
+ }],
+ ],
+ },
+ ],
+}