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.
This commit is contained in:
Tim Hockin 2016-06-12 14:42:03 -07:00
parent f0ef726813
commit 6ee6cc843a

View File

@ -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.
#