From 76a494bcfc74539304dc21f99267329e7c9765b7 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 7 Feb 2018 18:09:06 +0100 Subject: Makefile: small formatting changes --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4e5f7d3..f4638dd 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,8 @@ # TODO # * support ssh as user instead of root # * testing target -PACKER=packer -ANSIBLE_DIR=ansible-roles -# the "provisioning" flavor, expects a 'setup-.yml' playbook -# in the 'ansible-roles' submodule! This will likely change... -FLAVORS := $(patsubst $(ANSIBLE_DIR)/setup-%.yml,%, $(wildcard $(ANSIBLE_DIR)/setup-*.yml)) +PACKER = packer +ANSIBLE_DIR = ansible-roles SUPPORTED_BUILDERS = qemu virtualbox-iso vmware-iso # check which hypervisors are available ifeq ($(shell which qemu-system-$(shell uname -m | sed 's/i686/i386/') 2>&1 > /dev/null && echo $$?), 0) @@ -35,7 +32,13 @@ ifneq ($(words $(MISSING_BUILDERS)), 0) $(info ) 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)) BASETARGETS := $(foreach template, $(TEMPLATES), $(template)/base) PROVTARGETS := $(foreach template, $(TEMPLATES), $(foreach flavor, $(FLAVORS), $(template)/$(flavor))) -- cgit v1.2.3-55-g7522