diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-01-07 20:32:35 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-01-07 20:32:35 (GMT) |
commit | 92f96b74e3816214a65973b3b362424d110b3a77 (patch) | |
tree | 1c11ac73e9e6ae365f28b9cedb1cb105b397458b /Makefile | |
parent | 772896795c3799b4595eb6abbc0355184edc91ff (diff) |
improved makefile
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 |