0cd3992c199170e8f903a7991560e0642361ab7a
max
  Thu Apr 13 03:37:40 2023 -0700
more kent-core changes, after a bug report on Github, refs #12785

diff --git src/hg/makefile src/hg/makefile
index b4d208a..d02c332 100644
--- src/hg/makefile
+++ src/hg/makefile
@@ -12,37 +12,39 @@
 	phyloPng hgCustom hgPal hgFileUi hgFileSearch makeDb/hgCgiData \
 	js htdocs/style hgMirror hgBeacon hgGtexTrackSettings pyLib \
 	hgGeneGraph hgs hubApi hgPhyloPlace gar hgSearch
 
 ifdef LOWELAB
     BROWSER_BINS += $(HOME)/lowelab/src/browser/tooltip $(HOME)/lowelab/src/browser/chooseorg
 endif
 
 BROWSER_LOADERS = makeDb/hgLoadBed makeDb/hgLoadWiggle makeDb/hgLoadMaf utils/pslToBigPsl utils/hubCheck
 
 ifneq ($(findstring $(shell hostname),hgwdev hgwbeta),)
     ENCODE_FILES = encode3/encodeDataWarehouse
 endif
 
 
-TEST_DIRS = lib cgilib autoDtd autoSql blastToPsl checkTableCoords embossToPsl \
+TEST_DIRS = lib autoDtd autoSql blastToPsl checkTableCoords embossToPsl \
             genePredSingleCover genePredHisto genePredToBed genePredToGtf \
-	    genePredToMafFrames gbGetEntries hgGetAnn liftAcross liftOver \
+	    genePredToMafFrames gbGetEntries hgGetAnn liftAcross \
             mouseStuff mrnaToGene pslCDnaFilter pslDiff pslHisto \
             pslPartition pslSelect pslStats pslToBed spideyToPsl \
 	    sqlToXml xmlToSql utils
 
+TEST_EXTRA = cgilib liftOver
+
 BROKEN_TEST_DIRS = liftOver scaffoldFaToAgp
 
 BAD_DIRS = \
 	altGraph \
 	cgiExample \
 	geneOverlap \
 	hgBatch \
 	makeSeqs \
 	oneShot \
 	synMap \
 	encode \
 	wikiPlot
 
 # can not build this on Mac OSX - has functions not supported
 UNAME_S := $(shell uname -s) 
@@ -217,31 +219,33 @@
 	test \
 	txCds \
 	txGene \
 	txGraph \
 	utils \
 	uniqSize \
 	updateStsInfo \
 	visiGene/knownToVisiGene
 
 APPS = $(UTIL_DIRS) $(UTILS_APPLIST)
 
 all::    cgi utils
 
 hgLib:
 	cd lib && ${MAKE}
+ifneq ($(wildcard cgilib/makefile),)
 	cd cgilib && ${MAKE}
+endif
 
 userApps: $(UTILS_APPLIST:%=%.userApp)
 	cd altSplice/lib && $(MAKE)
 	cd altSplice/altSplice && $(MAKE) bedToExons
 	cd mouseStuff && $(MAKE) userApps
 	cd ratStuff && $(MAKE) userApps
 
 %.userApp: hgLib
 	cd $* && echo $* && $(MAKE)
 
 utils: $(APPS:%=%.utils)
 %.utils: hgLib
 	cd $* && echo $* && $(MAKE)
 
 # Compile only, the cgi's for those builds without write access
@@ -279,30 +283,34 @@
 	cd $* && echo $* && $(MAKE) install
 
 clean::
 	cd lib && ${MAKE} clean
 	@for D in ${BROWSER_BINS} ${BROWSER_LOADERS}; do \
 		(cd $${D} && ${MAKE} clean;) \
 	done
 	touch non-empty-rm.o
 	- find . -name \*.o -print | xargs rm
 
 clean_utils::
 	@for D in ${UTIL_DIRS}; do \
 		(cd $${D} && ${MAKE} clean;) \
 	done
 
-clean::	${TEST_DIRS:%=%.clean}
+clean::	${TEST_DIRS:%=%.clean} ${TEST_EXTRA:%=%.cleanExtra}
 
 %.clean:
 	cd $* && ${MAKE} clean
 
+# these directories are absent in the kent-core repo due to license issues
+%.cleanExtra:
+	@test -s $*/makefile && (cd $* && ${MAKE} clean) || true
+
 testAll: $(APPS:%=%.testAll)
 
 %.testAll:
 	@test -s $*/tests/makefile && (echo $*; cd $* && $(MAKE) test) || true
 
-test::	${TEST_DIRS:%=%.test} testAll
+test::	${TEST_DIRS:%=%.test} ${TEST_EXTRA:%=%.test} testAll
 
 %.test: hgLib
 	cd $* && ${MAKE} test