From 01b42f91de53e83108a195765d322e6f5add1676 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sat, 14 Dec 2013 10:18:59 +0100 Subject: [PATCH] Makefile: optionally switch to a specific git branch * mk/default.mk (GIT_BRANCH): New configuration variable to specify a Git branch that is checked out before updating. * mk/targets.mk (up0 up1 up2): Check out the branch in GIT_BRANCH before doing an update. Stays on the current branch if GIT_BRANCH is undefined or empty. --- mk/default.mk | 4 ++++ mk/targets.mk | 1 + 2 files changed, 5 insertions(+) diff --git a/mk/default.mk b/mk/default.mk index fecb0b54a..72068d18d 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -22,6 +22,10 @@ infodir = $(prefix)/info # Define if you only need info documentation, the default includes html and pdf #ORG_MAKE_DOC = info # html pdf +# Define which git branch to switch to during update. Does not switch +# the branch when undefined. +GIT_BRANCH = + # Define if you want to include some (or all) files from contrib/lisp # just the filename please (no path prefix, no .el suffix), maybe with globbing #ORG_ADD_CONTRIB = ox-* # e.g. the contributed exporter diff --git a/mk/targets.mk b/mk/targets.mk index 27f4146c5..193696698 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -108,6 +108,7 @@ endif up0:: cleanaddcontrib up0 up1 up2:: + git checkout $(GIT_BRANCH) git remote update git pull up1 up2:: all -- 2.11.4.GIT