Commit f1479275 authored by Michael Shigorin's avatar Michael Shigorin

main.mk: bail out if no image type was specified

e.g., `make distro/icewm' instead of `make distro/icewm.iso' would be "successful" as there's a corresponding target indeed but the "success" would just mean building the configuration without running the actual build. Thanks cas@ for hitting this issue and reporting it. PS: note that the initial flagless implementation turned out to produce false positives for e.g. `make distclean'.
parent 3cb4d9ae
......@@ -10,12 +10,18 @@
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
ifeq (./,$(dir $(IMAGE_TARGET)))# convenience fallback
IMAGE_TARGET := distro/$(IMAGE_TARGET)# for omitted "distro/"
IMAGE_GUESS := 1
else
IMAGE_GUESS :=
endif
IMAGE_CONF := $(firstword $(subst ., ,$(IMAGE_TARGET)))# ve/generic
IMAGE_CLASS := $(firstword $(subst /, ,$(IMAGE_TARGET)))# ve
IMAGE_FILE := $(lastword $(subst /, ,$(IMAGE_TARGET)))# generic.tar.gz
IMAGE_NAME := $(firstword $(subst ., ,$(IMAGE_FILE)))# generic
IMAGE_TYPE := $(subst $(IMAGE_NAME).,,$(IMAGE_FILE))# tar.gz
ifeq ($(IMAGE_NAME),$(IMAGE_TYPE)$(IMAGE_GUESS))
$(warning no image type/extension specified, run make help?)
endif
# readjustable
ifeq (1,$(NUM_TARGETS))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment