NetBSD/external/bsd/llvm/tablegen.mk
joerg cd92498901 Update LLVM/Clang to r132395. This brings the usual set of improvements
and support for dependency tracking in tblgen. Use this to make updates
more robust.
2011-06-01 14:13:41 +00:00

20 lines
645 B
Makefile

# $NetBSD: tablegen.mk,v 1.2 2011/06/01 14:13:41 joerg Exp $
.include <bsd.own.mk>
.for t in ${TABLEGEN_SRC}
.for f in ${TABLEGEN_OUTPUT} ${TABLEGEN_OUTPUT.${t}}
${f:C,\|.*$,,}: ${t} ${TOOL_TBLGEN}
[ -z "${f:C,\|.*$,,}" ] || mkdir -p ${f:C,\|.*$,,:H}
${TOOL_TBLGEN} -I${LLVM_SRCDIR}/include ${TABLEGEN_INCLUDES} \
${TABLEGEN_INCLUDES.${t}} ${f:C,^.*\|,,:C,\^, ,} \
${.ALLSRC:M*/${t}} -d ${.TARGET}.d.tmp -o ${.TARGET}.tmp \
&& mv ${.TARGET}.tmp ${.TARGET} && \
mv ${.TARGET}.d.tmp ${.TARGET}.d
DPSRCS+= ${f:C,\|.*$,,}
CLEANFILES+= ${f:C,\|.*$,,} ${f:C,\|.*$,,:C,$,.d,}
.sinclude "${f:C,\|.*$,,:C,$,.d,}"
.endfor
.endfor