ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.91k stars 408 forks source link

Make returns "Makefile:12: *** target pattern contains no '%'. Stop." #30

Closed netbsd8 closed 6 years ago

netbsd8 commented 6 years ago

Makefile ================================================================
1 VERSION := $(shell git describe --tags --always --dirty) 2 GOARCH := $(shell go env GOARCH) 3 LDFLAGS := -X main.Version=$(VERSION) 4 5 BUILD_DIR ?= build 6 BINARY := go-callvis 7 RELEASE := $(BUILDDIR)/$(BINARY)$(VERSION)-$(GOARCH) 8 9 DEP ?= $(GOPATH)/bin/dep 10 11 12 all: $(DEP) install 13 14 $(DEP): 15 go get -u github.com/golang/dep/cmd/dep 16 dep version 17 18 install: 19 @echo "-> Installing go-callvis $(VERSION)" 20 go install -ldflags "$(LDFLAGS)" 21 22 build: 23 @echo "-> Building go-callvis $(VERSION)" 24 go build -v -ldflags "$(LDFLAGS)" -o $(BINARY) 25 26 release: 27 @echo "-> Releasing go-callvis $(VERSION)" 28 mkdir -p $(BUILD_DIR) 29 go build -ldflags "$(LDFLAGS)" -o $(RELEASE) 30 31 clean: 32 go clean -i 33 34 test: 35 go test -v 36 37 38 .PHONY: all install build release clean test

netbsd8 commented 6 years ago

Solved it as there are multiple GOPATH, so line 11 "DEP ?= $(GOPATH)/bin/dep" will be confused.

ondrajz commented 6 years ago

Fixed in https://github.com/TrueFurby/go-callvis/commit/724fe4520c0fc249b6c8b24ba7fde0b4878766ec