From 10ed94aabd1431676fc954de422863b73e1c2a87 Mon Sep 17 00:00:00 2001 From: jjacky Date: Fri, 2 Nov 2012 19:52:45 +0100 Subject: [PATCH] Fix Makefile (git version didn't work) --- Makefile.am | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 20a998f..4970a7f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,8 +5,15 @@ bin_PROGRAMS = pacdep nodist_man_MANS = pacdep.1 dist_doc_DATA = AUTHORS COPYING HISTORY README.md +if USE_GIT_VERSION +_VERSION = `git describe --abbrev=4 --dirty --always` +DEFS += -DGIT_VERSION=\"$(_VERSION)\" +else +_VERSION = $(PACKAGE_VERSION) +endif + dist-hook: - cp $(srcdir)/pacdep.pod $(distdir)/ + cp "$(srcdir)/pacdep.pod" "$(distdir)/" AM_CFLAGS = -g -std=c99 \ -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align \ @@ -17,5 +24,5 @@ AM_CFLAGS = -g -std=c99 \ pacdep_SOURCES = main.c pacdep.1: pacdep.pod - pod2man --center="Package Dependencies listing" --section=1 --release=$(PACKAGE_VERSION) pacdep.pod pacdep.1 + pod2man --center="Package Dependencies listing" --section=1 --release=$(_VERSION) pacdep.pod pacdep.1