suriab / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

GYP cannot handle rules without sources (with patch) #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a rule without 'inputs' field
3. Run gyp

What is the expected output?

I'd like to be able to generate headers and sources for my proto files. I 
added a special target on the protobuf.gyp file which export the following 
rule:

'direct_dependent_settings': {
  'rules': [
    {
      'rule_name': 'protoc',
      'extension': 'proto',
      'outputs': [
        '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).pb.h',
        '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).pb.cc',
      ],
      'action': [
        '<(PRODUCT_DIR)/protoc',
        '<(INTERMEDIATE_DIR)',
        '<(RULE_INPUT_ROOT).proto',
        '--cpp_out=<(INTERMEDIATE_DIR)',
      ],
      'message': 'Compiling protocol buffer <(RULE_INPUT_ROOT).proto',
      'process_outputs_as_sources': 1,
    },
  ],
}

What do you see instead?

GYP crashes while parsing my gyp files.

What version of the product are you using? On what operating system?

HEAD of svn as of March 18, 2010. All, this is caused by python code.

Please provide any additional information below.

Original issue reported on code.google.com by igorga...@gmail.com on 18 Mar 2010 at 5:34

Attachments:

GoogleCodeExporter commented 9 years ago
http://codereview.chromium.org/3358009/show

Original comment by bradnelson@google.com on 3 Sep 2010 at 1:16

GoogleCodeExporter commented 9 years ago
Commited.

Original comment by bradnelson@google.com on 3 Sep 2010 at 1:39