summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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