optimizer and codegen
[oota-llvm.git] / Makefile
index 9bb311e318f2de2bd156e186c054b59bdb596d30..58a5fe5e1833fe732055baca8fae2db89a276060 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,12 @@ EXTRA_DIST := test llvm.spec include win32 Xcode
 
 include $(LEVEL)/Makefile.config 
 
+# When cross-compiling, there are some things (tablegen) that need to
+# be build for the build system.
+ifeq ($(LLVM_CROSS_COMPILING),1)
+  BUILD_TARGET_DIRS := lib/System lib/Support utils
+endif
+
 # llvm-gcc4 doesn't need runtime libs.  llvm-gcc4 is the only supported one.
 # FIXME: Remove runtime entirely once we have an understanding of where
 # libprofile etc should go.
@@ -77,9 +83,9 @@ debug-opt-prof:
 dist-hook::
        $(Echo) Eliminating files constructed by configure
        $(Verb) $(RM) -f \
-         $(TopDistDir)/include/llvm/ADT/hash_map  \
-         $(TopDistDir)/include/llvm/ADT/hash_set  \
-         $(TopDistDir)/include/llvm/ADT/iterator  \
+         $(TopDistDir)/include/llvm/ADT/hash_map.h  \
+         $(TopDistDir)/include/llvm/ADT/hash_set.h  \
+         $(TopDistDir)/include/llvm/ADT/iterator.h  \
          $(TopDistDir)/include/llvm/Config/config.h  \
          $(TopDistDir)/include/llvm/Support/DataTypes.h  \
          $(TopDistDir)/include/llvm/Support/ThreadSupport.h
@@ -95,9 +101,9 @@ install-libs: install
 FilesToConfig := \
   include/llvm/Config/config.h \
   include/llvm/Support/DataTypes.h \
-  include/llvm/ADT/hash_map \
-  include/llvm/ADT/hash_set \
-  include/llvm/ADT/iterator
+  include/llvm/ADT/hash_map.h \
+  include/llvm/ADT/hash_set.h \
+  include/llvm/ADT/iterator.h
 FilesToConfigPATH  := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
 
 all-local:: $(FilesToConfigPATH)
@@ -145,13 +151,13 @@ build-for-llvm-top:
 SVN = svn
 SVN-UPDATE-OPTIONS =
 AWK = awk
-SUB-SVN-DIRS = $(AWK) '/?      / {print $$2}'   \
-               | xargs $(SVN) info 2>/dev/null \
-               | $(AWK) '/Path: / {print $$2}'
+SUB-SVN-DIRS = $(AWK) '/\?\ \ \ \ \ \ / {print $$2}'   \
+               | LANG=C xargs $(SVN) info 2>/dev/null \
+               | $(AWK) '/Path:\ / {print $$2}'
 
 update:
-       $(SVN) $(SVN-UPDATE-OPTIONS) update
-       @ $(SVN) status | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
+       $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT)
+       @ $(SVN) status $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
 
 happiness: update all check