File: git.mk

package info (click to toggle)
brandy 1.23.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,268 kB
  • sloc: ansic: 39,421; makefile: 91; sh: 1
file content (11 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
gitcommit=\""$(shell git log -1 --format=%h)"\"
ifeq ($(gitcommit),\"""\")
  GITFLAGS = -DBRANDY_RELEASE
else
  gitbranch=\""$(shell git rev-parse --abbrev-ref HEAD)"\"
  gitdate=\""$(shell git log -1 --format=%cd)"\"
  GITFLAGS = -DBRANDY_GITCOMMIT=$(gitcommit) -DBRANDY_GITBRANCH=$(gitbranch) -DBRANDY_GITDATE=$(gitdate)
  ifeq ($(gitbranch),\""master"\")
    GITFLAGS += -DBRANDY_RELEASE
  endif
endif