From: Mathieu Desnoyers Date: Tue, 6 Aug 2013 15:50:02 +0000 (-0400) Subject: Fix: allow make check to run in VPATH build X-Git-Tag: v2.3.0-rc2~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=38fa37816974b5ed05b54c79a2c5fd00c891c829;p=lttng-ust.git Fix: allow make check to run in VPATH build Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/Makefile.am b/tests/Makefile.am index d9a7a30c..30b0e9a0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,7 +4,23 @@ if CXX_WORKS SUBDIRS += hello.cxx endif -dist_noinst_SCRIPTS = test_loop run.sh unit_tests +SCRIPT_LIST = test_loop run.sh unit_tests + +dist_noinst_SCRIPTS = $(SCRIPT_LIST) + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi check-am: ./run.sh unit_tests diff --git a/tests/snprintf/Makefile.am b/tests/snprintf/Makefile.am index 2ceb9487..43021562 100644 --- a/tests/snprintf/Makefile.am +++ b/tests/snprintf/Makefile.am @@ -5,4 +5,20 @@ prog_SOURCES = prog.c prog_LDADD = $(top_builddir)/snprintf/libustsnprintf.la \ $(top_builddir)/tests/utils/libtap.a -dist_noinst_SCRIPTS = test_snprintf +SCRIPT_LIST = test_snprintf + +dist_noinst_SCRIPTS = $(SCRIPT_LIST) + +all-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + cp -f $(srcdir)/$$script $(builddir); \ + done; \ + fi + +clean-local: + @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ + for script in $(SCRIPT_LIST); do \ + rm -f $(builddir)/$$script; \ + done; \ + fi