From eaa51487cf25d9bc30d9c79cbe42c0e8761e67ed Mon Sep 17 00:00:00 2001 From: Chris Torek Date: Thu, 24 Mar 2016 23:12:11 -0700 Subject: [PATCH] add magic and defaults for reference clones If ${BUILD_ROOT}/.git-ref-path exists, set $GIT_REF_PATH to its contents. Otherwise default to looking in /build/gitrefs (feel free to adjust this default). While we're at it, ignore .git-ref-path and .profile-setting files since they are per-build-tree and should never be commited to this repository. --- .gitignore | 2 ++ Makefile | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index be38e2b..45610ac 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ $RECYCLE.BIN/ ### PROJECT SETTINGS ### _BE/ +.profile-setting +.git-ref-path # Exlude compiled Sphinx docs /docs/*/_build/ diff --git a/Makefile b/Makefile index 4df09e2..25fc814 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,12 @@ MK := ${MAKE} -f ${BUILD_ROOT}/Makefile.inc1 GIT_LOCATION != cat ${GIT_REPO_SETTING} .endif +.if exists(${BUILD_ROOT}/.git-ref-path) +GIT_REF_PATH != cat ${BUILD_ROOT}/.git-ref-path +.elif exists(/build/gitrefs) +GIT_REF_PATH ?= /build/gitrefs +.endif + .if exists(${PROFILE_SETTING}) PROFILE != cat ${PROFILE_SETTING} .endif @@ -58,6 +64,7 @@ PROFILE != cat ${PROFILE_SETTING} .export OBJDIR .export BUILD_STARTED .export GIT_REPO_SETTING +.export GIT_REF_PATH .export PROFILE .BEGIN: