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.
This commit is contained in:
Chris Torek
2016-03-24 23:12:11 -07:00
parent d6813ce8e3
commit eaa51487cf
2 changed files with 9 additions and 0 deletions

2
.gitignore vendored
View File

@@ -36,6 +36,8 @@ $RECYCLE.BIN/
### PROJECT SETTINGS ###
_BE/
.profile-setting
.git-ref-path
# Exlude compiled Sphinx docs
/docs/*/_build/

View File

@@ -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: