From 6ee6cc843a95027f78ed83546b898ee7aa1f08b9 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 12 Jun 2016 14:42:03 -0700 Subject: [PATCH] Add rules for all cmd/* subdirs This is sort of gravy. There's no good way to do this for arbitrary directories because of the way Make works (we'd have to declare them all PHONY). If people hate using make directly we could wrap it in another level of indirection, but I didn't yet. E.g. build/make-all.sh -> make -> make-rules/all.sh -> go install This would insulate people from 'make' atthe cost of custom build tools. I prefer being able to say 'make' and having it just work. --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 45575275188..84c5cc64303 100644 --- a/Makefile +++ b/Makefile @@ -242,6 +242,14 @@ release-skip-tests quick-release: generated_files cross: hack/make-rules/cross.sh +# Add rules for all directories in cmd/ +# +# Example: +# make kubectl kube-proxy +.PHONY: $(notdir $(abspath $(wildcard cmd/*/))) +$(notdir $(abspath $(wildcard cmd/*/))): generated_files + hack/make-rules/build.sh cmd/$@ + # # Code-generation logic. #