]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Clever short circuiting tricks don't seem to work everywhere
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2022 18:10:07 +0000 (12:10 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 17 Nov 2022 18:10:07 +0000 (12:10 -0600)
Makefile

index fab17ab49165098781891368402234ecfcb6e4ac..a55837281c0dea581f110884fafa1d928bf7905d 100644 (file)
--- 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