summaryrefslogtreecommitdiffstats
path: root/testsuites/automake/subdirs.am
blob: e0ddab46f0b4bc084eeecde36230ba7b98822fc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Borrowed from automake/subdir.am which borrowed automake-1.4 and adapted to RTEMS

## NOTE: This is a temporary work-around until automake is removed from RTEMS.
##   It is a hack within many hacks and is designed to keep the source as clean
##   as possible.

define TESTDIR
.PHONY: $1
$1:
	@+set fnord $(MAKEFLAGS); \
	if test "$(1)" != "."; then \
	  target=`echo $(MAKECMDGOALS) | sed s/-recursive//`; \
	  if test "$$$$target" = "all-local-am"; then \
	    target="all-am"; \
	  fi; \
	  if test "$$$$target" = "all-local"; then \
	    target="all"; \
	  fi; \
	  echo "Making $$$$target in $(1)"; \
	  cd $(1); \
	  $(MAKE) $(AM_MAKEFLAGS) TEST_FLAGS="$$$$test_FLAGS" $$$$target; \
	fi;
endef

$(foreach T,$(_SUBDIRS),$(eval $(call TESTDIR,$(strip $(T)))))

all-local:  $(_SUBDIRS)