Avoid rebuilding tests each time they're run.
authorDavin McCall <davmac@davmac.org>
Mon, 18 Jun 2018 19:59:44 +0000 (20:59 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 18 Jun 2018 20:29:12 +0000 (21:29 +0100)
src/tests/Makefile

index f713af7b9b56aeb92db96178b98c804672f6214a..2e4395b785c66f54272a3b728a66890e2af8cf7b 100644 (file)
@@ -8,22 +8,22 @@ check: build-tests
        ./proctests
        ./loadtests
 
-build-tests: tests proctests loadtests
+build-tests: prepare-incdir tests proctests loadtests
 
 # Create an "includes" directory populated with a combination of real and mock headers:
 prepare-incdir:
        mkdir -p includes
        rm -rf includes/*.h
-       cd includes; ln -sf ../../includes/*.h .
-       cd includes; ln -sf ../test-includes/*.h .
+       cd includes; ln -f ../../includes/*.h .
+       cd includes; ln -f ../test-includes/*.h .
 
-tests: prepare-incdir $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o
+tests: $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o
        $(CXX) $(SANITIZEOPTS) -o tests $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
 
-proctests: prepare-incdir $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o
+proctests: $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o
        $(CXX) $(SANITIZEOPTS) -o proctests $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
        
-loadtests: prepare-incdir $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o
+loadtests: $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o
        $(CXX) $(SANITIZEOPTS) -o loadtests $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
 
 $(objects): %.o: %.cc