Skip to content

Commit

Permalink
add magic and defaults for reference clones
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Chris Torek committed Mar 25, 2016
1 parent d6813ce commit eaa5148
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ $RECYCLE.BIN/

### PROJECT SETTINGS ###
_BE/
.profile-setting
.git-ref-path

# Exlude compiled Sphinx docs
/docs/*/_build/
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,6 +64,7 @@ PROFILE != cat ${PROFILE_SETTING}
.export OBJDIR
.export BUILD_STARTED
.export GIT_REPO_SETTING
.export GIT_REF_PATH
.export PROFILE

.BEGIN:
Expand Down

0 comments on commit eaa5148

Please sign in to comment.