Commit 2938c212 authored by Simon McVittie's avatar Simon McVittie

Adapt to API change in AX_CODE_COVERAGE version 28

AX_CODE_COVERAGE recently changed the way it embedded its Makefile rules
in the output file: instead of using @CODE_COVERAGE_RULES@, users
are now meant to include aminclude_static.am.

The new AX_CODE_COVERAGE is only in the latest autoconf-archive release,
version 2019.01.06, which is inconveniently new, so bundle everything
we need for the moment.

This requires us to stop using the deprecated CODE_COVERAGE_LDFLAGS
(which we still used to support older versions of autoconf-archive)
and replace them with CODE_COVERAGE_LIBS.
Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 8747c9b5
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/.ccache/ /.ccache/
/Doxyfile /Doxyfile
/aclocal.m4 /aclocal.m4
/aminclude_static.am
/autom4te.cache /autom4te.cache
/build-aux/ /build-aux/
/bus/tmpfiles.d/dbus.conf /bus/tmpfiles.d/dbus.conf
...@@ -12,11 +13,11 @@ ...@@ -12,11 +13,11 @@
/config.log /config.log
/config.status /config.status
/configure /configure
/dbus-1.*-coverage.info
/dbus-1.*-coverage.info.tmp
/dbus-1.*-coverage/
/dbus-1.*.tar.* /dbus-1.*.tar.*
/dbus-1.*/ /dbus-1.*/
/lcov.html/
/lcov.info
/lcov.info.tmp
/libtool /libtool
/m4/libtool.m4 /m4/libtool.m4
/m4/lt*.m4 /m4/lt*.m4
......
...@@ -49,4 +49,4 @@ DISTCHECK_CONFIGURE_FLAGS = \ ...@@ -49,4 +49,4 @@ DISTCHECK_CONFIGURE_FLAGS = \
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@ include $(top_srcdir)/aminclude_static.am
...@@ -6,7 +6,7 @@ systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d ...@@ -6,7 +6,7 @@ systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
systemdsysusersdir = $(prefix)/lib/sysusers.d systemdsysusersdir = $(prefix)/lib/sysusers.d
DBUS_BUS_LIBS = \ DBUS_BUS_LIBS = \
$(CODE_COVERAGE_LDFLAGS) \ $(CODE_COVERAGE_LIBS) \
$(EXPAT_LIBS) \ $(EXPAT_LIBS) \
$(SELINUX_LIBS) \ $(SELINUX_LIBS) \
$(APPARMOR_LIBS) \ $(APPARMOR_LIBS) \
...@@ -16,7 +16,7 @@ DBUS_BUS_LIBS = \ ...@@ -16,7 +16,7 @@ DBUS_BUS_LIBS = \
$(NULL) $(NULL)
DBUS_LAUNCHER_LIBS = \ DBUS_LAUNCHER_LIBS = \
$(CODE_COVERAGE_LDFLAGS) \ $(CODE_COVERAGE_LIBS) \
$(EXPAT_LIBS) \ $(EXPAT_LIBS) \
$(THREAD_LIBS) \ $(THREAD_LIBS) \
$(NETWORK_libs) \ $(NETWORK_libs) \
...@@ -239,4 +239,4 @@ systemduserunit_DATA = \ ...@@ -239,4 +239,4 @@ systemduserunit_DATA = \
endif endif
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@ include $(top_srcdir)/aminclude_static.am
...@@ -309,7 +309,7 @@ endif ...@@ -309,7 +309,7 @@ endif
noinst_PROGRAMS = noinst_PROGRAMS =
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@ include $(top_srcdir)/aminclude_static.am
clean-local: clean-local:
$(AM_V_at)rm -fr ./.dbus-keyrings $(AM_V_at)rm -fr ./.dbus-keyrings
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_ac_append_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AC_APPEND_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Appends the specified data to the specified Autoconf is run. If you want
# to append to a file when configure is run use AX_APPEND_TO_FILE instead.
#
# LICENSE
#
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AC_DEFUN([AX_AC_APPEND_TO_FILE],[
AC_REQUIRE([AX_FILE_ESCAPES])
m4_esyscmd(
AX_FILE_ESCAPES
[
printf "%s" "$2" >> "$1"
])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_ac_print_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AC_PRINT_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Writes the specified data to the specified file when Autoconf is run. If
# you want to print to a file when configure is run use AX_PRINT_TO_FILE
# instead.
#
# LICENSE
#
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AC_DEFUN([AX_AC_PRINT_TO_FILE],[
m4_esyscmd(
AC_REQUIRE([AX_FILE_ESCAPES])
[
printf "%s" "$2" > "$1"
])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_add_am_macro_static.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_ADD_AM_MACRO_STATIC([RULE])
#
# DESCRIPTION
#
# Adds the specified rule to $AMINCLUDE.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_ADD_AM_MACRO_STATIC],[
AC_REQUIRE([AX_AM_MACROS_STATIC])
AX_AC_APPEND_TO_FILE(AMINCLUDE_STATIC,[$1])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_am_macros_static.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AM_MACROS_STATIC
#
# DESCRIPTION
#
# Adds support for macros that create Automake rules. You must manually
# add the following line
#
# include $(top_srcdir)/aminclude_static.am
#
# to your Makefile.am files.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 11
AC_DEFUN([AMINCLUDE_STATIC],[aminclude_static.am])
AC_DEFUN([AX_AM_MACROS_STATIC],
[
AX_AC_PRINT_TO_FILE(AMINCLUDE_STATIC,[
# ]AMINCLUDE_STATIC[ generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on ]m4_esyscmd([LC_ALL=C date])[
])
])
This diff is collapsed.
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_file_escapes.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_FILE_ESCAPES
#
# DESCRIPTION
#
# Writes the specified data to the specified file.
#
# LICENSE
#
# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_FILE_ESCAPES],[
AX_DOLLAR="\$"
AX_SRB="\\135"
AX_SLB="\\133"
AX_BS="\\\\"
AX_DQ="\""
])
...@@ -43,9 +43,9 @@ libdbus_testutils_la_SOURCES += \ ...@@ -43,9 +43,9 @@ libdbus_testutils_la_SOURCES += \
endif endif
libdbus_testutils_la_LIBADD = \ libdbus_testutils_la_LIBADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \ $(top_builddir)/dbus/libdbus-1.la \
$(top_builddir)/dbus/libdbus-internal.la \ $(top_builddir)/dbus/libdbus-internal.la \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL) $(NULL)
TEST_EXTENSIONS = .sh TEST_EXTENSIONS = .sh
...@@ -142,6 +142,8 @@ test_segfault_SOURCES = \ ...@@ -142,6 +142,8 @@ test_segfault_SOURCES = \
disable-crash-handling.h \ disable-crash-handling.h \
test-segfault.c \ test-segfault.c \
$(NULL) $(NULL)
# Deliberately not adding CODE_COVERAGE_LIBS here because we really
# don't care about coverage for the test program that segfaults!
test_server_oom_SOURCES = internals/server-oom.c test_server_oom_SOURCES = internals/server-oom.c
test_server_oom_LDADD = libdbus-testutils.la $(GLIB_LIBS) test_server_oom_LDADD = libdbus-testutils.la $(GLIB_LIBS)
...@@ -813,4 +815,4 @@ $(installable_test_meta_with_config): %_with_config.test: %$(EXEEXT) Makefile ...@@ -813,4 +815,4 @@ $(installable_test_meta_with_config): %_with_config.test: %$(EXEEXT) Makefile
) > $@.tmp && mv $@.tmp $@ ) > $@.tmp && mv $@.tmp $@
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@ include $(top_srcdir)/aminclude_static.am
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment