llvm.org GIT mirror llvm / 4113bd1
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61648 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 10 years ago
4 changed file(s) with 23 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
115115 tools-only: all
116116 libs-only: all
117117 install-libs: install
118 unittests: all
119118
120119 #------------------------------------------------------------------------
121120 # Make sure the generated headers are up-to-date. This must be kept in
184183 $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT)
185184 @ $(SVN) status $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
186185
187 happiness: update all check
186 happiness: update all check unittests
188187
189188 .PHONY: srpm rpm update happiness
190189
2121 RecursiveTargets := all clean clean-all install uninstall install-bytecode
2222 LocalTargets := all-local clean-local clean-all-local check-local \
2323 install-local printvars uninstall-local \
24 install-bytecode-local
24 install-bytecode-local unittests
2525 TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \
26 dist-zip
26 dist-zip unittests
2727 UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets)
2828 InternalTargets := preconditions distdir dist-hook
2929
14151415 fi
14161416
14171417 ###############################################################################
1418 # UNITTESTS: Running the unittests test suite
1419 ###############################################################################
1420
1421 unittests::
1422 $(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \
1423 if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \
1424 $(EchoCmd) Running unittests test suite ; \
1425 $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests ; \
1426 else \
1427 $(EchoCmd) No Makefile in unittests directory ; \
1428 fi ; \
1429 else \
1430 $(EchoCmd) No unittests directory ; \
1431 fi
1432
1433 ###############################################################################
14181434 # DISTRIBUTION: Handle construction of a distribution tarball
14191435 ###############################################################################
14201436
15021518 --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \
15031519 $(MAKE) all && \
15041520 $(MAKE) check && \
1521 $(MAKE) unittests && \
15051522 $(MAKE) install && \
15061523 $(MAKE) uninstall && \
15071524 $(MAKE) dist-clean && \
10281028 AC_CONFIG_MAKEFILE(runtime/Makefile)
10291029 AC_CONFIG_MAKEFILE(test/Makefile)
10301030 AC_CONFIG_MAKEFILE(test/Makefile.tests)
1031 AC_CONFIG_MAKEFILE(unittests/Makefile)
10311032 AC_CONFIG_MAKEFILE(tools/Makefile)
10321033 AC_CONFIG_MAKEFILE(utils/Makefile)
10331034 AC_CONFIG_MAKEFILE(projects/Makefile)
77 ##===----------------------------------------------------------------------===##
88
99 LEVEL = ..
10
1011 include $(LEVEL)/Makefile.config
1112
1213 LIBRARYNAME = UnitTestMain
1920 include $(LEVEL)/Makefile.common
2021
2122 clean::
22 $(RM) -f *Tests
23 $(Verb) $(RM) -f *Tests