]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Makefile: fix VERSION again
authorAlexander Tsoy <alexander@tsoy.me>
Sun, 8 Mar 2020 02:47:50 +0000 (05:47 +0300)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 9 Mar 2020 07:50:20 +0000 (08:50 +0100)
The variable is not undefined anymore after the first assignment, so
we should check if variable is empty instead.

Makefile

index c69e2dfcd2bb97a3f9aa5cac52338be4c42561e5..02e2c4b5fd5ccc734ae60c27e8529ec7c43e1389 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,13 @@
 -include dracut-version.sh
 
 DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
+ifeq ($(DRACUT_MAIN_VERSION),)
+DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
+endif
 DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
+ifeq ($(DRACUT_FULL_VERSION),)
+DRACUT_FULL_VERSION = $(DRACUT_VERSION)
+endif
 
 -include Makefile.inc