diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-16 20:00:44 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-16 20:00:44 -0500 |
commit | 706679c2071261848f964bb7b987de1bac466f46 (patch) | |
tree | 595420717fa1aff3384c4dd79295256f63f5ad65 /tests/Makefile | |
parent | build: defer man page expansion (diff) | |
download | pax-utils-706679c2071261848f964bb7b987de1bac466f46.tar.gz pax-utils-706679c2071261848f964bb7b987de1bac466f46.tar.bz2 pax-utils-706679c2071261848f964bb7b987de1bac466f46.zip |
tests: add out-of-tree build support
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile index 1db7654..f4b81e8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,8 +1,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) +%_:; $(MAKE) -C $(_dir) $(_targ) srcdir=$(abs_top_srcdir)/tests/$(_dir) builddir=$(abs_top_builddir)/tests/$(_dir) |