make: fail build if git isn't present

git is needed to generate version information

Add a sanity check so that the build don't continue with an empty VERSION. This
is useful for sandboxed build where we might have forgot to include git.

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin 2019-01-09 21:22:46 -08:00 committed by neil saitug
parent b5423775e2
commit a01342a66a

View File

@ -1,6 +1,11 @@
#! /usr/bin/make
VERSION_NAME=Principled Opposition to SegWit
VERSION=$(shell git describe --always --dirty=-modded --abbrev=7)
ifeq ($(VERSION),)
$(error "ERROR: git is required for generating version information")
endif
DISTRO=$(shell lsb_release -is 2>/dev/null || echo unknown)-$(shell lsb_release -rs 2>/dev/null || echo unknown)
PKGNAME = c-lightning