Skip to content

Commit

Permalink
Update Makefile build flags
Browse files Browse the repository at this point in the history
For more information see: golang/go#11887
  • Loading branch information
derekparker committed Jul 28, 2015
1 parent 77604ef commit 8cd8118
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.DEFAULT_GOAL=test
UNAME = $(shell uname)
PREFIX=github.com/derekparker/delve
FLAGS=-ldflags="-s"

This comment has been minimized.

Copy link
@ignatov

ignatov Jul 31, 2015

After this commit I've got a bus error (Mac OS X 10.10, go 1.4.2). Maybe we should check golang version for enabling/disabling these flags?

This comment has been minimized.

Copy link
@derekparker

derekparker Jul 31, 2015

Author Member

Yeah, that seems reasonable.


build:
go build github.com/derekparker/delve/cmd/dlv
go build $(FLAGS) github.com/derekparker/delve/cmd/dlv
ifeq "$(UNAME)" "Darwin"
ifeq "$(CERT)" ""
$(error You must provide a CERT env var)
Expand All @@ -12,7 +13,7 @@ endif
endif

install:
go install github.com/derekparker/delve/cmd/dlv
go install $(FLAGS) github.com/derekparker/delve/cmd/dlv
ifeq "$(UNAME)" "Darwin"
ifeq "$(CERT)" ""
$(error You must provide a CERT env var)
Expand All @@ -26,8 +27,8 @@ ifeq "$(CERT)" ""
$(error You must provide a CERT env var)
endif
go test $(PREFIX)/terminal $(PREFIX)/dwarf/frame $(PREFIX)/dwarf/op $(PREFIX)/dwarf/util $(PREFIX)/source $(PREFIX)/dwarf/line
go test -c $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test $(TESTFLAGS) && rm ./proc.test
go test -c $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test $(TESTFLAGS) && rm ./test.test
go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test $(TESTFLAGS) && rm ./proc.test
go test -c $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test $(TESTFLAGS) && rm ./test.test
else
go test -v ./...
endif
Expand All @@ -37,7 +38,7 @@ ifeq "$(UNAME)" "Darwin"
ifeq "$(CERT)" ""
$(error You must provide a CERT env var)
endif
go test -c $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test -test.run $(RUN) && rm ./proc.test
go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test -test.run $(RUN) && rm ./proc.test
else
go test $(PREFIX) -run $(RUN)
endif
Expand All @@ -47,7 +48,7 @@ ifeq "$(UNAME)" "Darwin"
ifeq "$(CERT)" ""
$(error You must provide a CERT env var)
endif
go test -c $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test -test.run $(RUN) && rm ./test.test
go test -c $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test -test.run $(RUN) && rm ./test.test
else
go test $(PREFIX)/service/rest -run $(RUN)
endif

0 comments on commit 8cd8118

Please sign in to comment.