summaryrefslogtreecommitdiffstats
path: root/ios/chrome/ios_today_extension_resources.gyp
blob: 3af1d796a51b1fa1589f54777fc1c8e2c644fe9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 2015 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,
    'grit_base_dir': '<(SHARED_INTERMEDIATE_DIR)',
    'grit_out_dir': '<(grit_base_dir)/ios/today_extension',
  },
  'targets': [
    {
      'target_name': 'ios_today_extension_resources',
      'type': 'none',
      'dependencies': [
        'ios_today_extension_strings_gen',
      ],
    },
    {
      'target_name': 'ios_today_extension_strings_gen',
      'type': 'none',
      'hard_dependency': 1,
      'actions': [
        {
          'action_name': 'generate_ios_today_extension_strings',
          'variables': {
            'grit_whitelist': '',
            'grit_grd_file': 'today_extension/strings/ios_today_extension_strings.grd',
          },
          'includes': [ '../../build/grit_action.gypi' ],
        },
      ],
      'includes': [ '../../build/grit_target.gypi' ],
      # Override the exported include-dirs; ios/chrome/grit/ios_*strings.h
      # should only be referenceable as ios/chrome/grit to allow DEPS-time
      # checking of usage.
      'direct_dependent_settings': {
        'include_dirs': [
          '<(grit_base_dir)',
        ],
        'include_dirs!': [
          '<(grit_out_dir)',
        ],
      }
    },
    {
      'target_name': 'ios_today_extension_packed_resources',
      'type': 'none',
      'dependencies': [
        'ios_today_extension_resources',
      ],
      'actions': [
        {
          'action_name': 'repack_ios_today_extension_locales',
          'variables': {
            'repack_locales_path': 'tools/build/ios_repack_today_extension_locales.py',
          },
          'inputs': [
            'tools/build/ios_repack_today_extension_locales.py',
            '<!@pymod_do_main(ios_repack_today_extension_locales -i '
              '-s <(SHARED_INTERMEDIATE_DIR) '
              '-x <(SHARED_INTERMEDIATE_DIR)/repack_today_extension '
              '-b <(branding_path_component) '
              '<(locales))'
          ],
          'outputs': [
            '<!@pymod_do_main(ios_repack_today_extension_locales -o '
              '-s <(SHARED_INTERMEDIATE_DIR) '
              '-x <(SHARED_INTERMEDIATE_DIR)/repack_today_extension '
              '<(locales))'
          ],
          'action': [
            'python',
            'tools/build/ios_repack_today_extension_locales.py',
            '-x', '<(SHARED_INTERMEDIATE_DIR)/repack_today_extension',
            '-s', '<(SHARED_INTERMEDIATE_DIR)',
            '-b', '<(branding_path_component)',
            '<@(locales)',
          ],
        },
      ],
    },
  ],
}