From b2b4251cfb9a259b201dd9e6bf0aea52d990bb7f Mon Sep 17 00:00:00 2001 From: fisherxu Date: Wed, 3 Jan 2018 14:36:29 +0800 Subject: [PATCH] add Makefile for sets --- examples/set-gen/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/set-gen/Makefile diff --git a/examples/set-gen/Makefile b/examples/set-gen/Makefile new file mode 100644 index 00000000..0e73130a --- /dev/null +++ b/examples/set-gen/Makefile @@ -0,0 +1,15 @@ +TOOL=set-gen + +test: + @if ! git diff --quiet HEAD; then \ + echo "FAIL: git client is not clean"; \ + false; \ + fi + @go build -o /tmp/$(TOOL) + @PKGS=$$(go list ./sets/types | paste -sd' ' -); \ + /tmp/$(TOOL) --logtostderr --v=4 -i $$(echo $$PKGS | sed 's/ /,/g') -O zz_generated -o ./sets + @if ! git diff --quiet HEAD; then \ + echo "FAIL: output files changed"; \ + git diff; \ + false; \ + fi