c67566f6e81f825be0d93c664ad82757082fcae0
max
  Thu Nov 7 06:41:28 2019 -0800
adding branch protection suggested by Kate and originally from MarkD: if
you're not on the master branch, you cannot run 'make cgi-alpha' or
'make alpha' anymore. This hopefully protects hgwdev from my own
stupidity. No redmine, but related to various build error messages and
threads to browser-staff over the last few days.

diff --git src/makefile src/makefile
index 0b34898..8921885 100644
--- src/makefile
+++ src/makefile
@@ -1,59 +1,63 @@
 include inc/localEnvironment.mk
 include inc/common.mk
 
 all: utils cgi blatSuite
 
-alpha: clean
+alpha: check-alpha clean
 	${MAKE} utils-alpha cgi-alpha blatSuite
 
 beta: check-beta clean cgi-beta
 
 # do a git update and clean
 update:
 	git pull
 	${MAKE} clean
 
 topLibs:
 	@./checkUmask.sh
 	@MACHTYPE=${MACHTYPE} ./machTest.sh
 	cd lib && ${MAKE}
 	cd jkOwnLib && ${MAKE}
 	cd parasol/lib && ${MAKE}
 	cd htslib && ${MAKE}
 
 optLib:
 	cd optimalLeaf && ${MAKE}
 
 hgLib:
 	@./hg/sqlEnvTest.sh
 	cd hg/lib && ${MAKE}
 
 libs: topLibs hgLib optLib
 
 cgi: libs
 	cd hg && ${MAKE} cgi
 	cd utils/bedToBigBed && ${MAKE} cgi
 
-cgi-alpha: libs
+cgi-alpha: check-alpha libs
 	cd hg && ${MAKE} alpha
 	cd utils/bedToBigBed && ${MAKE} alpha
 
 cgi-beta: check-beta libs
 	cd hg && ${MAKE} beta
 	cd utils/bedToBigBed && ${MAKE} beta
 
+check-alpha:
+	# this will fail if we are not on master branch:
+	git branch | egrep '\* master' > /dev/null
+
 check-beta:
 	# this will fail if we are not in a beta checkout:
 	git branch | egrep '\* v[0-9]+_branch' > /dev/null	
 
 blatSuite: topLibs hgLib
 	cd blat && ${MAKE}
 	cd gfClient && ${MAKE}
 	cd gfServer && ${MAKE}
 	cd webBlat && ${MAKE}
 	cd hg/pslPretty && ${MAKE}
 	cd hg/pslReps && ${MAKE}
 	cd hg/pslSort && ${MAKE}
 	cd utils/nibFrag && ${MAKE}
 	cd utils/faToNib && ${MAKE}
 	cd utils/faToTwoBit && ${MAKE}
@@ -139,31 +143,31 @@
 etags-all:
 	find . -name '*.[ch]' | etags -
 
 utils: libs destBin
 	${MKDIR} ${SCRIPTS}
 	cd parasol && ${MAKE}
 	@for D in ${DIRS} x; do \
             if test "$$D" != "x" ; then \
                 ( cd $$D && echo $$D && ${MAKE} ) ;\
                 x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
             fi ;\
 	done
 	cd utils && ${MAKE}
 	cd hg && ${MAKE} utils
 
-utils-alpha: libs destBin
+utils-alpha: check-alpha libs destBin
 	${MKDIR} ${SCRIPTS}
 	cd parasol && ${MAKE}
 	@for D in ${DIRS} x; do \
             if test "$$D" != "x" ; then \
                 ( cd $$D && echo $$D && ${MAKE} ) ;\
                 x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
             fi ;\
 	done
 	cd utils && ${MAKE}
 	cd hg && ${MAKE} utils
 
 DIRS = ameme blat index dnaDust protDust weblet aladdin primeMate fuse meta tagStorm tabFile
 
 ##  cellar archive for obsolete programs