| Index: build/apiidlc.gypi
|
| diff --git a/build/apiidlc.gypi b/build/apiidlc.gypi
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..02574dee4994d1cadb0ab402dfabd959973e6565
|
| --- /dev/null
|
| +++ b/build/apiidlc.gypi
|
| @@ -0,0 +1,65 @@
|
| +# Copyright (c) 2012 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.
|
| +
|
| +# This .gypi makes it easier to use the (FAKE) apiildc.py tool. To use the
|
| +# .gypi, define a target whose job it is to convert .tmpl files to source
|
| +# files:
|
| +#
|
| +# {
|
| +# 'target_name': 'apiidlc_my_set_of_files',
|
| +# 'type': 'none',
|
| +# 'variables': {
|
| +# 'apiidlc_in_dir': '.',
|
| +# 'source_files': [
|
| +# 'browser/foo/bar/baz.cc.tmpl',
|
| +# 'browser/foo/bar/baz.h.tmpl',
|
| +# ],
|
| +# 'output_files': [
|
| +# '<(apiidlc_out_dir)/browser/foo/bar/baz.cc',
|
| +# '<(apiidlc_out_dir)/browser/foo/bar/baz.h',
|
| +# ],
|
| +# },
|
| +# 'includes': [ '../build/apiidlc.gypi' ],
|
| +# }
|
| +#
|
| +# Then include that target_name in your own target's list of targets. Finally,
|
| +# include the output files in your own target's sources:
|
| +#
|
| +# # Generated by apiidlc_my_set_of_files.
|
| +# '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/browser/foo/bar/baz.cc',
|
| +# '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/browser/foo/bar/baz.h',
|
| +#
|
| +# (note the chrome/ added to the paths.)
|
| +#
|
| +# The repetition is regrettable. If you are clever with GYP you are welcome to
|
| +# refactor these files to fix that.
|
| +
|
| +{
|
| + 'variables': {
|
| + 'apiidlc_out_dir':
|
| + '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out/chrome/<(apiidlc_in_dir)',
|
| + 'tool_dir': '<(DEPTH)/ppapi/generators',
|
| + },
|
| + 'actions': [{
|
| + 'action_name': 'apiidlc_generate',
|
| + 'inputs': [ '<(tool_dir)/apiidlc.py',
|
| + '<@(source_files)',
|
| + ],
|
| + 'outputs': [
|
| + '<@(output_files)',
|
| + ],
|
| + 'action': ['python', '<(tool_dir)/apiidlc.py',
|
| + '-i', '<(apiidlc_in_dir)',
|
| + '-o', '<(apiidlc_out_dir)',
|
| + '-d', '<(DEPTH)/ppapi/apps_tests/experimental.socket.idl',
|
| + '<@(source_files)',
|
| + ],
|
| + }],
|
| + 'direct_dependent_settings': {
|
| + 'include_dirs': [
|
| + '<(SHARED_INTERMEDIATE_DIR)/apiidlc_out',
|
| + ],
|
| + },
|
| + 'hard_dependency': 1,
|
| +}
|
|
|