summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-24 23:47:06 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-24 23:47:06 -0500
commit73e31d7ae73c257ef9892bc5d330c1d570ba5366 (patch)
treeea82745b36b2c90a9aae1fe8400a4658cb98d560 /test/Makefile.am
parent6cb86c3a330caedc323599cb11fbed4138958271 (diff)
Fix paths: test/udev-test.pl now works under sudo make distcheck
We move the test-udev.c and test-libudev.c from src/test to test. This corrects the a problem with hard coded relative paths finding the test/test/sys directory created by test/udev-test.pl. This commit draws heavily from nvinson patch in https://github.com/gentoo/eudev/pull/20 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am41
1 files changed, 40 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index ab3b68e4a6..954b93bcfb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,5 +1,44 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+AM_CPPFLAGS = \
+ -DVERSION=\"@VERSION@\" \
+ -I $(top_srcdir)/src/libudev \
+ -I $(top_srcdir)/src/udev
+
+noinst_PROGRAMS = \
+ test-libudev \
+ test-udev
+
+test_libudev_SOURCES = \
+ test-libudev.c
+
+test_libudev_LDADD = \
+ $(top_builddir)/src/libudev/libudev-private.la \
+ $(top_builddir)/src/udev/libudev-core.la
+
+test_libudev_CPPFLAGS = \
+ -I $(top_srcdir)/src/libudev \
+ $(AM_CPPFLAGS)
+
+test_udev_SOURCES = \
+ test-udev.c
+
+test_udev_LDADD = \
+ $(top_builddir)/src/libudev/libudev-private.la \
+ $(top_builddir)/src/udev/libudev-core.la \
+ $(BLKID_LIBS) \
+ $(SELINUX_LIBS)
+
+if HAVE_LIBKMOD
+test_udev_LDADD += $(KMOD_LIBS)
+endif
+
+test_udev_CPPFLAGS = \
+ -I $(top_srcdir)/src/udev \
+ $(AM_CPPFLAGS)
+
+
TESTS = \
udev-test.pl \
rules-test.sh
@@ -9,7 +48,7 @@ check_DATA = \
test/sys:
$(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)tar -C $(top_builddir)/test/ -xJf $(top_srcdir)/test/sys.tar.xz
+ $(AM_V_GEN)tar -C $(top_builddir)/test/test -xJf $(top_srcdir)/test/sys.tar.xz
test-sys-distclean:
-rm -rf $(top_builddir)/test/sys