|
Harald Hoyer |
5f0dd7 |
From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
5f0dd7 |
From: Alexander Tsoy <alexander@tsoy.me>
|
|
Harald Hoyer |
5f0dd7 |
Date: Sun, 8 Mar 2020 05:47:50 +0300
|
|
Harald Hoyer |
5f0dd7 |
Subject: [PATCH] Makefile: fix VERSION again
|
|
Harald Hoyer |
5f0dd7 |
|
|
Harald Hoyer |
5f0dd7 |
The variable is not undefined anymore after the first assignment, so
|
|
Harald Hoyer |
5f0dd7 |
we should check if variable is empty instead.
|
|
Harald Hoyer |
5f0dd7 |
---
|
|
Harald Hoyer |
5f0dd7 |
Makefile | 8 ++++++--
|
|
Harald Hoyer |
5f0dd7 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
5f0dd7 |
|
|
Harald Hoyer |
5f0dd7 |
diff --git a/Makefile b/Makefile
|
|
Harald Hoyer |
5f0dd7 |
index c69e2dfc..02e2c4b5 100644
|
|
Harald Hoyer |
5f0dd7 |
--- a/Makefile
|
|
Harald Hoyer |
5f0dd7 |
+++ b/Makefile
|
|
Harald Hoyer |
5f0dd7 |
@@ -1,9 +1,13 @@
|
|
Harald Hoyer |
5f0dd7 |
-include dracut-version.sh
|
|
Harald Hoyer |
5f0dd7 |
|
|
Harald Hoyer |
5f0dd7 |
DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
|
|
Harald Hoyer |
5f0dd7 |
-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
|
|
Harald Hoyer |
5f0dd7 |
+ifeq ($(DRACUT_MAIN_VERSION),)
|
|
Harald Hoyer |
5f0dd7 |
+DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
|
|
Harald Hoyer |
5f0dd7 |
+endif
|
|
Harald Hoyer |
5f0dd7 |
DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
|
|
Harald Hoyer |
5f0dd7 |
-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
|
|
Harald Hoyer |
5f0dd7 |
+ifeq ($(DRACUT_FULL_VERSION),)
|
|
Harald Hoyer |
5f0dd7 |
+DRACUT_FULL_VERSION = $(DRACUT_VERSION)
|
|
Harald Hoyer |
5f0dd7 |
+endif
|
|
Harald Hoyer |
5f0dd7 |
|
|
Harald Hoyer |
5f0dd7 |
-include Makefile.inc
|
|
Harald Hoyer |
5f0dd7 |
|
|
Harald Hoyer |
5f0dd7 |
|