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
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)
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