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/txGene/makefile src/hg/txGene/makefile index 5b90f398e81..ca8882622da 100644 --- src/hg/txGene/makefile +++ src/hg/txGene/makefile @@ -1,45 +1,33 @@ kentSrc = ../.. include ../../inc/common.mk L += -lm MYLIBDIR = ../../lib/${MACHTYPE} MYLIBS = ${MYLIBDIR}/jkweb.a -all: - @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 - DIRS = \ txGenbankData \ txGeneAccession \ txGeneAlias \ txGeneAltProt \ txGeneCanonical \ txGeneCdsMap \ txGeneColor \ txGeneExplainUpdate1 \ txGeneFromBed \ txGeneProtAndRna \ txGeneSeparateNoncoding \ txGeneValidation \ txGeneXref -clean:: - @for D in ${DIRS} x; do \ - if test "$$D" != "x" ; then \ - ( cd $$D && echo $$D && ${MAKE} clean ) ;\ - x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \ - fi ;\ - done +all: ${DIRS:%=%_all} +%_all: + ${MAKE} -C $* + +clean:: ${DIRS:%=%_clean} +%_clean: + ${MAKE} -C $* clean -compile: - @for D in ${DIRS} x; do \ - if test "$$D" != "x" ; then \ - ( cd $$D && echo $$D && ${MAKE} compile ) ;\ - x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \ - fi ;\ - done +compile: ${DIRS:%=%_compile} +%_compile: + ${MAKE} -C $* compile