From 89ba5514de8e3f147a444b675efb7ae9bd9a42eb Mon Sep 17 00:00:00 2001 From: Cotton Seed Date: Thu, 19 Jan 2017 23:26:49 -0500 Subject: [PATCH] Fix version info bug. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 17ba257..20344f1 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,8 @@ ICEBOX = /usr/local/share/icebox .PHONY: all all: bin/arachne-pnr share/arachne-pnr/chipdb-1k.bin share/arachne-pnr/chipdb-8k.bin -VER = 0.1+$(shell echo `git log --oneline | wc -l`)+$(shell echo `git diff --name-only HEAD | wc -l`) -GIT_REV = $(shell git rev-parse --verify --short HEAD) +VER = 0.1+$(shell test -e .git && echo `git log --oneline | wc -l`+`git diff --name-only HEAD | wc -l`) +GIT_REV = $(shell git rev-parse --verify --short HEAD 2>/dev/null || echo UNKNOWN) VER_HASH = $(shell echo "$(VER) $(GIT_REV)" | sum | cut -d ' ' -f -1)