From 15b024959bee0f23054d620a4e6706c7c8c9b501 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Fri, 27 Aug 2021 17:10:04 -0700 Subject: [PATCH] add makefile --- Makefile | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 127ec4f7af9..bdb95688435 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,45 @@ -# TODO stringer -type=Op -# -# TODO -# $ find pkgs/crypto/ | grep "pbbindings" | xargs rm -# $ find pkgs/crypto/ | grep "pb.go" | xargs rm -# $ go run cmd/genproto/genproto.go +all: gnoland goscan logos + +.PHONY: logos goscan gnoland + +# The main show +gnoland: + echo "Building gnoland" + go build -o gnoland ./cmd/gnoland + +# goscan scans go code to determine its AST +goscan: + echo "Building goscan" + go build -o goscan ./cmd/goscan + + +# Logos is the interface to Gnoland +logos: + echo "building logos" + go build -o logos ./logos/cmd/logos.go + +clean: + rm -rf build + +test: + echo "Running tests" + go test + go test tests/*.go -v -test.short + +test2: + # -p 1 shows test failures as they come + # maybe another way to do this? + go test ./pkgs/... -p 1 -count 1 + +stringer: + stringer -type=Op + +genproto: + rm -rf proto/* + find pkgs/crypto/ | grep "\.proto" | xargs rm + find pkgs/crypto/ | grep "pbbindings" | xargs rm + find pkgs/crypto/ | grep "pb.go" | xargs rm + find pkgs/bft/ | grep "\.proto" | xargs rm + find pkgs/bft/ | grep "pbbindings" | xargs rm + find pkgs/bft/ | grep "pb.go" | xargs rm + go run cmd/genproto/genproto.go