From 17ff61af1a49ab2c855ced09a91b591e71e5e952 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 8 Jan 2016 02:38:30 +0100 Subject: improved distclean 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 -- cgit v0.10.2