aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
blob: 5d13e4af94cf7148349cfaef060a485501056b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Subject: [PATCH 18/36] make test dir configurable

Upstream-Status: Pending

test maybe be run on target in cross-compile environment, and test dir
is not the compilation dir, so make it configurable

Signed-off-by: Roy Li <rongqing.li@windriver.com>

---
 Makefile.am  | 2 +-
 configure.ac | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index a94636a..dbd3386 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -207,7 +207,7 @@ AM_CPPFLAGS = \
 	-DROOTLIBDIR=\"$(rootlibdir)\" \
 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
 	-DROOTHOMEDIR=\"$(roothomedir)\" \
-	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+	-DTEST_DIR=\"$(testdir)/test\" \
 	-I $(top_srcdir)/src \
 	-I $(top_builddir)/src/basic \
 	-I $(top_srcdir)/src/basic \
diff --git a/configure.ac b/configure.ac
index 45aae8a..c53fae2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1518,6 +1518,11 @@ AC_ARG_WITH([roothomedir],
         [],
         [with_roothomedir=/root])
 
+AC_ARG_WITH([testdir],
+        AS_HELP_STRING([--with-testdir=DIR], [test file directory]),
+        [],
+        [with_testdir=${abs_top_srcdir}])
+
 AC_ARG_WITH([pamlibdir],
         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
         [],
@@ -1603,6 +1608,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
 AC_SUBST([roothomedir], [$with_roothomedir])
+AC_SUBST([testdir], [$with_testdir])
 
 AC_CONFIG_FILES([
         Makefile
@@ -1695,6 +1701,7 @@ AC_MSG_RESULT([
         lib dir:                           ${libdir}
         rootlib dir:                       ${with_rootlibdir}
         root home dir:                     ${with_roothomedir}
+        test dir:                          ${with_testdir}
         SysV init scripts:                 ${SYSTEM_SYSVINIT_PATH}
         SysV rc?.d directories:            ${SYSTEM_SYSVRCND_PATH}
         Build Python:                      ${PYTHON}
-- 
2.8.3