for dir in ${SUBDIR}
if ${dir} != ".WAIT" && exists(${.CURDIR}/${dir}.${MACHINE})
__REALSUBDIR+=${dir}.${MACHINE}
else
__REALSUBDIR+=${dir}
endif
endfor
if ${MKGROFF} == "yes"
__REALSUBDIR+=${SUBDIR.roff}
endif
if make(cleandir)
__RECURSETARG= ${TARGETS:Nclean}
clean:
else
__RECURSETARG= ${TARGETS}
endif
for targ in ${__RECURSETARG}
for dir in ${__REALSUBDIR}
if ${dir} == ".WAIT"
SUBDIR_${targ}+= .WAIT
elif !commands(${targ}-${dir})
${targ}-${dir}: .PHONY .MAKE __recurse
SUBDIR_${targ}+= ${targ}-${dir}
endif
endfor
subdir-${targ}: .PHONY ${SUBDIR_${targ}}
${targ}: subdir-${targ}
endfor