From: Conrad Hoffmann Date: Thu, 2 Jun 2022 08:31:50 +0000 (+0200) Subject: fix(Makefile): use of potentially unset variable X-Git-Tag: 057~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1354d6339a2e603fe0787bc028f9e7e1d49cbf82;p=thirdparty%2Fdracut.git fix(Makefile): use of potentially unset variable `CWD` is not a Make variable. This may have worked accidentally for some people if their shell happend to provide `CWD` and Make picked it up. As is, this tends to pick up git versions of unrelated parent directories, e.g. when packaging for distributions. --- diff --git a/Makefile b/Makefile index ab47fed86..97e189b46 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -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 ?= $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :) 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 ?= $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --tags --always 2>/dev/null || :) ifeq ($(DRACUT_FULL_VERSION),) DRACUT_FULL_VERSION = $(DRACUT_VERSION) endif