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:
parent
1ce8d33b80
commit
81b2e266fb
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -39,4 +39,4 @@ echo " ------------------------------"
|
||||
echo " Success: $num_succ_tests"
|
||||
echo " Failure: $num_fail_tests"
|
||||
echo " Build-Failure: $num_build_fail_tests"
|
||||
echo " ------------------------------"
|
||||
echo ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user