If BUILD_HEAD and BUILD_BRANCH are passed as an argument the build no longer calls git. This makes building qi possible from a source tarball that no longer has ".git" without having to fear that git finds some unrelated ".git" in some parent directory. --- Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index 5421478..5f4e779 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,8 @@ include config.mk BUILD_DATE := $(shell date --iso-8601=seconds) BUILD_HOST := $(shell hostname) -BUILD_BRANCH := $(shell git branch | grep ^\* | cut -d' ' -f2) -BUILD_HEAD := $(shell git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16) +BUILD_BRANCH ?= $(shell git branch | grep ^\* | cut -d' ' -f2) +BUILD_HEAD ?= $(shell git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16) BUILD_VERSION := ${BUILD_BRANCH}_${BUILD_HEAD} LDS = src/cpu/$(CPU)/qi.lds -- 1.7.2.5