Prefer makefile to shell script

This commit is contained in:
Derek Parker 2015-02-28 21:07:08 -06:00
parent 4d918aeb2c
commit f3019b7478
2 changed files with 22 additions and 4 deletions

22
Makefile Normal file

@ -0,0 +1,22 @@
UNAME = $(shell uname)
PREFIX=github.com/derekparker/delve
build:
go build github.com/derekparker/delve/cmd/dlv
ifeq "$(UNAME)" "Darwin"
codesign -s dlv-cert ./dlv
endif
install:
go install github.com/derekparker/delve/cmd/dlv
ifeq "$(UNAME)" "Darwin"
codesign -s dlv-cert $(which dlv)
endif
test:
ifeq "$(UNAME)" "Darwin"
go test $(PREFIX)/command $(PREFIX)/dwarf/frame $(PREFIX)/dwarf/op $(PREFIX)/dwarf/util
cd proctl && go test -c $(PREFIX)/proctl && codesign -s $(CERT) ./proctl.test && ./proctl.test
else
go test ./...
endif

@ -1,4 +0,0 @@
#!/bin/sh
go test -c && codesign -s dbg-cert ./proctl.test && ./proctl.test -test.v -test.run "$1"
rm ./proctl.test