summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-08 00:51:37 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-08 00:51:37 (GMT)
commit63db9233d681006b1b1fb4999825d21e79dfcec5 (patch)
tree0683ed60874493597cfd6e0b87fd2cb33c6f6ea1 /Makefile
parent92f96b74e3816214a65973b3b362424d110b3a77 (diff)
move rddb to rhrd-go
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 24 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0325c7c..1644e93 100644
--- a/Makefile
+++ b/Makefile
@@ -33,37 +33,56 @@ LIBS := "github.com/vaughan0/go-ini" \
"github.com/spreadspace/telgo" \
"github.com/gorilla/websocket"
-all: build test
-getlibs:
+.PHONY: getlibs build clean distclean _setenv
+all: build
+
+src/.rhrd-go.prepared:
+ @echo "fetching lib: helsinki.at/rhrd-go"
+ @cd src/; mkdir -p helsinki.at; cd helsinki.at; git clone git://git.helsinki.at/rhrd-go/ > /dev/null 2>&1
+ @touch $@
+
+
+getlibs: get-rhrd-go
@$(foreach lib,$(LIBS), echo "fetching lib: $(lib)"; $(GOCMD) get $(lib);)
-updatelibs:
+get-rhrd-go: src/.rhrd-go.prepared
+
+updatelibs: update-rhrd-go
@$(foreach lib,$(LIBS), echo "updating lib: $(lib)"; $(GOCMD) get -u $(lib);)
+update-rhrd-go: src/.rhrd-go.prepared
+ @echo "updating lib: helsinki.at/rhrd-go"
+ @cd src/helsinki.at/rhrd-go; git pull > /dev/null 2>&1
+
+
vet:
@echo "vetting: $(EXECUTEABLE)"
@$(GOCMD) vet $(EXECUTEABLE)
@echo "vetting: helsinki.at/rhimport"
@$(GOCMD) vet helsinki.at/rhimport
+
format:
@echo "formating: $(EXECUTEABLE)"
@$(GOCMD) fmt $(EXECUTEABLE)
@echo "formating: helsinki.at/rhimport"
@$(GOCMD) fmt helsinki.at/rhimport
+
build: getlibs
@echo "installing: $(EXECUTEABLE)"
@$(GOCMD) install $(EXECUTEABLE)
+
clean:
rm -rf pkg/*/helsinki.at
rm -rf pkg/*/$(EXECUTEABLE)
rm -rf bin
+
distclean: clean
+ rm -rf src/helsinki.at/rhrd-go
+ rm src/.rhrd-go.prepared
rm -rf src/github.com
rm -rf pkg
-
-.PHONY: getlibs build test clean distclean _setenv