summaryrefslogtreecommitdiffstats
path: root/tests/site_scons/site_tools/nanopb.py
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-29 22:08:13 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-29 22:08:13 +0200
commit18e71bbfe2907fa759fad09e8c5c13655e33a590 (patch)
treeebe9633c55c88b8c48954b9fb4c3034fbb448501 /tests/site_scons/site_tools/nanopb.py
parent585cd0356ee1ef3c48cf958c307de7dc651123a3 (diff)
Fix bundled protoc detection in scons script
Diffstat (limited to 'tests/site_scons/site_tools/nanopb.py')
-rw-r--r--tests/site_scons/site_tools/nanopb.py7
1 files changed, 4 insertions, 3 deletions
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 ''