summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-08 01:38:30 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-08 01:38:30 (GMT)
commit17ff61af1a49ab2c855ced09a91b591e71e5e952 (patch)
tree6fa668e5d95590977e69e9970f99a7b092126154 /Makefile
parent6c46b468fc95010f76edca3345d7b80529bc1fce (diff)
improved distclean
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 2 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 8e1e22b..3b51297 100644
--- a/Makefile
+++ b/Makefile
@@ -37,12 +37,12 @@ LIBS := "github.com/vaughan0/go-ini" \
.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);)
@@ -60,12 +60,10 @@ vet:
@echo "vetting: $(EXECUTEABLE)"
@$(GOCMD) vet $(EXECUTEABLE)
-
format:
@echo "formating: $(EXECUTEABLE)"
@$(GOCMD) fmt $(EXECUTEABLE)
-
build: getlibs
@echo "installing: $(EXECUTEABLE)"
@$(GOCMD) install $(EXECUTEABLE)
@@ -75,9 +73,7 @@ clean:
rm -rf pkg/*/$(EXECUTEABLE)
rm -rf bin
-
distclean: clean
+ @$(foreach dir,$(shell ls src/),$(if $(subst $(EXECUTEABLE),,$(dir)),$(shell rm -rf src/$(dir))))
rm -f src/.rhrd-go.prepared
- rm -rf src/helsinki.at
- rm -rf src/github.com
rm -rf pkg