diff options
| author | Patrick Venture <venture@google.com> | 2019-03-19 09:10:41 -0700 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2019-03-19 09:10:41 -0700 |
| commit | 90e9dbcae6c1df3127dd3de41f9d1e1b5a438828 (patch) | |
| tree | 2fe0724b4e77425a1bac43e32616675f2dc94ce3 | |
| parent | e6e6f62680cf77c0a742ca806609d10103273b07 (diff) | |
| download | phosphor-pid-control-90e9dbcae6c1df3127dd3de41f9d1e1b5a438828.tar.gz phosphor-pid-control-90e9dbcae6c1df3127dd3de41f9d1e1b5a438828.zip | |
autotools: Fix for autoconf-archive 2019.01.19
The code coverage macros from the archive changed in a backward
incompatible way. This adds a workaround to autodetect either version
and do the right thing.
Change-Id: I63d1cdf6edb125d75872d6dae38f8602fc043431
Signed-off-by: Patrick Venture <venture@google.com>
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile.am | 8 | ||||
| -rw-r--r-- | configure.ac | 7 | ||||
| -rw-r--r-- | test/Makefile.am | 2 |
4 files changed, 14 insertions, 4 deletions
@@ -20,6 +20,7 @@ aclocal.m4 ar-lib arm-openbmc-linux-gnueabi-libtool autom4te.cache/ +/aminclude_static.am compile config.guess config.h diff --git a/Makefile.am b/Makefile.am index 467db44..9583fac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,14 @@ CODE_COVERAGE_GENHTML_OPTIONS += --config-file $(abs_srcdir)/.lcovrc CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir) export CODE_COVERAGE_GENHTML_OPTIONS +if AUTOCONF_CODE_COVERAGE_2019_01_06 +include $(top_srcdir)/aminclude_static.am +clean-local: code-coverage-clean +distclean-local: code-coverage-dist-clean +else +@CODE_COVERAGE_RULES@ +endif + AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) diff --git a/configure.ac b/configure.ac index d766ba8..df031b0 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.69]) AC_INIT([swampd], [0.1], [https://github.com/openbmc/phosphor-pid-control/issues]) AC_LANG([C++]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) +AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-portability -Werror foreign dist-xz]) AM_SILENT_RULES([yes]) # Make sure the default CFLAGS of `-O2 -g` don't override CODE_COVERAGE_CFLAGS @@ -132,10 +132,13 @@ AS_IF([test "x$enable_tests" != "xno"], [ # Code coverage AX_CODE_COVERAGE -AM_EXTRA_RECURSIVE_TARGETS([check-code-coverage]) AS_IF([test "x$CODE_COVERAGE_ENABLED" = "xyes"], [ AX_APPEND_COMPILE_FLAGS([-DHAVE_GCOV], [CODE_COVERAGE_CPPFLAGS]) ]) +m4_ifdef([_AX_CODE_COVERAGE_RULES], + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])], + [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])]) +AX_ADD_AM_MACRO_STATIC([]) AC_ARG_ENABLE([oe-sdk], AS_HELP_STRING( diff --git a/test/Makefile.am b/test/Makefile.am index 3dfae00..fbc78bf 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,5 +1,3 @@ -@CODE_COVERAGE_RULES@ - AM_CPPFLAGS = \ -I$(top_srcdir)/ \ $(GTEST_CFLAGS) \ |

