TST_CONFIG_MODULE := $(d)/test_config
...
check_config : export TST_DIR:= \
$(dir $(TST_CONFIG_MODULE) )
check_config : $(TST_CONFIG_MODULE)
$(TST_CONFIG_MODULE)
This is how it is documented in the GNU make manual and how it works under Cygwin. However, this fails on Solaris. The version of make installed on Solaris is only a couple of point releases different than the one on Cygwin so I wouldn't expect this to be an new feature. The immediate solution that I came up with is the same one that I used for the main check target.
check_config : $(TST_CONFIG_MODULE)
@for m in $(TST_CONFIG_MODULE) ; do \
export TST_DIR=`dirname $$m`; \
$$m;
done