[llvm-commits] [llvm] r61648 - in /llvm/trunk: Makefile Makefile.rules autoconf/configure.ac unittests/Makefile

Bill Wendling isanbard at gmail.com
Sun Jan 4 15:12:21 PST 2009


Author: void
Date: Sun Jan  4 17:12:21 2009
New Revision: 61648

URL: http://llvm.org/viewvc/llvm-project?rev=61648&view=rev
Log:
Modify the unittests Makefiles so that they don't rebuild parts of LLVM just to
run the tests. Most of this was stolen from the llvm/test Makefiles.

Modified:
    llvm/trunk/Makefile
    llvm/trunk/Makefile.rules
    llvm/trunk/autoconf/configure.ac
    llvm/trunk/unittests/Makefile

Modified: llvm/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=61648&r1=61647&r2=61648&view=diff

==============================================================================
--- llvm/trunk/Makefile (original)
+++ llvm/trunk/Makefile Sun Jan  4 17:12:21 2009
@@ -116,7 +116,6 @@
 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
@@ -185,7 +184,7 @@
 	$(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
+happiness: update all check unittests
 
 .PHONY: srpm rpm update happiness
 

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=61648&r1=61647&r2=61648&view=diff

==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Sun Jan  4 17:12:21 2009
@@ -22,9 +22,9 @@
 RecursiveTargets := all clean clean-all install uninstall install-bytecode
 LocalTargets     := all-local clean-local clean-all-local check-local \
                     install-local printvars uninstall-local \
-		    install-bytecode-local
+		    install-bytecode-local unittests
 TopLevelTargets  := check dist dist-check dist-clean dist-gzip dist-bzip2 \
-                    dist-zip
+                    dist-zip unittests
 UserTargets      := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
 InternalTargets  := preconditions distdir dist-hook
 
@@ -1416,6 +1416,22 @@
 	fi
 
 ###############################################################################
+# UNITTESTS: Running the unittests test suite
+###############################################################################
+
+unittests::
+	$(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \
+	  if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \
+	    $(EchoCmd) Running unittests test suite ; \
+	    $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests ; \
+	  else \
+	    $(EchoCmd) No Makefile in unittests directory ; \
+	  fi ; \
+	else \
+	  $(EchoCmd) No unittests directory ; \
+	fi
+
+###############################################################################
 # DISTRIBUTION: Handle construction of a distribution tarball
 ###############################################################################
 
@@ -1503,6 +1519,7 @@
 	    --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
 	  $(MAKE) all && \
 	  $(MAKE) check && \
+	  $(MAKE) unittests && \
 	  $(MAKE) install && \
 	  $(MAKE) uninstall && \
 	  $(MAKE) dist-clean && \

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=61648&r1=61647&r2=61648&view=diff

==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Sun Jan  4 17:12:21 2009
@@ -1029,6 +1029,7 @@
 AC_CONFIG_MAKEFILE(runtime/Makefile)
 AC_CONFIG_MAKEFILE(test/Makefile)
 AC_CONFIG_MAKEFILE(test/Makefile.tests)
+AC_CONFIG_MAKEFILE(unittests/Makefile)
 AC_CONFIG_MAKEFILE(tools/Makefile)
 AC_CONFIG_MAKEFILE(utils/Makefile)
 AC_CONFIG_MAKEFILE(projects/Makefile)

Modified: llvm/trunk/unittests/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile?rev=61648&r1=61647&r2=61648&view=diff

==============================================================================
--- llvm/trunk/unittests/Makefile (original)
+++ llvm/trunk/unittests/Makefile Sun Jan  4 17:12:21 2009
@@ -8,6 +8,7 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ..
+
 include $(LEVEL)/Makefile.config
 
 LIBRARYNAME = UnitTestMain
@@ -20,4 +21,4 @@
 include $(LEVEL)/Makefile.common
 
 clean::
-	$(RM) -f *Tests
+	$(Verb) $(RM) -f *Tests





More information about the llvm-commits mailing list