blob: a6ff8def6f45c628a31710bb6f08ae2af467bc53 [file] [log] [blame]
Shih-wei Liaoea285162010-06-04 12:34:56 -07001###########################################################
2## TableGen: Compile .td files to .inc.
3###########################################################
4ifeq ($(LOCAL_MODULE_CLASS),)
5 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
6endif
7
8ifneq ($(strip $(TBLGEN_TABLES)),)
9
10intermediates := $(call local-intermediates-dir)
11
Shih-wei Liao3049ec92010-09-10 14:45:09 -070012ifneq ($(findstring AttrImpl.inc,$(TBLGEN_TABLES)),)
13LOCAL_GENERATED_SOURCES += $(intermediates)/clang/AST/AttrImpl.inc
14$(intermediates)/clang/AST/AttrImpl.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(TBLGEN)
15 @echo "Building Clang attribute implementations with tblgen"
16 $(call transform-host-td-to-out,clang-attr-impl)
17endif
18
19ifneq ($(findstring AttrList.inc,$(TBLGEN_TABLES)),)
20LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Basic/AttrList.inc
21$(intermediates)/clang/Basic/AttrList.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(TBLGEN)
22 @echo "Building Clang attribute list with tblgen"
23 $(call transform-host-td-to-out,clang-attr-list)
24endif
25
Logan150e0ef2011-01-19 10:29:26 +080026ifneq ($(findstring AttrPCHRead.inc,$(TBLGEN_TABLES)),)
27LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Serialization/AttrPCHRead.inc
28$(intermediates)/clang/Serialization/AttrPCHRead.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(TBLGEN)
29 @echo "Building Clang attribute pch read with tblgen"
30 $(call transform-host-td-to-out,clang-attr-pch-read)
31endif
32
33ifneq ($(findstring AttrPCHWrite.inc,$(TBLGEN_TABLES)),)
34LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Serialization/AttrPCHWrite.inc
35$(intermediates)/clang/Serialization/AttrPCHWrite.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(TBLGEN)
36 @echo "Building Clang attribute pch write with tblgen"
37 $(call transform-host-td-to-out,clang-attr-pch-write)
38endif
39
Shih-wei Liao3049ec92010-09-10 14:45:09 -070040ifneq ($(findstring Attrs.inc,$(TBLGEN_TABLES)),)
41LOCAL_GENERATED_SOURCES += $(intermediates)/clang/AST/Attrs.inc
42$(intermediates)/clang/AST/Attrs.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(TBLGEN)
43 @echo "Building Clang attribute classes with tblgen"
44 $(call transform-host-td-to-out,clang-attr-classes)
45endif
46
Shih-wei Liaoea285162010-06-04 12:34:56 -070047ifneq ($(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)),)
48LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/clang/Basic/,$(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)))
49$(intermediates)/clang/Basic/Diagnostic%Kinds.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(TBLGEN)
50 @echo "Building Clang $(patsubst Diagnostic%Kinds.inc,%,$(@F)) diagnostic tables with tblgen"
51 $(call transform-host-td-to-out,clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc,%,$(@F)))
52endif
53
54ifneq ($(findstring DiagnosticGroups.inc,$(TBLGEN_TABLES)),)
55LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Basic/DiagnosticGroups.inc
56$(intermediates)/clang/Basic/DiagnosticGroups.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_ROOT_PATH)/include/clang/Basic/DiagnosticGroups.td $(TBLGEN)
57 @echo "Building Clang diagnostic groups with tblgen"
58 $(call transform-host-td-to-out,clang-diag-groups)
59endif
60
Shih-wei Liao3049ec92010-09-10 14:45:09 -070061ifneq ($(findstring DeclNodes.inc,$(TBLGEN_TABLES)),)
62LOCAL_GENERATED_SOURCES += $(intermediates)/clang/AST/DeclNodes.inc
63$(intermediates)/clang/AST/DeclNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/DeclNodes.td $(TBLGEN)
64 @echo "Building Clang declaration node tables with tblgen"
65 $(call transform-host-td-to-out,clang-decl-nodes)
66endif
67
68ifneq ($(findstring StmtNodes.inc,$(TBLGEN_TABLES)),)
69LOCAL_GENERATED_SOURCES += $(intermediates)/clang/AST/StmtNodes.inc
70$(intermediates)/clang/AST/StmtNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/StmtNodes.td $(TBLGEN)
71 @echo "Building Clang statement node tables with tblgen"
72 $(call transform-host-td-to-out,clang-stmt-nodes)
73endif
74
75ifneq ($(findstring arm_neon.inc,$(TBLGEN_TABLES)),)
76LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Basic/arm_neon.inc
77$(intermediates)/clang/Basic/arm_neon.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/arm_neon.td $(TBLGEN)
78 @echo "Building Clang arm_neon.inc with tblgen"
79 $(call transform-host-td-to-out,arm-neon-sema)
80endif
81
Shih-wei Liaoea285162010-06-04 12:34:56 -070082ifneq ($(findstring Options.inc,$(TBLGEN_TABLES)),)
83LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Driver/Options.inc
84$(intermediates)/clang/Driver/Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN)
85 @echo "Building Clang Driver Option tables with tblgen"
86 $(call transform-host-td-to-out,opt-parser-defs)
87endif
88
89ifneq ($(findstring CC1Options.inc,$(TBLGEN_TABLES)),)
90LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Driver/CC1Options.inc
91$(intermediates)/clang/Driver/CC1Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN)
92 @echo "Building Clang CC1 Option tables with tblgen"
93 $(call transform-host-td-to-out,opt-parser-defs)
94endif
95
Logan150e0ef2011-01-19 10:29:26 +080096ifneq ($(findstring CC1AsOptions.inc,$(TBLGEN_TABLES)),)
97LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Driver/CC1AsOptions.inc
98$(intermediates)/clang/Driver/CC1AsOptions.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1AsOptions.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN)
99 @echo "Building Clang CC1 As Option tables with tblgen"
100 $(call transform-host-td-to-out,opt-parser-defs)
101endif
102
Shih-wei Liao200213f2010-06-07 22:05:52 -0700103endif