mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
tests: Set abs_*dir in a consistent way
Use $(shell cd $(...) && pwd) to set abs_*dir variables similarly to what src/Makefile.am does. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
43b17dd444
commit
11cb128f21
@ -16,6 +16,10 @@
|
|||||||
## License along with this library. If not, see
|
## License along with this library. If not, see
|
||||||
## <http://www.gnu.org/licenses/>.
|
## <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# old automake does not provide abs_{src,build}dir variables
|
||||||
|
abs_builddir = $(shell pwd)
|
||||||
|
abs_srcdir = $(shell cd $(srcdir) && pwd)
|
||||||
|
|
||||||
SHELL = $(PREFERABLY_POSIX_SHELL)
|
SHELL = $(PREFERABLY_POSIX_SHELL)
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
@ -28,8 +32,8 @@ INCLUDES = \
|
|||||||
$(GETTEXT_CPPFLAGS)
|
$(GETTEXT_CPPFLAGS)
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-Dabs_builddir="\"`pwd`\"" \
|
-Dabs_builddir="\"$(abs_builddir)\"" \
|
||||||
-Dabs_srcdir="\"`cd '$(srcdir)'; pwd`\"" \
|
-Dabs_srcdir="\"$(abs_srcdir)\"" \
|
||||||
$(LIBXML_CFLAGS) \
|
$(LIBXML_CFLAGS) \
|
||||||
$(GNUTLS_CFLAGS) \
|
$(GNUTLS_CFLAGS) \
|
||||||
$(SASL_CFLAGS) \
|
$(SASL_CFLAGS) \
|
||||||
@ -374,7 +378,7 @@ TESTS = $(test_programs) \
|
|||||||
# Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
|
# Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an
|
||||||
# intermediate shell variable, but must do all the expansion in make
|
# intermediate shell variable, but must do all the expansion in make
|
||||||
|
|
||||||
lv_abs_top_builddir=`cd '$(top_builddir)'; pwd`
|
lv_abs_top_builddir=$(shell cd '$(top_builddir)' && pwd)
|
||||||
path_add = $(subst :,$(PATH_SEPARATOR),\
|
path_add = $(subst :,$(PATH_SEPARATOR),\
|
||||||
$(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
|
$(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
|
||||||
|
|
||||||
@ -382,9 +386,9 @@ VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT)
|
|||||||
TESTS_ENVIRONMENT = \
|
TESTS_ENVIRONMENT = \
|
||||||
abs_top_builddir=$(lv_abs_top_builddir) \
|
abs_top_builddir=$(lv_abs_top_builddir) \
|
||||||
abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \
|
abs_top_srcdir=`cd '$(top_srcdir)'; pwd` \
|
||||||
abs_builddir=`pwd` \
|
abs_builddir=$(abs_builddir) \
|
||||||
abs_srcdir=`cd '$(srcdir)'; pwd` \
|
abs_srcdir=$(abs_srcdir) \
|
||||||
CONFIG_HEADER="`cd '$(top_builddir)'; pwd`/config.h" \
|
CONFIG_HEADER="$(lv_abs_top_builddir)/config.h" \
|
||||||
PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \
|
PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \
|
||||||
SHELL="$(SHELL)" \
|
SHELL="$(SHELL)" \
|
||||||
LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \
|
LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user