aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 1a6bb22..1db7654 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,12 +1,8 @@
SUBDIRS = $(patsubst %/Makefile,%,$(wildcard */Makefile))
-
-.PHONY: all test check clean
-all test check clean:
- $(MAKE) $(patsubst %,subdir_%_$@,$(SUBDIRS))
-
-# subdir_source_all
-_SUBTAR = $(patsubst subdir_%,%,$@)
-_SUBDIR = $(shell expr $(_SUBTAR) : '\(.*\)_[^_]*$$')
-_TARGET = $(shell expr $(_SUBTAR) : '.*_\([^_]*\)$$')
-subdir_%:
- $(MAKE) -C $(_SUBDIR) $(_TARGET)
+# 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)