On Fri, May 13, 2016 at 14:32:07 +0200, Michal Privoznik wrote:
The intent is that this library is going to be called every time
to check if we are not touching anything outside srcdir or
builddir.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
cfg.mk | 2 +-
tests/Makefile.am | 13 ++++-
tests/virtestmock.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 148 insertions(+), 2 deletions(-)
create mode 100644 tests/virtestmock.c
[...]
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 75efb90..da68f2e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,9 @@
# old automake does not provide abs_{src,build}dir variables
abs_builddir = $(shell pwd)
+abs_topbuilddir = $(shell cd .. && pwd)
abs_srcdir = $(shell cd $(srcdir) && pwd)
+abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
These are used in later patches.
SHELL = $(PREFERABLY_POSIX_SHELL)
@@ -33,7 +35,9 @@ INCLUDES = \
AM_CFLAGS = \
-Dabs_builddir="\"$(abs_builddir)\"" \
+ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \
-Dabs_srcdir="\"$(abs_srcdir)\"" \
+ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
$(LIBXML_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GNUTLS_CFLAGS) \
These too.
ACK if you move it to the corresponding patch.
Peter