diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -131,17 +131,22 @@ $(foreach flav, $(FLAVORS), %/$(flav)): %/base # Generating boot files $(BOOTTARGETS): %/boot: % - $(eval BUILD_DIR := $(@D).$(TIMESTAMP)) + $(eval BUILD_DIR := $(if $(filter base,$(notdir $(@D))),\ + $(@D),\ + $(@D).$(TIMESTAMP)/build)) + $(eval ANSIBLE_DIR_CUR := $(if $(filter base,$(notdir $(@D))),\ + $(ANSIBLE_DIR),\ + $(@D).$(TIMESTAMP)/$(ANSIBLE_DIR))) $(info ** Generating boot files for '$(BUILD_DIR)') $(PACKER) build -only=$(BUILDER) \ $(PACKER_OPTS) \ -var='vm_name=rootfs-image.tmp' \ - -var='output_directory=$(BUILD_DIR)/build/tmp' \ - -var='base_image=$(BUILD_DIR)/build/rootfs-image' \ + -var='output_directory=$(BUILD_DIR)/tmp' \ + -var='base_image=$(BUILD_DIR)/rootfs-image' \ -var='playbook=build-dracut-initramfs.yml' \ - $(BUILD_DIR)/$(ANSIBLE_DIR)/run-playbook-only.json - @mv $(BUILD_DIR)/$(ANSIBLE_DIR)/boot_files $(BUILD_DIR)/build/boot - $(if $(DEBUG),,@rm -rf $(BUILD_DIR)/build/tmp) + $(ANSIBLE_DIR_CUR)/run-playbook-only.json + @mv $(ANSIBLE_DIR_CUR)/boot_files $(BUILD_DIR)/boot + $(if $(DEBUG),,@rm -rf $(BUILD_DIR)/tmp) clean_except_last: |