miniupnp/miniupnpd/gitrev.mk

9 lines
322 B
Makefile
Raw Normal View History

2020-04-28 23:49:06 +00:00
# (c) 2019-2020 Thomas Bernard
# For GNU Make
ISGITREPO := $(shell git rev-parse --is-inside-work-tree)
ifeq ($(ISGITREPO),true)
2020-10-31 09:50:11 +00:00
GITREF := $(shell git describe --exact-match --tags 2> /dev/null || echo "`git rev-parse --abbrev-ref HEAD`-`git rev-parse --short HEAD`" )
CPPFLAGS += -DMINIUPNPD_GIT_REF=\"$(GITREF)\"
endif