From e730f5901ca90c3cc134cf8a1fb595738e501577 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Tue, 9 Sep 2008 12:24:03 -0400 Subject: [PATCH] docs: handle `git describe` failing If `git describe` fails, fall back to grabbing the version from GUILT_VERSION in the guilt file. This allows the docs to be built from the tarball. Signed-off-by: Josef 'Jeff' Sipek --- Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 75ac71b..9fc1165 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -7,7 +7,7 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) USAGE=$(patsubst %.txt,usage-%.txt,$(MAN1_TXT)) -VERSION=$(shell git describe) +VERSION=$(shell git describe 2> /dev/null || sed -n -e '/^GUILT_VERSION=/ { s/^GUILT_VERSION="/v/; s/"//; p; q; }' ../guilt) prefix?=$(PREFIX) bindir?=$(prefix)/bin -- 2.11.4.GIT