aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 36d66d2d0..c12b7791f 100644
--- a/Makefile
+++ b/Makefile
@@ -376,24 +376,25 @@ CONFIG_PLATFORM_MINGW32 := $(subst ",,$(CONFIG_PLATFORM_MINGW32))
376#") 376#")
377endif 377endif
378 378
379# Try various methods to get a more specific EXTRAVERSION 379# Try various methods to get a more specific EXTRAVERSION, but only
380ifeq ($(CONFIG_PLATFORM_MINGW32),y) 380# for MINGW32 platform and if EXTRAVERSION is default '.git'
381ifeq ($(CONFIG_PLATFORM_MINGW32)$(EXTRAVERSION),y.git)
381# Ask git 382# Ask git
382extraversion = $(shell git describe --match FRP 2>/dev/null) 383extraversion := $(shell cd $(srctree) && git describe --match FRP 2>/dev/null)
383ifeq ($(strip $(extraversion)),) 384ifeq ($(strip $(extraversion)),)
384# That didn't work, look for a .frp_describe file 385# That didn't work, look for a .frp_describe file
385extraversion = $(shell cat .frp_describe 2>/dev/null | grep '^FRP-') 386extraversion := $(shell grep '^FRP-' $(srctree)/.frp_describe 2>/dev/null)
386ifeq ($(strip $(extraversion)),) 387ifeq ($(strip $(extraversion)),)
387# That didn't work either, look at current directory name 388# That didn't work either, look at name of source directory
388e1 = $(shell basename `pwd` | grep '^busybox-w32-FRP-') 389e1 := $(shell basename $(srctree) | grep '^busybox-w32-FRP-')
389ifneq ($(strip $(e1)),) 390ifneq ($(strip $(e1)),)
390extraversion = $(subst busybox-w32-,,$(e1)) 391extraversion := $(subst busybox-w32-,,$(e1))
391endif 392endif
392endif 393endif
393endif 394endif
394 395
395ifneq ($(strip $(extraversion)),) 396ifneq ($(strip $(extraversion)),)
396EXTRAVERSION = .$(subst FRP,git,$(extraversion)) 397EXTRAVERSION := .$(subst FRP,git,$(extraversion))
397endif 398endif
398endif 399endif
399 400