1*76c7fc5fSjoerg# $NetBSD: tablegen.mk,v 1.1 2019/11/11 22:44:57 joerg Exp $ 2*76c7fc5fSjoerg 3*76c7fc5fSjoerg.include <bsd.own.mk> 4*76c7fc5fSjoerg 5*76c7fc5fSjoerg.for t in ${TABLEGEN_SRC} 6*76c7fc5fSjoerg.for f in ${TABLEGEN_OUTPUT} ${TABLEGEN_OUTPUT.${t}} 7*76c7fc5fSjoerg${f:C,\|.*$,,}: ${t} ${TOOL_LLVM_TBLGEN} 8*76c7fc5fSjoerg [ -z "${f:C,\|.*$,,}" ] || mkdir -p ${f:C,\|.*$,,:H} 9*76c7fc5fSjoerg ${TOOL_LLVM_TBLGEN} -I${LLVM_SRCDIR}/include ${TABLEGEN_INCLUDES} \ 10*76c7fc5fSjoerg ${TABLEGEN_INCLUDES.${t}} ${f:C,^.*\|,,:C,\^, ,} \ 11*76c7fc5fSjoerg ${.ALLSRC:M*/${t}} -d ${.TARGET}.d -o ${.TARGET} 12*76c7fc5fSjoergDPSRCS+= ${f:C,\|.*$,,} 13*76c7fc5fSjoergCLEANFILES+= ${f:C,\|.*$,,} ${f:C,\|.*$,,:C,$,.d,} 14*76c7fc5fSjoerg 15*76c7fc5fSjoerg.sinclude "${f:C,\|.*$,,:C,$,.d,}" 16*76c7fc5fSjoerg.endfor 17*76c7fc5fSjoerg.endfor 18*76c7fc5fSjoerg 19*76c7fc5fSjoerg.for t in ${CLANG_TABLEGEN_SRC} 20*76c7fc5fSjoerg.for f in ${CLANG_TABLEGEN_OUTPUT} ${CLANG_TABLEGEN_OUTPUT.${t}} 21*76c7fc5fSjoerg${f:C,\|.*$,,}: ${t} ${TOOL_CLANG_TBLGEN} 22*76c7fc5fSjoerg [ -z "${f:C,\|.*$,,}" ] || mkdir -p ${f:C,\|.*$,,:H} 23*76c7fc5fSjoerg ${TOOL_CLANG_TBLGEN} -I${LLVM_SRCDIR}/include \ 24*76c7fc5fSjoerg ${CLANG_TABLEGEN_INCLUDES} ${CLANG_TABLEGEN_INCLUDES.${t}} \ 25*76c7fc5fSjoerg ${f:C,^.*\|,,:C,\^, ,} \ 26*76c7fc5fSjoerg ${.ALLSRC:M*/${t}} -d ${.TARGET}.d -o ${.TARGET} 27*76c7fc5fSjoergDPSRCS+= ${f:C,\|.*$,,} 28*76c7fc5fSjoergCLEANFILES+= ${f:C,\|.*$,,} ${f:C,\|.*$,,:C,$,.d,} 29*76c7fc5fSjoerg 30*76c7fc5fSjoerg.sinclude "${f:C,\|.*$,,:C,$,.d,}" 31*76c7fc5fSjoerg.endfor 32*76c7fc5fSjoerg.endfor 33