1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-16 06:15:08 -05:00

Makefile: Use git describe --dirty for GIT VERSION

dirty indicates if the repo has uncommited changes or not when building,
so dont hardcode this info.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Xavier Chantry 2011-01-22 15:15:16 +01:00 committed by Dan McGee
parent b947db040c
commit e277e838d7
3 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ dist-hook:
$(MAKE) $(AM_MAKEFLAGS) all $(MAKE) $(AM_MAKEFLAGS) all
if USE_GIT_VERSION if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
REAL_PACKAGE_VERSION = $(GIT_VERSION) REAL_PACKAGE_VERSION = $(GIT_VERSION)
else else
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)

View File

@ -25,7 +25,7 @@ EXTRA_DIST = \
MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
if USE_GIT_VERSION if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
REAL_PACKAGE_VERSION = $(GIT_VERSION) REAL_PACKAGE_VERSION = $(GIT_VERSION)
else else
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)

View File

@ -18,7 +18,7 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm
AM_CFLAGS = -pedantic -D_GNU_SOURCE AM_CFLAGS = -pedantic -D_GNU_SOURCE
if USE_GIT_VERSION if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
DEFS += -DGIT_VERSION=\"$(GIT_VERSION)\" DEFS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif endif