blob: 86b2cb6dd7d3d636cc762fe88259f4de16aa8d86 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From ec08ab41495ac40641475707c46e844503ada5b3 Mon Sep 17 00:00:00 2001
2From: Jonas Witschel <diabonas@gmx.de>
3Date: Mon, 7 Jan 2019 22:15:06 +0100
4Subject: [PATCH] build: update for ax_code_coverage.m4 version 2019.01.06
5
6@CODE_COVERAGE_RULES@ doesn't exist any more and needs to be replaced.
7Also includes a compatibility switch for older versions of the file.
8
9Signed-off-by: Jonas Witschel <diabonas@gmx.de>
10---
11 .gitignore | 1 +
12 .travis.yml | 10 +++++-----
13 Makefile.am | 6 ++++++
14 configure.ac | 3 +++
15 4 files changed, 15 insertions(+), 5 deletions(-)
16
17diff --git a/.gitignore b/.gitignore
18index 7c6a7b62e6c1..aa1a7efdff71 100644
19--- a/.gitignore
20+++ b/.gitignore
21@@ -26,6 +26,7 @@
22 AUTHORS
23 tags
24 aclocal.m4
25+aminclude_static.am
26 autom4te.cache/
27 [Bb]uild/
28 [Dd]ebug/
29diff --git a/.travis.yml b/.travis.yml
30index 55f88e22999b..a668e2953dc2 100644
31--- a/.travis.yml
32+++ b/.travis.yml
33@@ -44,11 +44,11 @@ addons:
34
35 install:
36 # Autoconf archive
37- - wget https://download.01.org/tpm2/autoconf-archive-2017.09.28.tar.xz
38- - sha256sum autoconf-archive-2017.09.28.tar.xz | grep -q 5c9fb5845b38b28982a3ef12836f76b35f46799ef4a2e46b48e2bd3c6182fa01 || travis_terminate 1
39- - tar xJf autoconf-archive-2017.09.28.tar.xz
40- - cp autoconf-archive-2017.09.28/m4/ax_code_coverage.m4 m4/
41- - cp autoconf-archive-2017.09.28/m4/ax_prog_doxygen.m4 m4/
42+ - wget http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2019.01.06.tar.xz
43+ - sha256sum autoconf-archive-2019.01.06.tar.xz | grep -q 17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f || travis_terminate 1
44+ - tar xJf autoconf-archive-2019.01.06.tar.xz
45+ - cp autoconf-archive-2019.01.06/m4/ax_code_coverage.m4 m4/
46+ - cp autoconf-archive-2019.01.06/m4/ax_prog_doxygen.m4 m4/
47 # IBM-TPM
48 - wget https://download.01.org/tpm2/ibmtpm974.tar.gz
49 # OpenSSL 1.0.2
50diff --git a/Makefile.am b/Makefile.am
51index 1b792d89a392..8e62e9c77c7d 100644
52--- a/Makefile.am
53+++ b/Makefile.am
54@@ -19,7 +19,13 @@ noinst_PROGRAMS =
55
56 ### Add ax_* rules ###
57 # ax_code_coverage
58+if AUTOCONF_CODE_COVERAGE_2019_01_06
59+include $(top_srcdir)/aminclude_static.am
60+clean-local: code-coverage-clean
61+dist-clean-local: code-coverage-dist-clean
62+else
63 @CODE_COVERAGE_RULES@
64+endif
65
66 # ax_doxygen
67 @DX_RULES@
68diff --git a/configure.ac b/configure.ac
69index 6c7b0fd96399..22b79c50c015 100644
70--- a/configure.ac
71+++ b/configure.ac
72@@ -312,6 +312,9 @@ AS_IF([test "x$enable_doxygen_doc" != xno],
73 [ERROR_IF_NO_PROG([doxygen])])
74
75 AX_CODE_COVERAGE
76+m4_ifdef([_AX_CODE_COVERAGE_RULES],
77+ [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])],
78+ [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])])
79
80 AC_OUTPUT
81
82--
832.20.1
84