summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hub/Makefile58
1 files changed, 33 insertions, 25 deletions
diff --git a/src/hub/Makefile b/src/hub/Makefile
index 037fa57..9113f97 100644
--- a/src/hub/Makefile
+++ b/src/hub/Makefile
@@ -31,46 +31,54 @@
#
curdir:= $(shell pwd)
-GOCMD := go
+GOCMD := GOPATH=$(curdir) go
#TESTFLAG := -test.v
TESTFLAG :=
-getlibs: export GOPATH=$(curdir)
+EXECUTEABLE := sfive-hub
+
+LIBS := "github.com/coopernurse/gorp" \
+ "github.com/mattn/go-sqlite3" \
+ "github.com/zenazn/goji" \
+ "code.google.com/p/go-uuid/uuid" \
+ "github.com/equinox0815/graphite-golang"
+# "github.com/go-sql-driver/mysql"
+# "github.com/ziutek/mymysql/godrv"
+
+
+all: build test
+.PHONY: getlibs updatelibs build test clean distclean
+
+
getlibs:
- $(GOCMD) get "github.com/coopernurse/gorp"
- $(GOCMD) get "github.com/mattn/go-sqlite3"
- $(GOCMD) get "github.com/zenazn/goji"
- $(GOCMD) get "code.google.com/p/go-uuid/uuid"
- $(GOCMD) get "github.com/equinox0815/graphite-golang"
-# $(GOCMD) get "github.com/go-sql-driver/mysql"
-# $(GOCMD) get "github.com/ziutek/mymysql/godrv"
-
-vet: export GOPATH=$(curdir)
+ @$(foreach lib,$(LIBS), echo "fetching lib: $(lib)"; $(GOCMD) get $(lib);)
+
+updatelibs: update-rhrd-go
+ @$(foreach lib,$(LIBS), echo "updating lib: $(lib)"; $(GOCMD) get -u $(lib);)
+
+
vet:
- $(GOCMD) vet spreadspace.org/sfive-hub
+ @echo "vetting: $(EXECUTEABLE)"
+ @$(GOCMD) vet spreadspace.org/$(EXECUTEABLE)
-format: export GOPATH=$(curdir)
format:
- $(GOCMD) fmt spreadspace.org/sfive-hub
+ @echo "formatting: $(EXECUTEABLE)"
+ $(GOCMD) fmt spreadspace.org/$(EXECUTEABLE)
-build: export GOPATH=$(curdir)
build: getlibs
- $(GOCMD) install spreadspace.org/sfive-hub
+ @echo "installing: $(EXECUTEABLE)"
+ @$(GOCMD) install spreadspace.org/$(EXECUTEABLE)
+
-test: export GOPATH=$(curdir)
test: getlibs
- $(GOCMD) test $(TESTFLAG) spreadspace.org/sfive
+ @echo "testing: sfive"
+ @$(GOCMD) test $(TESTFLAG) spreadspace.org/sfive
+
clean:
rm -rf pkg/*/spreadspace.org
rm -rf bin
distclean: clean
- rm -rf src/github.com
- rm -rf src/code.google.com
+ $(foreach dir,$(shell ls src/),$(if $(subst spreadspace.org,,$(dir)),$(shell rm -rf src/$(dir))))
rm -rf pkg
-
-all: build test
-
-.PHONY: getlibs build test clean distclean _setenv
-.DEFAULT_GOAL = all