1CLANG_LEVEL := ../../..
2TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic
3BUILT_SOURCES = Attrs.inc AttrImpl.inc AttrDump.inc AttrVisitor.inc \
4                StmtNodes.inc DeclNodes.inc \
5                CommentNodes.inc CommentHTMLTags.inc \
6                CommentHTMLTagsProperties.inc \
7                CommentHTMLNamedCharacterReferences.inc \
8                CommentCommandInfo.inc \
9                CommentCommandList.inc
10
11TABLEGEN_INC_FILES_COMMON = 1
12
13include $(CLANG_LEVEL)/Makefile
14
15$(ObjDir)/Attrs.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
16                              $(ObjDir)/.dir
17	$(Echo) "Building Clang attribute classes with tblgen"
18	$(Verb) $(ClangTableGen) -gen-clang-attr-classes -o $(call SYSPATH, $@) \
19		-I $(PROJ_SRC_DIR)/../../ $<
20
21$(ObjDir)/AttrImpl.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
22                              $(ObjDir)/.dir
23	$(Echo) "Building Clang attribute implementations with tblgen"
24	$(Verb) $(ClangTableGen) -gen-clang-attr-impl -o $(call SYSPATH, $@) \
25		-I $(PROJ_SRC_DIR)/../../ $<
26
27$(ObjDir)/AttrDump.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
28                              $(ObjDir)/.dir
29	$(Echo) "Building Clang attribute dumper with tblgen"
30	$(Verb) $(ClangTableGen) -gen-clang-attr-dump -o $(call SYSPATH, $@) \
31		-I $(PROJ_SRC_DIR)/../../ $<
32
33$(ObjDir)/AttrVisitor.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
34                                $(ObjDir)/.dir
35	$(Echo) "Building Clang attribute AST visitor with tblgen"
36	$(Verb) $(ClangTableGen) -gen-clang-attr-ast-visitor -o $(call SYSPATH, $@) \
37		-I $(PROJ_SRC_DIR)/../../ $<
38
39$(ObjDir)/StmtNodes.inc.tmp : $(TD_SRC_DIR)/StmtNodes.td $(CLANG_TBLGEN) \
40                              $(ObjDir)/.dir
41	$(Echo) "Building Clang statement node tables with tblgen"
42	$(Verb) $(ClangTableGen) -gen-clang-stmt-nodes -o $(call SYSPATH, $@) $<
43
44$(ObjDir)/DeclNodes.inc.tmp : $(TD_SRC_DIR)/DeclNodes.td $(CLANG_TBLGEN) \
45                              $(ObjDir)/.dir
46	$(Echo) "Building Clang declaration node tables with tblgen"
47	$(Verb) $(ClangTableGen) -gen-clang-decl-nodes -o $(call SYSPATH, $@) $<
48
49$(ObjDir)/CommentNodes.inc.tmp : $(TD_SRC_DIR)/CommentNodes.td $(CLANG_TBLGEN) \
50                              $(ObjDir)/.dir
51	$(Echo) "Building Clang comment node tables with tblgen"
52	$(Verb) $(ClangTableGen) -gen-clang-comment-nodes -o $(call SYSPATH, $@) $<
53
54$(ObjDir)/CommentHTMLTags.inc.tmp : $(PROJ_SRC_DIR)/CommentHTMLTags.td $(CLANG_TBLGEN) \
55                              $(ObjDir)/.dir
56	$(Echo) "Building Clang comment HTML tag matchers with tblgen"
57	$(Verb) $(ClangTableGen) -gen-clang-comment-html-tags -o $(call SYSPATH, $@) $<
58
59$(ObjDir)/CommentHTMLTagsProperties.inc.tmp : $(PROJ_SRC_DIR)/CommentHTMLTags.td \
60                                              $(CLANG_TBLGEN) $(ObjDir)/.dir
61	$(Echo) "Building Clang comment HTML tag properties with tblgen"
62	$(Verb) $(ClangTableGen) -gen-clang-comment-html-tags-properties -o $(call SYSPATH, $@) $<
63
64$(ObjDir)/CommentHTMLNamedCharacterReferences.inc.tmp : \
65                    $(PROJ_SRC_DIR)/CommentHTMLNamedCharacterReferences.td \
66                    $(CLANG_TBLGEN) $(ObjDir)/.dir
67	$(Echo) "Building Clang named character reference translation function with tblgen"
68	$(Verb) $(ClangTableGen) -gen-clang-comment-html-named-character-references -o $(call SYSPATH, $@) $<
69
70$(ObjDir)/CommentCommandInfo.inc.tmp : $(PROJ_SRC_DIR)/CommentCommands.td \
71                                              $(CLANG_TBLGEN) $(ObjDir)/.dir
72	$(Echo) "Building Clang comment command info with tblgen"
73	$(Verb) $(ClangTableGen) -gen-clang-comment-command-info -o $(call SYSPATH, $@) $<
74
75$(ObjDir)/CommentCommandList.inc.tmp : $(PROJ_SRC_DIR)/CommentCommands.td \
76                                              $(CLANG_TBLGEN) $(ObjDir)/.dir
77	$(Echo) "Building Clang list of comment commands with tblgen"
78	$(Verb) $(ClangTableGen) -gen-clang-comment-command-list -o $(call SYSPATH, $@) $<
79
80