0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-02-02 14:20:01 +00:00

Birdtest: Build system: improve dependencies

while a some source file is changed, the test suite will recompile
This commit is contained in:
Pavel Tvrdík 2015-04-15 12:07:10 +02:00
parent 1ce8d33b80
commit 81b2e266fb
3 changed files with 7 additions and 4 deletions

View File

@ -13,9 +13,9 @@ tests: test/birdtest.o
set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
test/birdtest.o: $(srcdir)/test/birdtest.c
test/birdtest.o: $(srcdir)/test/birdtest.c $(srcdir)/test/birdtest.h
mkdir -p test
$(CC) $(CFLAGS) $(TARGET_ARCH) -c $^ $(LDLIBS) -o $@
$(CC) $(CFLAGS) $(TARGET_ARCH) -c $< $(LDLIBS) -o $@
daemon: $(exedir)/bird

View File

@ -47,7 +47,10 @@ tests_executables := $(notdir $(basename $(tests_sources)))
tests: $(tests_executables)
%_test: $(srcdir)/$(dir-name)/%_test.c $(root-rel)test/birdtest.o
%_test.o: $(srcdir)/$(dir-name)/%_test.c
$(CC) $(CFLAGS) $(LDFLAGS) $^ -c -o $@
%_test: $(srcdir)/$(dir-name)/%_test.o $(root-rel)test/birdtest.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
ifdef source

View File

@ -39,4 +39,4 @@ echo " ------------------------------"
echo " Success: $num_succ_tests"
echo " Failure: $num_fail_tests"
echo " Build-Failure: $num_build_fail_tests"
echo " ------------------------------"
echo ""