Use explicit add_subdirectory's for LLVM target sublibraries instead
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

llvm-svn: 126068
diff --git a/llvm/lib/Target/ARM/CMakeLists.txt b/llvm/lib/Target/ARM/CMakeLists.txt
index 38741eb..d3b8b54 100644
--- a/llvm/lib/Target/ARM/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/CMakeLists.txt
@@ -62,3 +62,8 @@
   PROPERTY COMPILE_FLAGS "/Od"
   )
 endif()
+
+add_subdirectory(TargetInfo)
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
diff --git a/llvm/lib/Target/Alpha/CMakeLists.txt b/llvm/lib/Target/Alpha/CMakeLists.txt
index c8bd866..454262a 100644
--- a/llvm/lib/Target/Alpha/CMakeLists.txt
+++ b/llvm/lib/Target/Alpha/CMakeLists.txt
@@ -24,3 +24,5 @@
   AlphaTargetMachine.cpp
   AlphaSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/Blackfin/CMakeLists.txt b/llvm/lib/Target/Blackfin/CMakeLists.txt
index f19b666..a47299f 100644
--- a/llvm/lib/Target/Blackfin/CMakeLists.txt
+++ b/llvm/lib/Target/Blackfin/CMakeLists.txt
@@ -24,3 +24,5 @@
   BlackfinTargetMachine.cpp
   BlackfinSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/CBackend/CMakeLists.txt b/llvm/lib/Target/CBackend/CMakeLists.txt
index be24336..a23ff85 100644
--- a/llvm/lib/Target/CBackend/CMakeLists.txt
+++ b/llvm/lib/Target/CBackend/CMakeLists.txt
@@ -1,3 +1,5 @@
 add_llvm_target(CBackend
   CBackend.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt
index fe9a126..09b48ce 100644
--- a/llvm/lib/Target/CMakeLists.txt
+++ b/llvm/lib/Target/CMakeLists.txt
@@ -22,30 +22,20 @@
 foreach(t ${LLVM_TARGETS_TO_BUILD})
   message(STATUS "Targeting ${t}")
   add_subdirectory(${t})
-  add_subdirectory(${t}/TargetInfo)
   set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
   file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
   if( asmp_file )
     set(LLVM_ENUM_ASM_PRINTERS
       "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
   endif()
-  if( EXISTS ${td}/InstPrinter/CMakeLists.txt )
-    add_subdirectory(${t}/InstPrinter)
-  endif()
   if( EXISTS ${td}/AsmParser/CMakeLists.txt )
-    add_subdirectory(${t}/AsmParser)
     set(LLVM_ENUM_ASM_PARSERS
       "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
   endif()
   if( EXISTS ${td}/Disassembler/CMakeLists.txt )
-    add_subdirectory(${t}/Disassembler)
     set(LLVM_ENUM_DISASSEMBLERS
       "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
   endif()
-  if( EXISTS ${td}/Utils/CMakeLists.txt )
-    add_subdirectory(${td}/Utils)
-  endif()
-  set(CURRENT_LLVM_TARGET)
 endforeach(t)
 
 # Produce llvm/Config/AsmPrinters.def
diff --git a/llvm/lib/Target/CellSPU/CMakeLists.txt b/llvm/lib/Target/CellSPU/CMakeLists.txt
index 633bdf6..a2a2ef1 100644
--- a/llvm/lib/Target/CellSPU/CMakeLists.txt
+++ b/llvm/lib/Target/CellSPU/CMakeLists.txt
@@ -25,3 +25,5 @@
   SPUSelectionDAGInfo.cpp
   SPUNopFiller.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/CppBackend/CMakeLists.txt b/llvm/lib/Target/CppBackend/CMakeLists.txt
index f8182b8..e937559 100644
--- a/llvm/lib/Target/CppBackend/CMakeLists.txt
+++ b/llvm/lib/Target/CppBackend/CMakeLists.txt
@@ -1,3 +1,5 @@
 add_llvm_target(CppBackend
   CPPBackend.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/MBlaze/CMakeLists.txt b/llvm/lib/Target/MBlaze/CMakeLists.txt
index e95fb54..004057a 100644
--- a/llvm/lib/Target/MBlaze/CMakeLists.txt
+++ b/llvm/lib/Target/MBlaze/CMakeLists.txt
@@ -33,3 +33,8 @@
   MBlazeELFWriterInfo.cpp
   MBlazeMCCodeEmitter.cpp
   )
+
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/MSP430/CMakeLists.txt b/llvm/lib/Target/MSP430/CMakeLists.txt
index 3888600..2c7cbb6 100644
--- a/llvm/lib/Target/MSP430/CMakeLists.txt
+++ b/llvm/lib/Target/MSP430/CMakeLists.txt
@@ -24,3 +24,6 @@
   MSP430AsmPrinter.cpp
   MSP430MCInstLower.cpp
   )
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/Mips/CMakeLists.txt b/llvm/lib/Target/Mips/CMakeLists.txt
index 53a5280..26df1a0 100644
--- a/llvm/lib/Target/Mips/CMakeLists.txt
+++ b/llvm/lib/Target/Mips/CMakeLists.txt
@@ -24,3 +24,5 @@
   MipsTargetObjectFile.cpp
   MipsSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/PTX/CMakeLists.txt b/llvm/lib/Target/PTX/CMakeLists.txt
index b7d964e..331266d 100644
--- a/llvm/lib/Target/PTX/CMakeLists.txt
+++ b/llvm/lib/Target/PTX/CMakeLists.txt
@@ -22,3 +22,5 @@
   PTXSubtarget.cpp
   PTXTargetMachine.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/PowerPC/CMakeLists.txt b/llvm/lib/Target/PowerPC/CMakeLists.txt
index 104d769..f282579 100644
--- a/llvm/lib/Target/PowerPC/CMakeLists.txt
+++ b/llvm/lib/Target/PowerPC/CMakeLists.txt
@@ -32,3 +32,6 @@
   PPCTargetMachine.cpp
   PPCSelectionDAGInfo.cpp
   )
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/Sparc/CMakeLists.txt b/llvm/lib/Target/Sparc/CMakeLists.txt
index 3739298..6839234 100644
--- a/llvm/lib/Target/Sparc/CMakeLists.txt
+++ b/llvm/lib/Target/Sparc/CMakeLists.txt
@@ -24,3 +24,5 @@
   SparcTargetMachine.cpp
   SparcSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/SystemZ/CMakeLists.txt b/llvm/lib/Target/SystemZ/CMakeLists.txt
index cf02931..1f5d355 100644
--- a/llvm/lib/Target/SystemZ/CMakeLists.txt
+++ b/llvm/lib/Target/SystemZ/CMakeLists.txt
@@ -22,3 +22,5 @@
   SystemZTargetMachine.cpp
   SystemZSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/X86/CMakeLists.txt b/llvm/lib/Target/X86/CMakeLists.txt
index b710040..b5fa94f 100644
--- a/llvm/lib/Target/X86/CMakeLists.txt
+++ b/llvm/lib/Target/X86/CMakeLists.txt
@@ -57,3 +57,8 @@
 
 add_llvm_target(X86CodeGen ${sources})
 
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
+add_subdirectory(Utils)
diff --git a/llvm/lib/Target/XCore/CMakeLists.txt b/llvm/lib/Target/XCore/CMakeLists.txt
index 5045962..9093de6 100644
--- a/llvm/lib/Target/XCore/CMakeLists.txt
+++ b/llvm/lib/Target/XCore/CMakeLists.txt
@@ -23,3 +23,5 @@
   XCoreTargetObjectFile.cpp
   XCoreSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)