Shih-wei Liao | ea28516 | 2010-06-04 12:34:56 -0700 | [diff] [blame^] | 1 | ########################################################### |
| 2 | ## TableGen: Compile .td files to .inc. |
| 3 | ########################################################### |
| 4 | ifeq ($(LOCAL_MODULE_CLASS),) |
| 5 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 6 | endif |
| 7 | |
| 8 | ifneq ($(strip $(TBLGEN_TABLES)),) |
| 9 | |
| 10 | intermediates := $(call local-intermediates-dir) |
| 11 | |
| 12 | ifneq ($(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)),) |
| 13 | LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/clang/Basic/,$(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES))) |
| 14 | $(intermediates)/clang/Basic/Diagnostic%Kinds.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(TBLGEN) |
| 15 | @echo "Building Clang $(patsubst Diagnostic%Kinds.inc,%,$(@F)) diagnostic tables with tblgen" |
| 16 | $(call transform-host-td-to-out,clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc,%,$(@F))) |
| 17 | endif |
| 18 | |
| 19 | ifneq ($(findstring DiagnosticGroups.inc,$(TBLGEN_TABLES)),) |
| 20 | LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Basic/DiagnosticGroups.inc |
| 21 | $(intermediates)/clang/Basic/DiagnosticGroups.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_ROOT_PATH)/include/clang/Basic/DiagnosticGroups.td $(TBLGEN) |
| 22 | @echo "Building Clang diagnostic groups with tblgen" |
| 23 | $(call transform-host-td-to-out,clang-diag-groups) |
| 24 | endif |
| 25 | |
| 26 | ifneq ($(findstring Options.inc,$(TBLGEN_TABLES)),) |
| 27 | LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Driver/Options.inc |
| 28 | $(intermediates)/clang/Driver/Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN) |
| 29 | @echo "Building Clang Driver Option tables with tblgen" |
| 30 | $(call transform-host-td-to-out,opt-parser-defs) |
| 31 | endif |
| 32 | |
| 33 | ifneq ($(findstring CC1Options.inc,$(TBLGEN_TABLES)),) |
| 34 | LOCAL_GENERATED_SOURCES += $(intermediates)/clang/Driver/CC1Options.inc |
| 35 | $(intermediates)/clang/Driver/CC1Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN) |
| 36 | @echo "Building Clang CC1 Option tables with tblgen" |
| 37 | $(call transform-host-td-to-out,opt-parser-defs) |
| 38 | endif |
| 39 | |
| 40 | |
| 41 | endif |