Chromium Code Reviews| Index: build/protoc.gypi |
| diff --git a/build/protoc.gypi b/build/protoc.gypi |
| index 555c5be45d29f3e0866eddc6aa996ec6a8a675ad..a552c7bccf87d7a7f85e02911c2056605f256774 100644 |
| --- a/build/protoc.gypi |
| +++ b/build/protoc.gypi |
| @@ -43,6 +43,7 @@ |
| 'cc_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out/<(proto_out_dir)', |
| 'py_dir': '<(PRODUCT_DIR)/pyproto/<(proto_out_dir)', |
| 'proto_in_dir%': '.', |
| + 'proto_relpath%': '.', |
|
Ryan Sleevi
2012/02/13 19:32:12
Can you not define proto_relpath as '', and let ch
KushalP
2012/02/14 11:36:07
I could, but then that doesn't follow the idioms o
Ryan Sleevi
2012/02/15 20:15:29
You should be able to make this at least '' rather
|
| }, |
| 'rules': [ |
| { |
| @@ -52,16 +53,16 @@ |
| '<(protoc)', |
| ], |
| 'outputs': [ |
| - '<(py_dir)/<(RULE_INPUT_ROOT)_pb2.py', |
| - '<(cc_dir)/<(RULE_INPUT_ROOT).pb.cc', |
| - '<(cc_dir)/<(RULE_INPUT_ROOT).pb.h', |
| + '<(py_dir)/<(proto_relpath)/<(RULE_INPUT_ROOT)_pb2.py', |
|
Ryan Sleevi
2012/02/13 19:32:12
So this becomes
<(py_dir)/<(proto_relpath)<(RULE_I
|
| + '<(cc_dir)/<(proto_relpath)/<(RULE_INPUT_ROOT).pb.cc', |
| + '<(cc_dir)/<(proto_relpath)/<(RULE_INPUT_ROOT).pb.h', |
| ], |
| 'action': [ |
| '<(protoc)', |
| '--proto_path=<(proto_in_dir)', |
| # Naively you'd use <(RULE_INPUT_PATH) here, but protoc requires |
| # --proto_path is a strict prefix of the path given as an argument. |
| - '<(proto_in_dir)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', |
| + '<(proto_in_dir)/<(proto_relpath)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', |
| '--cpp_out=<(cc_dir)', |
| '--python_out=<(py_dir)', |
| ], |