diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 26 insertions, 18 deletions
@@ -23,39 +23,47 @@ ## curdir:= $(shell pwd) -GOCMD := go +GOCMD := GOPATH=$(curdir) go + +EXECUTEABLE := rhimportd + +LIBS := "github.com/vaughan0/go-ini" \ + "github.com/ziutek/mymysql/godrv" \ + "github.com/andelf/go-curl" \ + "github.com/spreadspace/telgo" \ + "github.com/gorilla/websocket" + +all: build test -getlibs: export GOPATH=$(curdir) getlibs: - $(GOCMD) get "github.com/vaughan0/go-ini" - $(GOCMD) get "github.com/ziutek/mymysql/godrv" - $(GOCMD) get "github.com/andelf/go-curl" - $(GOCMD) get "github.com/spreadspace/telgo" - $(GOCMD) get "github.com/gorilla/websocket" + @$(foreach lib,$(LIBS), echo "fetching lib: $(lib)"; $(GOCMD) get $(lib);) + +updatelibs: + @$(foreach lib,$(LIBS), echo "updating lib: $(lib)"; $(GOCMD) get -u $(lib);) -vet: export GOPATH=$(curdir) vet: - $(GOCMD) vet helsinki.at/rhimportd - $(GOCMD) vet helsinki.at/rhimport + @echo "vetting: $(EXECUTEABLE)" + @$(GOCMD) vet $(EXECUTEABLE) + @echo "vetting: helsinki.at/rhimport" + @$(GOCMD) vet helsinki.at/rhimport -format: export GOPATH=$(curdir) format: - $(GOCMD) fmt helsinki.at/rhimportd - $(GOCMD) fmt helsinki.at/rhimport + @echo "formating: $(EXECUTEABLE)" + @$(GOCMD) fmt $(EXECUTEABLE) + @echo "formating: helsinki.at/rhimport" + @$(GOCMD) fmt helsinki.at/rhimport -build: export GOPATH=$(curdir) build: getlibs - $(GOCMD) install helsinki.at/rhimportd + @echo "installing: $(EXECUTEABLE)" + @$(GOCMD) install $(EXECUTEABLE) clean: rm -rf pkg/*/helsinki.at + rm -rf pkg/*/$(EXECUTEABLE) rm -rf bin distclean: clean rm -rf src/github.com rm -rf pkg -all: build test - .PHONY: getlibs build test clean distclean _setenv -.DEFAULT_GOAL = all |