From 18e71bbfe2907fa759fad09e8c5c13655e33a590 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sun, 29 Dec 2013 22:08:13 +0200 Subject: Fix bundled protoc detection in scons script --- tests/site_scons/site_tools/nanopb.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/site_scons/site_tools/nanopb.py') diff --git a/tests/site_scons/site_tools/nanopb.py b/tests/site_scons/site_tools/nanopb.py index 9197e190..b3e58fa1 100644 --- a/tests/site_scons/site_tools/nanopb.py +++ b/tests/site_scons/site_tools/nanopb.py @@ -57,8 +57,8 @@ def _detect_protoc(env): # Use protoc defined by user return env['PROTOC'] - p = _detect_nanopb(env) - p1 = os.path.join(p, 'generator-bin', 'protoc' + env['PROGSUFFIX']) + n = _detect_nanopb(env) + p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX']) if os.path.exists(p1): # Use protoc bundled with binary package return env['ESCAPE'](p1) @@ -78,7 +78,8 @@ def _detect_protocflags(env): p = _detect_protoc(env) n = _detect_nanopb(env) - if p == os.path.join(n, 'generator-bin', 'protoc'): + p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX']) + if p == env['ESCAPE'](p1): # Using the bundled protoc, no options needed return '' -- cgit 1.2.3-korg