diff --git a/scripts/common.mk b/scripts/common.mk index 18e1813..ef894cb 100644 --- a/scripts/common.mk +++ b/scripts/common.mk @@ -495,8 +495,8 @@ build/fcos-dev.bu: SELF := $(PROJECT_NAME) $(PROJECT_NAME)-examples # The ignition files are needed to detect duplicates (see default-butane-spec.sh). build/fcos-dev.bu: build/$(PROJECT_NAME).ign build/$(PROJECT_NAME)-examples.ign $(DEPENDENCIES_IGNITION_EXAMPLES_FILES) build/fcos-test.bu: build/$(PROJECT_NAME).ign $(DEPENDENCIES_IGNITION_FILES) -build/fcos-dev.bu build/fcos-test.bu: %.bu: Makefile $(SCRIPTS_DIR)/default-butane-spec.sh build - $(SCRIPTS_DIR)/default-butane-spec.sh $(foreach name,$(SELF) $(DEPS),$(call ignition_path,$(name))) > $@ +build/fcos-dev.bu build/fcos-test.bu: %.bu: Makefile $(SCRIPTS_DIR)/default-butane-spec.sh build $(TOP_LEVEL_DIR)/build/local.ign + $(SCRIPTS_DIR)/default-butane-spec.sh $(foreach name,$(SELF) $(DEPS),$(call ignition_path,$(name))) $(TOP_LEVEL_DIR)/build/local.ign > $@ # Path of the ignition file of the current project or of one of its dependencies (with or without the "-examples" suffix). ignition_path = $(if $(filter $(PROJECT_NAME) $(PROJECT_NAME)-examples,$(1)),build/$(1).ign,$(COOKBOOKS_DIR)/$(patsubst %-examples,%,$(1))/build/$(1).ign) diff --git a/scripts/default-butane-spec.sh b/scripts/default-butane-spec.sh index a06a261..b5cbdb0 100755 --- a/scripts/default-butane-spec.sh +++ b/scripts/default-butane-spec.sh @@ -2,12 +2,12 @@ set -Eeuo pipefail -# Usage: default-butane-spec.sh ... +# Usage: default-butane-spec.sh ... # # Butane inlines the "local" files as data URLs and rejects duplicate entries. # So, ignition files whose content is identical to a previous one (typically -# the empty "-examples" ignition files) are skipped. Merging the same config -# twice would be a no-op anyway. +# the empty "-examples" ignition files, or an empty local.ign) are skipped. +# Merging the same config twice would be a no-op anyway. cat <<'EOF' variant: fcos @@ -26,4 +26,3 @@ for ign in "$@"; do seen[$checksum]="$(basename "$ign")" echo " - local: $(basename "$ign")" done -echo " - local: local.ign"