aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-04-07 19:53:11 +0000
committerMike Frysinger <vapier@gentoo.org>2013-04-07 19:53:11 +0000
commit8f7405f9090d655aec9aef0142171379e048f37a (patch)
tree58c5476174b309ce8464478fad4ae5daa8de2076 /tests
parentignore testing test python files (diff)
downloadpax-utils-8f7405f9090d655aec9aef0142171379e048f37a.tar.gz
pax-utils-8f7405f9090d655aec9aef0142171379e048f37a.tar.bz2
pax-utils-8f7405f9090d655aec9aef0142171379e048f37a.zip
tests: more flexible parallel build logic
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)