Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 569cd3cf9806a02226d26c4104dbe44262f93d33 Mon Sep 17 00:00:00 2001 |
| 2 | From: Roy Li <rongqing.li@windriver.com> |
| 3 | Date: Fri, 22 Jan 2016 16:44:11 +0800 |
| 4 | Subject: [PATCH 18/36] make test dir configurable |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | test maybe be run on target in cross-compile environment, and test dir |
| 9 | is not the compilation dir, so make it configurable |
| 10 | |
| 11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 12 | --- |
| 13 | Makefile.am | 2 +- |
| 14 | configure.ac | 7 +++++++ |
| 15 | 2 files changed, 8 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/Makefile.am b/Makefile.am |
| 18 | index b5c6ba7..d3cd961 100644 |
| 19 | --- a/Makefile.am |
| 20 | +++ b/Makefile.am |
| 21 | @@ -203,7 +203,7 @@ AM_CPPFLAGS = \ |
| 22 | -DROOTLIBDIR=\"$(rootlibdir)\" \ |
| 23 | -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ |
| 24 | -DROOTHOMEDIR=\"$(roothomedir)\" \ |
| 25 | - -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ |
| 26 | + -DTEST_DIR=\"$(testdir)/test\" \ |
| 27 | -I $(top_srcdir)/src \ |
| 28 | -I $(top_builddir)/src/basic \ |
| 29 | -I $(top_srcdir)/src/basic \ |
| 30 | diff --git a/configure.ac b/configure.ac |
| 31 | index 36d20b5..d96dc5a 100644 |
| 32 | --- a/configure.ac |
| 33 | +++ b/configure.ac |
| 34 | @@ -1494,6 +1494,11 @@ AC_ARG_WITH([roothomedir], |
| 35 | [], |
| 36 | [with_roothomedir=/root]) |
| 37 | |
| 38 | +AC_ARG_WITH([testdir], |
| 39 | + AS_HELP_STRING([--with-testdir=DIR], [test file directory]), |
| 40 | + [], |
| 41 | + [with_testdir=${abs_top_srcdir}]) |
| 42 | + |
| 43 | AC_ARG_WITH([pamlibdir], |
| 44 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), |
| 45 | [], |
| 46 | @@ -1578,6 +1583,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir]) |
| 47 | AC_SUBST([rootprefix], [$with_rootprefix]) |
| 48 | AC_SUBST([rootlibdir], [$with_rootlibdir]) |
| 49 | AC_SUBST([roothomedir], [$with_roothomedir]) |
| 50 | +AC_SUBST([testdir], [$with_testdir]) |
| 51 | |
| 52 | AC_CONFIG_FILES([ |
| 53 | Makefile |
| 54 | @@ -1669,6 +1675,7 @@ AC_MSG_RESULT([ |
| 55 | lib dir: ${libdir} |
| 56 | rootlib dir: ${with_rootlibdir} |
| 57 | root home dir: ${with_roothomedir} |
| 58 | + test dir: ${with_testdir} |
| 59 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} |
| 60 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} |
| 61 | Build Python: ${PYTHON} |
| 62 | -- |
| 63 | 1.8.3.1 |
| 64 | |