1 # $NetBSD: tablegen.mk,v 1.4 2011/10/11 13:53:57 joerg Exp $
5 .for t in
${TABLEGEN_SRC}
6 .for f in
${TABLEGEN_OUTPUT} ${TABLEGEN_OUTPUT.
${t}}
7 ${f
:C
,\|.
*$,,}: ${t} ${TOOL_LLVM_TBLGEN}
8 [ -z
"${f:C,\|.*$,,}" ] || mkdir
-p
${f
:C
,\|.
*$,,:H
}
9 ${TOOL_LLVM_TBLGEN} -I
${LLVM_SRCDIR}/include ${TABLEGEN_INCLUDES} \
10 ${TABLEGEN_INCLUDES.
${t}} ${f
:C
,^.
*\|
,,:C
,\^
, ,} \
11 ${.ALLSRC
:M
*/${t}} -d
${.TARGET
}.d
-o
${.TARGET
}
12 DPSRCS
+= ${f
:C
,\|.
*$,,}
13 CLEANFILES
+= ${f
:C
,\|.
*$,,} ${f
:C
,\|.
*$,,:C
,$,.d
,}
15 .sinclude
"${f:C,\|.*$,,:C,$,.d,}"
19 .for t in
${CLANG_TABLEGEN_SRC}
20 .for f in
${CLANG_TABLEGEN_OUTPUT} ${CLANG_TABLEGEN_OUTPUT.
${t}}
21 ${f
:C
,\|.
*$,,}: ${t} ${TOOL_CLANG_TBLGEN}
22 [ -z
"${f:C,\|.*$,,}" ] || mkdir
-p
${f
:C
,\|.
*$,,:H
}
23 ${TOOL_CLANG_TBLGEN} -I
${LLVM_SRCDIR}/include \
24 ${CLANG_TABLEGEN_INCLUDES} ${CLANG_TABLEGEN_INCLUDES.
${t}} \
25 ${f
:C
,^.
*\|
,,:C
,\^
, ,} \
26 ${.ALLSRC
:M
*/${t}} -d
${.TARGET
}.d
-o
${.TARGET
}
27 DPSRCS
+= ${f
:C
,\|.
*$,,}
28 CLEANFILES
+= ${f
:C
,\|.
*$,,} ${f
:C
,\|.
*$,,:C
,$,.d
,}
30 .sinclude
"${f:C,\|.*$,,:C,$,.d,}"