1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

add build variant to version string

This commit is contained in:
Steffen Vogel 2017-03-06 13:03:32 -04:00
parent 57d19bfff9
commit 4de144ff70
3 changed files with 16 additions and 11 deletions

View file

@ -33,15 +33,6 @@ CFLAGS += -Wall -Werror -fdiagnostics-color=auto
CFLAGS += -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1 -DV=$(V)
LDFLAGS += -L$(BUILDDIR)
ifdef CI
CFLAGS += -D_GIT_REV='"${CI_BUILD_REF:0:7}~ci"'
else
GIT = $(shell type -p git)
ifneq ($(GIT),)
CFLAGS += -D_GIT_REV='"$(shell git rev-parse --short HEAD)"'
endif
endif
# We must compile without optimizations for gcov!
ifdef DEBUG
CFLAGS += -O0 -g
@ -71,10 +62,24 @@ endif
SPACE :=
SPACE +=
BUILDDIR := $(BUILDDIR)/$(subst $(SPACE),-,$(strip $(VARIANTS)))
VARIANT = $(subst $(SPACE),-,$(strip $(VARIANTS)))
BUILDDIR := $(BUILDDIR)/$(VARIANT)
SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Add git revision and build variant defines
ifdef CI
CFLAGS += -D_GIT_REV='"${CI_BUILD_REF:0:7}"'
CFLAGS += -D_VARIANT='"-ci-$(VARIANT)"'
else
GIT = $(shell type -p git)
GIT_REV = $(shell git rev-parse --short HEAD)
ifneq ($(GIT),)
CFLAGS += -D_GIT_REV='"$(GIT_REV)"'
endif
CFLAGS += -D_VARIANT='"-$(VARIANT)"'
endif
# pkg-config dependencies
PKGS = libconfig

View file

@ -15,7 +15,7 @@
#endif
/** The version number of VILLASnode */
#define VERSION "v0.6-" _GIT_REV
#define VERSION "v0.7-" _GIT_REV _VARIANT
/** Default number of values in a sample */
#define DEFAULT_VALUES 64

0
tools/rebind_device.sh Normal file → Executable file
View file