The EXTRA_FLAGS needs some clean before running tests. This commit allows to compile twice for this situation, but it is not perfect because EXTRA_CFLAGS can still cause some problems. The tests Makefile should be able to detect this and to group builds and tests with each own EXTRA flags.
29 lines
554 B
Makefile
29 lines
554 B
Makefile
tests:
|
|
set -e; \
|
|
for i in *-tests/Makefile; do \
|
|
echo '==== Making:' $$(dirname $$i); \
|
|
$(MAKE) -C $$(dirname $$i) -j; \
|
|
done
|
|
|
|
debugtest:
|
|
set -e; \
|
|
$(MAKE) clean; \
|
|
$(MAKE) -C debug-mode -j; \
|
|
debug-mode/debug-tests.out
|
|
|
|
runtests: debugtest
|
|
$(MAKE) clean
|
|
$(MAKE) tests
|
|
set -e; \
|
|
for i in *-tests/Makefile; do \
|
|
echo '==== Running:' $$(dirname $$i); \
|
|
$$(dirname $$i)/$$(dirname $$i).out; \
|
|
done
|
|
|
|
clean:
|
|
set -e; \
|
|
for i in *-tests/Makefile; do \
|
|
echo '==== Cleaning:' $$(dirname $$i); \
|
|
$(MAKE) -C $$(dirname $$i) clean; \
|
|
done
|