image.in/Makefile: fixed thinko regression

MKI_VERSION was tested against even before the config.mk
that defines it got included.  Ouch.
This commit is contained in:
Michael Shigorin 2012-01-21 21:39:28 +02:00
parent 0c97aaf80b
commit 7a3ab55db4

View File

@ -14,6 +14,9 @@ include functions.mk
ifeq (,$(realpath $(MKIMAGE_PREFIX)/config.mk))
$(error please apt-get install mkimage and have a look at QUICKSTART as well)
endif
include $(MKIMAGE_PREFIX)/config.mk
ifeq (-,$(shell rpmvercmp $(MKI_VERSION) $(MKI_VER_MINIMAL) | tr -d [0-9]))
$(info error: mkimage-$(MKI_VERSION) is too old, please upgrade)
$(error mkimage is too old, $(MKI_VER_MINIMAL) is minimal supported version)
@ -23,8 +26,6 @@ $(info warning: mkimage-$(MKI_VERSION) is suboptimal, consider upgrading)
$(warning consider upgrading mkimage to $(MKI_VER_OPTIMAL) or better)
endif
include $(MKIMAGE_PREFIX)/config.mk
# reconstruct instead of passing yet another variable
IMAGE_LINK := $(IMAGE_NAME).$(IMAGE_TYPE)
IMAGE_OUTFILE := $(IMAGE_NAME)-$(DATE)-$(ARCH).$(IMAGE_TYPE)