From a6f4ad6e1db14a824227c3cf260698ebfa4dbd03 Mon Sep 17 00:00:00 2001 From: "Roman C. Podolski" Date: Sun, 23 Jul 2017 15:20:26 +0800 Subject: [PATCH] Protoc: Fix bug in src-path The tool was using an relative path for the includes, but an absolute for the src-files. Protoc cannot distinguish between relative and absolute paths and is not able to find sources when relative and absolute paths are combined. Tested with protoc 2.6.1, python 3.5.1 --- waflib/extras/protoc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waflib/extras/protoc.py b/waflib/extras/protoc.py index b5fed1fa..6ccfc6a2 100644 --- a/waflib/extras/protoc.py +++ b/waflib/extras/protoc.py @@ -35,8 +35,7 @@ Notes when using this tool: """ class protoc(Task): - # protoc expects the input proto file to be an absolute path. - run_str = '${PROTOC} ${PROTOC_FLAGS} ${PROTOC_ST:INCPATHS} ${SRC[0].abspath()}' + run_str = '${PROTOC} ${PROTOC_FLAGS} ${PROTOC_ST:INCPATHS} ${SRC[0].bldpath()}' color = 'BLUE' ext_out = ['.h', 'pb.cc'] def scan(self):