summaryrefslogtreecommitdiffstats
path: root/src/pacman/Makefile.am
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-05-31 18:53:51 +0200
committerDan McGee <dan@archlinux.org>2008-05-31 19:06:34 +0200
commit636610432a8dc633812d323d3e85b639aabb3302 (patch)
treef010af321584cb935a364678327a6948c49fa2b0 /src/pacman/Makefile.am
parent54e1e3e642d834d8c676db7f74e95c6e24b19eab (diff)
downloadpacman-636610432a8dc633812d323d3e85b639aabb3302.tar.gz
pacman-636610432a8dc633812d323d3e85b639aabb3302.tar.xz
Allow GIT version to be used in pacman builds
Add a new configure flag, --enable-git-version, that allows the output of 'git describe' to be used in the version string associated with this package. This could aid in debugging for users that are using a development version of pacman and we should be able to figure out which cut of code they are using. Sample output: $ pacman --version Pacman v3.1.4-190-g4cfa-dirty - libalpm v2.3.1 $ makepkg --version makepkg (pacman) 3.1.4-190-g5861-dirty Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/Makefile.am')
-rw-r--r--src/pacman/Makefile.am5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 5d6fef3c..e5f8cb36 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -21,6 +21,11 @@ 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
+DEFS += -DGIT_VERSION=\"$(GIT_VERSION)\"
+endif
+
pacman_SOURCES = \
conf.h conf.c \
deptest.c \