[pacman-dev] [PATCH] 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> --- doc/Makefile.am | 2 +- scripts/Makefile.am | 2 +- src/pacman/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index 6405cf0..37dab13 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -60,7 +60,7 @@ dist-hook: $(MAKE) $(AM_MAKEFLAGS) all 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) else REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 2962b91..ae6ce36 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -25,7 +25,7 @@ EXTRA_DIST = \ MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp 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) else REAL_PACKAGE_VERSION = $(PACKAGE_VERSION) diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am index 8c14562..31e8b13 100644 --- a/src/pacman/Makefile.am +++ b/src/pacman/Makefile.am @@ -18,7 +18,7 @@ INCLUDES = -I$(top_srcdir)/lib/libalpm AM_CFLAGS = -pedantic -D_GNU_SOURCE 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)\" endif -- 1.7.3.5
participants (1)
-
Xavier Chantry