Original patch by Talin.
[oota-llvm.git] / Makefile
index cfb4c1258ed4c750a896121646ae1c3600074f48..5987b88f7735f48b8338a17864a471331d0ae73a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ else
   OPTIONAL_DIRS := examples projects bindings
 endif
 
-EXTRA_DIST := test llvm.spec include win32 Xcode
+EXTRA_DIST := test unittests llvm.spec include win32 Xcode
 
 include $(LEVEL)/Makefile.config 
 
@@ -54,6 +54,11 @@ ifeq ($(MAKECMDGOALS),tools-only)
   OPTIONAL_DIRS :=
 endif
 
+ifeq ($(MAKECMDGOALS),unittests)
+  DIRS := $(filter-out tools runtime docs, $(DIRS)) utils unittests
+  OPTIONAL_DIRS :=
+endif
+
 # Don't install utils, examples, or projects they are only used to 
 # build LLVM.
 ifeq ($(MAKECMDGOALS),install)
@@ -111,6 +116,7 @@ dist-hook::
 tools-only: all
 libs-only: all
 install-libs: install
+unittests: all
 
 #------------------------------------------------------------------------
 # Make sure the generated headers are up-to-date. This must be kept in