aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/Makefile
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-10-16 19:20:55 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-16 19:20:55 (GMT)
commitca33a5e8955533c3f0df3810fd4b751c638e3831 (patch)
tree227234f0398dbf30e4d61d645748bbe78be1d4ee /wpa_supplicant/Makefile
parent4363c0d6f5f91c5c54ab2dc6bc8b37d8200bcec3 (diff)
downloadhostap-ca33a5e8955533c3f0df3810fd4b751c638e3831.zip
hostap-ca33a5e8955533c3f0df3810fd4b751c638e3831.tar.gz
hostap-ca33a5e8955533c3f0df3810fd4b751c638e3831.tar.bz2
Add "git describe" based version string postfix
If hostapd or wpa_supplicant is built from a git repository, add a VERSION_STR postfix from the current git branch state. This is from "git describe --dirty=+". VERSION_STR will thus look something like "2.6-devel-hostap_2_5-132-g4363c0d+" for development builds from a modified repository. This behavior is enabled automatically if a build within git repository is detected (based on ../.git existing). This can be disabled with CONFIG_NO_GITVER=y in wpa_supplicant/.config and hostapd/.config. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/Makefile')
-rw-r--r--wpa_supplicant/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 4cf00e8..0129031 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -17,6 +17,16 @@ CFLAGS += -I$(abspath ../src/utils)
-include .config
+ifndef CONFIG_NO_GITVER
+# Add VERSION_STR postfix for builds from a git repository
+ifeq ($(wildcard ../.git),../.git)
+GITVER := $(shell git describe --dirty=+)
+ifneq ($(GITVER),)
+CFLAGS += -DGIT_VERSION_STR_POSTFIX=\"-$(GITVER)\"
+endif
+endif
+endif
+
ifdef CONFIG_TESTING_OPTIONS
CFLAGS += -DCONFIG_TESTING_OPTIONS
CONFIG_WPS_TESTING=y