From 954b0ead677b37be29d74884bd2e501ef03dc2c5 Mon Sep 17 00:00:00 2001 From: Manuel Messner Date: Mon, 12 Feb 2018 16:16:00 +0100 Subject: Makefile: reworked comments --- Makefile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 54c4cd8..7f401df 100644 --- a/Makefile +++ b/Makefile @@ -24,11 +24,9 @@ ifndef BUILDER endif -## -# Templates and flavors detection -## # The packer templates, detected as *.json (excluding base.json) TEMPLATES := $(basename $(filter-out base.json,$(wildcard *.json))) + # The provisioning flavors, detected as ansible-roles/setup-.yml FLAVORS := $(patsubst $(ANSIBLE_DIR)/setup-%.yml,%, $(wildcard $(ANSIBLE_DIR)/setup-*.yml)) @@ -75,9 +73,7 @@ check_rootpw = $(if $(strip $(ROOTPW)),,$(error No root password is set, set it .PHONY: help clean help: -## -# Creating base images -## +# Creating base images $(BASETARGETS): $(call check_rootpw) $(info ** Building template '$(@D)' using '$(BUILDER)' **) @@ -88,10 +84,7 @@ $(BASETARGETS): $(@D).json -## -# Provisioning images -## -# This should still only use base images +# Provisioning images $(PROVTARGETS): $(foreach flav, $(FLAVORS), %/$(flav)): %/base $(call check_rootpw) @@ -108,10 +101,7 @@ $(foreach flav, $(FLAVORS), %/$(flav)): %/base $(BUILD_DIR)/$(ANSIBLE_DIR)/run-playbook-only.json -## -# Generating boot files -## -# This should use provisioned image +# Generating boot files $(BOOTTARGETS): %/boot: % $(call check_rootpw) @@ -127,7 +117,8 @@ $(BOOTTARGETS): @mv $(BUILD_DIR)/$(ANSIBLE_DIR)/boot_files $(BUILD_DIR)/build/boot -# The builds are directories named after the template name +# The builds directories are named after the template name +# TODO: needs refactoring clean: -$(foreach build_dir,$(TEMPLATES),test -d $(build_dir) && rm -rf $(build_dir);) -- cgit v1.2.3-55-g7522