From: Arran Cudbard-Bell Date: Thu, 17 Nov 2022 18:10:07 +0000 (-0600) Subject: Clever short circuiting tricks don't seem to work everywhere X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df9b9bb59d9c4484991fc2ff011de5750fa065c3;p=thirdparty%2Ffreeradius-server.git Clever short circuiting tricks don't seem to work everywhere --- diff --git a/Makefile b/Makefile index fab17ab4916..a55837281c0 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,13 @@ endif # 'configure' was not run? Get the version number from the file. # ifeq "$(RADIUS_VERSION)" "" - RADIUSD_VERSION := $(shell cat VERSION | cut -d '.' -f 1,2).$(shell (git status > /dev/null 2>&1 || (echo '0' && false)) && git describe | cut -d '-' -f 2) + # Default to an incremental version of 0 if we're not building from git + RADIUSD_VERSION_INCRM := $(shell git status > /dev/null 2>&1 && git describe | cut -d '-' -f 2) + ifeq "$(RADIUSD_VERSION_INCRM)" "" + RADIUSD_VERSION_INCRM := "0" + endif + + RADIUSD_VERSION := $(shell cat VERSION | cut -d '.' -f 1,2).$(RADIUSD_VERSION_INCRM) endif MFLAGS += --no-print-directory