Fix LOCAL_MODULE for tblgen rules.

Change-Id: I8058597cff4c4a879742a5bcc17baf81de9ac5d4
diff --git a/clang-tblgen-rules.mk b/clang-tblgen-rules.mk
index ea0eada..9ffc396 100644
--- a/clang-tblgen-rules.mk
+++ b/clang-tblgen-rules.mk
@@ -11,123 +11,123 @@
 
 ifneq ($(findstring AttrImpl.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/AttrImpl.inc
+$(intermediates)/include/clang/AST/AttrImpl.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/AST/AttrImpl.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute implementations with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-impl)
 endif
 
 ifneq ($(findstring AttrList.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/AttrList.inc
+$(intermediates)/include/clang/Basic/AttrList.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Basic/AttrList.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute list with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-list)
 endif
 
 ifneq ($(findstring AttrSpellings.inc,$(TBLGEN_TABLES)),)
-    LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Lex/AttrSpellings.inc
+LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Lex/AttrSpellings.inc
+$(intermediates)/include/clang/Lex/AttrSpellings.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Lex/AttrSpellings.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute spelling list with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-spelling-list)
 endif
 
 ifneq ($(findstring AttrPCHRead.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Serialization/AttrPCHRead.inc
+$(intermediates)/include/clang/Serialization/AttrPCHRead.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Serialization/AttrPCHRead.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute pch read with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-pch-read)
 endif
 
 ifneq ($(findstring AttrPCHWrite.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Serialization/AttrPCHWrite.inc
+$(intermediates)/include/clang/Serialization/AttrPCHWrite.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Serialization/AttrPCHWrite.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute pch write with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-pch-write)
 endif
 
 ifneq ($(findstring AttrLateParsed.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Parse/AttrLateParsed.inc
+$(intermediates)/include/clang/Parse/AttrLateParsed.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Parse/AttrLateParsed.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute late parsed list with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-late-parsed-list)
 endif
 
 ifneq ($(findstring Attrs.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/Attrs.inc
+$(intermediates)/include/clang/AST/Attrs.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/AST/Attrs.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td $(CLANG_TBLGEN)
-	@echo "Building Clang attribute classes with tblgen"
 	$(call transform-host-clang-td-to-out,clang-attr-classes)
 endif
 
 ifneq ($(findstring Checkers.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/Checkers.inc
+$(intermediates)/Checkers.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/Checkers.inc: \
   $(CLANG_ROOT_PATH)/lib/StaticAnalyzer/Checkers/Checkers.td \
   $(CLANG_ROOT_PATH)/include/clang/StaticAnalyzer/Checkers/CheckerBase.td \
   $(CLANG_TBLGEN)
-	@echo "Building Clang static analyzer checkers list with tblgen"
 	$(call transform-host-clang-td-to-out,clang-sa-checkers)
 endif
 
 ifneq ($(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/include/clang/Basic/,$(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)))
+$(intermediates)/include/clang/Basic/Diagnostic%Kinds.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Basic/Diagnostic%Kinds.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_TBLGEN)
-	@echo "Building Clang $(patsubst Diagnostic%Kinds.inc,%,$(@F)) diagnostic tables with tblgen"
 	$(call transform-host-clang-td-to-out,clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc,%,$(@F)))
 endif
 
 ifneq ($(findstring DiagnosticGroups.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/DiagnosticGroups.inc
+$(intermediates)/include/clang/Basic/DiagnosticGroups.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Basic/DiagnosticGroups.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_ROOT_PATH)/include/clang/Basic/DiagnosticGroups.td $(CLANG_TBLGEN)
-	@echo "Building Clang diagnostic groups with tblgen"
 	$(call transform-host-clang-td-to-out,clang-diag-groups)
 endif
 
 ifneq ($(findstring DiagnosticIndexName.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/DiagnosticIndexName.inc
+$(intermediates)/include/clang/Basic/DiagnosticIndexName.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Basic/DiagnosticIndexName.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_TBLGEN)
-	@echo "Building Clang diagnostic name index with tblgen"
 	$(call transform-host-clang-td-to-out,clang-diag-groups)
 endif
 
 ifneq ($(findstring DeclNodes.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/DeclNodes.inc
+$(intermediates)/include/clang/AST/DeclNodes.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/AST/DeclNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/DeclNodes.td $(CLANG_TBLGEN)
-	@echo "Building Clang declaration node tables with tblgen"
 	$(call transform-host-clang-td-to-out,clang-decl-nodes)
 endif
 
 ifneq ($(findstring StmtNodes.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/StmtNodes.inc
+$(intermediates)/include/clang/AST/StmtNodes.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/AST/StmtNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/StmtNodes.td $(CLANG_TBLGEN)
-	@echo "Building Clang statement node tables with tblgen"
 	$(call transform-host-clang-td-to-out,clang-stmt-nodes)
 endif
 
 ifneq ($(findstring arm_neon.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/arm_neon.inc
+$(intermediates)/include/clang/Basic/arm_neon.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Basic/arm_neon.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN)
-	@echo "Building Clang arm_neon.inc with tblgen"
 	$(call transform-host-clang-td-to-out,arm-neon-sema)
 endif
 
 ifneq ($(findstring Options.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Driver/Options.inc
+$(intermediates)/include/clang/Driver/Options.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Driver/Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(CLANG_TBLGEN)
-	@echo "Building Clang Driver Option tables with tblgen"
 	$(call transform-host-clang-td-to-out,opt-parser-defs)
 endif
 
 ifneq ($(findstring CC1Options.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Driver/CC1Options.inc
+$(intermediates)/include/clang/Driver/CC1Options.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Driver/CC1Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1Options.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(CLANG_TBLGEN)
-	@echo "Building Clang CC1 Option tables with tblgen"
 	$(call transform-host-clang-td-to-out,opt-parser-defs)
 endif
 
 ifneq ($(findstring CC1AsOptions.inc,$(TBLGEN_TABLES)),)
 LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Driver/CC1AsOptions.inc
+$(intermediates)/include/clang/Driver/CC1AsOptions.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE)
 $(intermediates)/include/clang/Driver/CC1AsOptions.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1AsOptions.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(CLANG_TBLGEN)
-	@echo "Building Clang CC1 As Option tables with tblgen"
 	$(call transform-host-clang-td-to-out,opt-parser-defs)
 endif