## 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)