summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-11-18 16:03:12 -0800
committerGabe Black <gabeblack@google.com>2019-11-21 23:37:03 +0000
commita434c6cc4558da46c7ac341cfe685a9189b9a7b8 (patch)
tree8c82e1d7d04250fec02007099b1dcb63b442eee7 /src/SConscript
parentdc3c6eed1480bb8f1c3a3d193978de1b923f24a7 (diff)
downloadgem5-a434c6cc4558da46c7ac341cfe685a9189b9a7b8.tar.xz
scons: Use HAVE_PROTOC when building protobuf files.
Also wrap PROTOC in {}s which is better form. Change-Id: I3f80c260593a1d5b7fb5394fe4b71cb774e652ce Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22884 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/SConscript')
-rw-r--r--src/SConscript4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SConscript b/src/SConscript
index d8014b248..53c012877 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1006,14 +1006,14 @@ if env['USE_PYTHON']:
Source(cc_file)
# Build all protocol buffers if we have got protoc and protobuf available
-if env['HAVE_PROTOBUF']:
+if env['HAVE_PROTOC'] and env['HAVE_PROTOBUF']:
for proto in ProtoBuf.all:
# Use both the source and header as the target, and the .proto
# file as the source. When executing the protoc compiler, also
# specify the proto_path to avoid having the generated files
# include the path.
env.Command([proto.cc_file, proto.hh_file], proto.tnode,
- MakeAction('$PROTOC --cpp_out ${TARGET.dir} '
+ MakeAction('${PROTOC} --cpp_out ${TARGET.dir} '
'--proto_path ${SOURCE.dir} $SOURCE',
Transform("PROTOC")))