diff options
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -55,6 +55,7 @@ PROVTARGETS := $(foreach template, $(TEMPLATES), $(foreach flavor, $(FLAVORS), $ REPROVTARGETS := $(foreach template, $(TEMPLATES), $(foreach flavor, $(FLAVORS), $(filter-out $(template)/$(flavor).latest,$(wildcard $(template)/$(flavor).*)))) BOOTTARGETS := $(foreach template, $(TEMPLATES), $(template)/base/boot) BOOTTARGETS += $(foreach prov, $(PROVTARGETS), $(prov)/boot) +CURBOOTTARGETS := $(foreach prov, $(REPROVTARGETS), $(prov)/boot) ifndef ANSIBLE_PROV_EXTRA_ARGS ANSIBLE_PROV_EXTRA_ARGS := @@ -169,10 +170,10 @@ $(PROVTARGETS) $(REPROVTARGETS): -var='extra_ansible_args=$(ANSIBLE_PROV_EXTRA_ARGS)' \ ansible-provisioner.json - # Generating boot files -$(BOOTTARGETS): -%/boot: % +$(BOOTTARGETS): %/boot: % + +$(BOOTTARGETS) $(CURBOOTTARGETS): $(eval BASE_DIR := $(if $(filter base,$(notdir $(@D))),\ ,\ $(if $(wildcard $(@D)/build/.),\ @@ -181,6 +182,9 @@ $(BOOTTARGETS): $(eval BUILD_DIR := $(if $(BASE_DIR),\ $(BASE_DIR)/build,\ $(@D))) + $(eval BUILD_DIR := $(if $(filter $(@), $(CURBOOTTARGETS)),\ + $(BASE_DIR)/build,\ + $(BUILD_DIR))) $(eval ANSIBLE_DIR_CUR := $(if $(BASE_DIR),\ $(BASE_DIR)/$(ANSIBLE_DIR_PROV),\ $(ANSIBLE_DIR_PROV))) |