f9a754afcc53c42a6918be835a8328f8f80dcf2a
hiram
  Fri Sep 1 11:55:13 2017 -0700
for userApps build test directories exist before using them refs #9149

diff --git src/makefile src/makefile
index d7ca8bd..f2d6d99 100644
--- src/makefile
+++ src/makefile
@@ -73,44 +73,44 @@
 	cd hg && echo hg && ${MAKE} userApps
 	cd hg/utils && echo hg/utils && ${MAKE} userApps
 	cd hg/makeDb && echo hg/makeDb && ${MAKE} userApps
 	cd ameme && echo ameme && ${MAKE}
 	cd index/ixIxx && echo index/ixIxx && ${MAKE}
 	@for P in ${BLAT_APPLIST}; do \
 	    ( cd $${P} && echo $${P} && ${MAKE} ) ; \
 	done
 	cd utils/userApps && echo utils/userApps && ${MAKE}
 
 destBin:
 	${MKDIR} ${DESTBINDIR}
 
 clean:
 	@for D in ${DIRS} x; do \
-            if test "$$D" != "x" ; then \
+            if test "$$D" != "x" && test -d "$$D" ; then \
                 ( cd $$D && echo $$D && ${MAKE} clean ) ;\
                 x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
             fi ;\
 	done
 	cd parasol && ${MAKE} clean
 	cd lib && ${MAKE} clean 
 	cd hg && ${MAKE} clean
 	cd hg && ${MAKE} clean_utils
 	cd jkOwnLib && ${MAKE} clean
 	cd htslib && ${MAKE} clean
 	cd utils && ${MAKE} clean
-	cd webBlat && ${MAKE} clean
-	cd isPcr && ${MAKE} clean
+	if test -d webBlat ; then cd webBlat && ${MAKE} clean ; fi
+	if test -d isPcr ; then cd isPcr && ${MAKE} clean ; fi
 	touch non-empty-rm.o
 	- find . -name \*.o -print | xargs rm
 	rm -f tags TAGS
 	rm -f cscope.out cscope.files cscope.po.out
 
 testDirs = lib utils blat gfServer hg
 test:: $(testDirs:%=%.test)
 %.test:
 	cd $* && ${MAKE} test
 
 LIB_TAGS_IN = lib/*.[hc] */lib/*.[hc] */*/lib/*.[hc] */*/*/lib/*.[hc] jkOwnLib/*.c \
 	inc/*.h */inc/*.h */*/inc/*.h */*/*/inc/*.h
 
 # build tags for libraries
 .PHONY: tags