Skip to content

Commit a01342a

Browse files
jb55niftynei
authored andcommitted
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 <[email protected]>
1 parent b542377 commit a01342a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#! /usr/bin/make
22
VERSION_NAME=Principled Opposition to SegWit
33
VERSION=$(shell git describe --always --dirty=-modded --abbrev=7)
4+
5+
ifeq ($(VERSION),)
6+
$(error "ERROR: git is required for generating version information")
7+
endif
8+
49
DISTRO=$(shell lsb_release -is 2>/dev/null || echo unknown)-$(shell lsb_release -rs 2>/dev/null || echo unknown)
510
PKGNAME = c-lightning
611

0 commit comments

Comments
 (0)