aboutsummaryrefslogtreecommitdiff
blob: f4b81e8875a321b760ecf1a15d3844c2d9d0cc42 (plain)
1
2
3
4
5
6
7
8
9
10
SUBDIRS = $(patsubst %/Makefile,%,$(wildcard */Makefile))
abs_top_srcdir = $(realpath $(PWD)/..)
abs_top_builddir = $(realpath $(PWD)/..)
# DO NOT STARE AT THE SUN
all:
%:; $(MAKE) `printf '%s_$@_ ' $(SUBDIRS)`
_words = $(subst _, ,$1)
_dir = $(firstword $(call _words,$@))
_targ = $(lastword $(call _words,$@))
%_:; $(MAKE) -C $(_dir) $(_targ) srcdir=$(abs_top_srcdir)/tests/$(_dir) builddir=$(abs_top_builddir)/tests/$(_dir)