OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # This .gypi makes it easier to use the (FAKE) apiildc.py tool. To use the |
| 6 # .gypi, define a target whose job it is to convert .tmpl files to source |
| 7 # files: |
| 8 # |
| 9 # { |
| 10 # 'target_name': 'apiidlc_my_set_of_files', |
| 11 # 'type': 'none', |
| 12 # 'variables': { |
| 13 # 'apiidlc_in_dir': '.', |
| 14 # 'source_files': [ |
| 15 # 'browser/foo/bar/baz.cc.tmpl', |
| 16 # 'browser/foo/bar/baz.h.tmpl', |
| 17 # ], |
| 18 # 'output_files': [ |
| 19 # '<(apiidlc_out_dir)/browser/foo/bar/baz.cc', |
| 20 # '<(apiidlc_out_dir)/browser/foo/bar/baz.h', |
| 21 # ], |
| 22 # }, |
| 23 # 'includes': [ '../build/apiidlc.gypi' ], |
| 24 # } |
| 25 # |
| 26 # Then include that target_name in your own target's list of targets. Finally, |
| 27 # include the output files in your own target's sources: |
| 28 # |
| 29 # # Generated by apiidlc_my_set_of_files. |
| 30 # '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/browser/foo/bar/baz.cc', |
| 31 # '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/browser/foo/bar/baz.h', |
| 32 # |
| 33 # (note the chrome/ added to the paths.) |
| 34 # |
| 35 # The repetition is regrettable. If you are clever with GYP you are welcome to |
| 36 # refactor these files to fix that. |
| 37 |
| 38 { |
| 39 'variables': { |
| 40 'apiidlc_out_dir': |
| 41 '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/<(apiidlc_in_dir)', |
| 42 'tool_dir': '<(DEPTH)/ppapi/generators', |
| 43 }, |
| 44 'actions': [{ |
| 45 'action_name': 'apiidlc_generate', |
| 46 'inputs': [ '<(tool_dir)/apiidlc.py', |
| 47 '<@(source_files)', |
| 48 ], |
| 49 'outputs': [ |
| 50 '<@(output_files)', |
| 51 ], |
| 52 'action': ['python', '<(tool_dir)/apiidlc.py', |
| 53 '-i', '<(apiidlc_in_dir)', |
| 54 '-o', '<(apiidlc_out_dir)', |
| 55 '-d', '<(DEPTH)/ppapi/apps_tests/experimental.socket.idl', |
| 56 '<@(source_files)', |
| 57 ], |
| 58 }], |
| 59 'direct_dependent_settings': { |
| 60 'include_dirs': [ |
| 61 '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out', |
| 62 ], |
| 63 }, |
| 64 'hard_dependency': 1, |
| 65 } |
OLD | NEW |