summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2017-01-25 23:49:54 (GMT)
committerChristian Pointner <equinox@helsinki.at>2017-01-25 23:49:54 (GMT)
commit5624f3ac623ed2caa8c3c3933e66d63aafc09914 (patch)
tree7ee90a92df50e50a4d994001bb9d8751f1f88fa9 /Makefile
parent9d1b81e5997ee9ec8cc5bfd16f6c62a40044006a (diff)
file-hasher as seperate binary
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 48e88d4..a6ea748 100644
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,14 @@
##
curdir:= $(shell pwd)
+ifndef GOROOT
GOCMD := GOPATH=$(curdir) go
+else
+GOCMD := GOPATH=$(curdir) $(GOROOT)/bin/go
+endif
EXECUTEABLE := pool-import
+EXECUTEABLE_HASHER := file-hasher
LIBS := "code.helsinki.at/rhrd-go/rhimport" \
"code.helsinki.at/rhrd-go/rddb" \
@@ -43,19 +48,26 @@ updatelibs:
vet:
@echo "vetting: $(EXECUTEABLE)"
@$(GOCMD) vet $(EXECUTEABLE)
+ @echo "vetting: $(EXECUTEABLE_HASHER)"
+ @$(GOCMD) vet $(EXECUTEABLE_HASHER)
format:
@echo "formating: $(EXECUTEABLE)"
@$(GOCMD) fmt $(EXECUTEABLE)
+ @echo "formating: $(EXECUTEABLE_HASHER)"
+ @$(GOCMD) format $(EXECUTEABLE_HASHER)
build: getlibs
@echo "installing: $(EXECUTEABLE)"
@$(GOCMD) install $(EXECUTEABLE)
+ @echo "installing: $(EXECUTEABLE_HASHER)"
+ @$(GOCMD) install $(EXECUTEABLE_HASHER)
clean:
rm -rf pkg/*/$(EXECUTEABLE)
+ rm -rf pkg/*/$(EXECUTEABLE_HASHER)
rm -rf bin
distclean: clean
- @$(foreach dir,$(shell ls src/),$(if $(subst $(EXECUTEABLE),,$(dir)),$(shell rm -rf src/$(dir))))
+ @$(foreach dir,$(shell ls src/),$(if $(and $(subst $(EXECUTEABLE),,$(dir)), $(subst $(EXECUTEABLE_HASHER),,$(dir))),$(shell rm -rf src/$(dir))))
rm -rf pkg