summaryrefslogtreecommitdiff
path: root/util/Makefile
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-10-04 20:02:43 -0700
committerGabe Black <gabeblack@google.com>2017-10-05 09:16:35 +0000
commit9de3d9441648079e46d734fc8415c5b1dc12ec6a (patch)
treeccc9caf3e3233c37100f9e07f3274eb85ab207dd /util/Makefile
parentedc8cffbead0b76cf8ea537f5d612963d975aa56 (diff)
downloadgem5-9de3d9441648079e46d734fc8415c5b1dc12ec6a.tar.xz
misc: Use a Makefile to ensure util/packet_pb2.py is up to date.
Rather than just ensuring that packet_pb2.py is available in general, use a Makefile to ensure that it's also up to date in case packet.proto has changed. Also, remove a check that ensures that the protobuf module is available, since python will complain if it needs it and can't find it. Finally, remove a comment which talks about manually regenerating the packet_pb2.py module, something that hasn't been necessary for a while, even with the old version of this code. Change-Id: I40c5c1f577e6d7ad1af9a209309a1eb92f073317 Reviewed-on: https://gem5-review.googlesource.com/5005 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'util/Makefile')
-rw-r--r--util/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/Makefile b/util/Makefile
new file mode 100644
index 000000000..f7254518b
--- /dev/null
+++ b/util/Makefile
@@ -0,0 +1,4 @@
+PROTO_PATH=../src/proto
+
+packet_pb2.py: $(PROTO_PATH)/packet.proto
+ protoc --python_out=. --proto_path=$(PROTO_PATH) $<