836b73dcf9a90141ad0923009f03d2494fdd18ca
markd
  Tue Apr 22 15:17:05 2025 -0700
Replaced shell loops in build paths of makefile to use rules.  This should address issues where errors in some rules are not reported (#35339) and also increase speed of builds using multiple cores

diff --git src/hg/snp/makefile src/hg/snp/makefile
index 52beccd2f3d..83f20f84073 100644
--- src/hg/snp/makefile
+++ src/hg/snp/makefile
@@ -1,20 +1,14 @@
 
 SNP_DIRS=snpLoad snpMask snpValid dbSnpJsonToTab checkBigDbSnp
 
-all::
-	@for D in ${SNP_DIRS} x; do \
-	    if test "$$D" != "x" ; then \
-		( cd $$D && echo $$D && ${MAKE} ) ;\
-		x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
-	    fi ;\
-	done
+all:: ${SNP_DIRS:%=%_all}
+%_all:
+	${MAKE} -C $*
 
-clean::
-	@for D in ${SNP_DIRS} ; do \
-	    ( cd "$$D" && echo cleaning $$D && ${MAKE} clean ) ; \
-	done
+clean:: ${SNP_DIRS:%=%_clean}
+%_clean:
+	${MAKE} -C $* clean
 
-compile::
-	@for D in ${SNP_DIRS} ; do \
-	    ( cd "$$D" && echo compile $$D && ${MAKE} compile ) ; \
-	done
+compile:: ${SNP_DIRS:%=%_compile}
+%_compile:
+	${MAKE} -C $* compile