1 | ## Borrowed from automake/subdir.am which borrowed automake-1.4 and adapted to RTEMS |
---|
2 | |
---|
3 | ## NOTE: This is a temporary work-around until automake is removed from RTEMS. |
---|
4 | ## It is a hack within many hacks and is designed to keep the source as clean |
---|
5 | ## as possible. |
---|
6 | |
---|
7 | all-local: |
---|
8 | @set fnord $(MAKEFLAGS); amf=$$2; \ |
---|
9 | dot_seen=no; \ |
---|
10 | target=`echo $@ | sed s/-recursive//`; \ |
---|
11 | if test "$$target" = "all-local-am"; then \ |
---|
12 | target="all-am"; \ |
---|
13 | fi; \ |
---|
14 | if test "$$target" = "all-local"; then \ |
---|
15 | target="all"; \ |
---|
16 | fi; \ |
---|
17 | tcheck="$(top_srcdir)/../../tools/build/rtems-test-check-py"; \ |
---|
18 | tdata="$(top_srcdir)/../../c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \ |
---|
19 | if test -f "$$tdata"; then \ |
---|
20 | vtdata="$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \ |
---|
21 | else \ |
---|
22 | vtdata="all tests"; \ |
---|
23 | fi; \ |
---|
24 | echo "BSP Testsuite Data: $$vtdata"; \ |
---|
25 | if test -f $$tcheck; then \ |
---|
26 | list=`$$tcheck exclude $$tdata $(top_srcdir)/.. $(RTEMS_BSP) $(_SUBDIRS)`; \ |
---|
27 | else \ |
---|
28 | list=$(_SUBDIRS); \ |
---|
29 | fi; \ |
---|
30 | for subdir in $$list; do \ |
---|
31 | echo "Making $$target in $$subdir"; \ |
---|
32 | if test "$$subdir" != "."; then \ |
---|
33 | if test -f $$tcheck; then \ |
---|
34 | test_FLAGS=`$$tcheck flags $$tdata $(top_srcdir)/.. $(RTEMS_BSP) $$subdir`; \ |
---|
35 | fi; \ |
---|
36 | local_target="$$target"; \ |
---|
37 | if test -z "$$test_FLAGS"; then \ |
---|
38 | echo "BSP Testsuite Flags: $$subdir: PASS"; \ |
---|
39 | else \ |
---|
40 | echo "BSP Testsuite Flags: $$subdir: $$test_FLAGS"; \ |
---|
41 | fi; \ |
---|
42 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) TEST_FLAGS="$$test_FLAGS" $$local_target) \ |
---|
43 | || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ |
---|
44 | fi; \ |
---|
45 | done; test -z "$$fail" |
---|