From f0693773a8b55092853c9efeece2f2c9b68121e7 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Sat, 8 Jul 2017 10:17:33 -0500 Subject: [PATCH] Update Makefile This patchset updates the Makefile to process all subfolders except an explicitly specified EXCLUDES-list. This would avoid developers adding new charts from needing to modify the Makefile, except for needing it be excluded. Also, this would eases the process of later migrating and integrating charts across OSH, OSH-infra, OSH-addons, etc. Change-Id: I5385f38be1ee4ae6f89fb9d4df6edec97ba8176a Signed-off-by: Tin Lam --- Makefile | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 91d8233a10..aa86e6f3ee 100644 --- a/Makefile +++ b/Makefile @@ -12,34 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -HELM = helm -TASK = build +HELM := helm +TASK := build -CHARTS = helm-toolkit ceph mariadb etcd rabbitmq -CHARTS += memcached keystone glance cinder horizon neutron nova heat -CHARTS += barbican mistral senlin magnum ingress +EXCLUDES := helm-toolkit doc tests tools logs +CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) all: $(CHARTS) $(CHARTS): + @echo + @echo "===== Processing [$@] chart =====" @make $(TASK)-$@ init-%: - @echo - @echo "===== Initializing $*" if [ -f $*/Makefile ]; then make -C $*; fi if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% - $(HELM) lint $* + if [ -d $* ]; then $(HELM) lint $*; fi build-%: lint-% - $(HELM) package $* + if [ -d $* ]; then $(HELM) package $*; fi clean: - @echo "Removed all .b64, _partials.tpl, and _globals.tpl files" - $(shell rm -rf helm-toolkit/secrets/*.b64) - $(shell rm -rf */templates/_partials.tpl) - $(shell rm -rf */templates/_globals.tpl) + @echo "Removed .b64, _partials.tpl, and _globals.tpl files" + rm -rf helm-toolkit/secrets/*.b64 + rm -rf */templates/_partials.tpl + rm -rf */templates/_globals.tpl -.PHONY: $(CHARTS) +.PHONY: $(EXCLUDES) $(CHARTS)