summaryrefslogtreecommitdiffstats
path: root/package/libunwind/0001-add-disable-tests-option.patch
blob: 72a168615f31ddcd14f9b43280eb718d8842d373 (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
63
64
65
66
67
68
From 208a430bcbab7d63a4c04242f13c4740e0246a56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=9A=D0=BE=D1=80=D0=BE=D0=BB=D0=B5=D0=B2=20=D0=A1=D0=B5?=
 =?UTF-8?q?=D1=80=D0=B3=D0=B5=D0=B9?= <korolev.sergey@gmail.com>
Date: Wed, 11 May 2016 22:48:55 +0300
Subject: [PATCH] add --disable-tests option

Allows to skip tests build.

Backported from upstream master branch:
https://github.com/libunwind/libunwind/commit/208a430bcbab7d63a4c04242f13c4740e0246a56

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 Makefile.am  |  6 +++++-
 configure.ac | 13 +++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6a3ed9e..0c29b3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,11 @@ endif
 
 nodist_include_HEADERS = include/libunwind-common.h
 
-SUBDIRS = src tests
+SUBDIRS = src
+
+if CONFIG_TESTS
+SUBDIRS += tests
+endif
 
 if CONFIG_DOCS
 SUBDIRS += doc
diff --git a/configure.ac b/configure.ac
index 863fb8f..6c46cf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation,
 	AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),,
 	[enable_documentation=yes])
 
+AC_ARG_ENABLE(tests,
+ AS_HELP_STRING([--disable-tests],[Disable tests build]),,
+ [enable_tests=yes])
+
 AC_MSG_CHECKING([if we should build libunwind-setjmp])
 AC_MSG_RESULT([$enable_setjmp])
 
@@ -396,8 +400,13 @@ if test "x$enable_documentation" = "xyes"; then
   AC_CONFIG_FILES(doc/Makefile doc/common.tex)
 fi
 
-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
-		include/libunwind-common.h
+AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
+if test "x$enable_tests" = "xyes"; then
+  AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh)
+fi
+
+AC_CONFIG_FILES(Makefile src/Makefile
+                include/libunwind-common.h
                 include/libunwind.h include/tdep/libunwind_i.h)
 AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc
                 src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc
-- 
2.11.0

OpenPOWER on IntegriCloud