diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 81f3550..1793863 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -16,70 +16,6 @@ on: - main jobs: - check: - name: Build with Autotools and gcc, and test - runs-on: ubuntu-22.04 - steps: - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - autoconf \ - autoconf-archive \ - automake \ - autopoint \ - clang \ - dbus \ - docbook-xml \ - docbook-xsl \ - libglib2.0-dev \ - libtool \ - xsltproc \ - ${NULL+} - - name: Check out xdg-dbus-proxy - uses: actions/checkout@v1 - with: - submodules: true - - name: Create logs dir - run: mkdir test-logs - - name: autoreconf - run: autoreconf -fi - - name: configure - run: | - mkdir _build - ( cd _build && ../configure --enable-man ) - env: - CFLAGS: >- - -O2 - -Wp,-D_FORTIFY_SOURCE=2 - -fsanitize=address - -fsanitize=undefined - - name: Build xdg-dbus-proxy - run: make -C _build -j $(getconf _NPROCESSORS_ONLN) V=1 - - name: Run tests - run: make -C _build -j $(getconf _NPROCESSORS_ONLN) check VERBOSE=1 - - name: Run tests - run: make -C _build -j $(getconf _NPROCESSORS_ONLN) check VERBOSE=1 - - name: Collect overall test logs on failure - if: failure() - run: mv _build/test-suite.log test-logs/ || true - - name: Collect individual test logs on cancel - if: failure() || cancelled() - run: mv _build/tests/*.log test-logs/ || true - - name: Upload test logs - uses: actions/upload-artifact@v1 - if: failure() || cancelled() - with: - name: test logs - path: test-logs - - name: install - run: | - make -C _build install DESTDIR="$(pwd)/DESTDIR" - ( cd DESTDIR && find -ls ) - - name: distcheck - run: | - make -C _build -j $(getconf _NPROCESSORS_ONLN) distcheck VERBOSE=1 - meson: name: Build with Meson and gcc, and test runs-on: ubuntu-20.04 @@ -103,7 +39,7 @@ jobs: run: mkdir test-logs - name: configure run: | - meson _build -Db_sanitize=address,undefined + meson _build - name: Build xdg-dbus-proxy run: ninja -C _build -v - name: Run tests @@ -167,45 +103,38 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - autoconf \ - autoconf-archive \ - automake \ - autopoint \ clang \ dbus \ docbook-xml \ docbook-xsl \ libglib2.0-dev \ libtool \ + meson \ xsltproc \ ${NULL+} - name: Check out xdg-dbus-proxy uses: actions/checkout@v1 with: submodules: true - - name: autoreconf - run: autoreconf -fi + - name: Create logs dir + run: mkdir test-logs - name: configure - run: ./configure + run: | + meson _build -Db_sanitize=address,undefined env: CC: clang - CFLAGS: >- - -O2 - -Wp,-D_FORTIFY_SOURCE=2 - -fsanitize=address - -fsanitize=undefined - name: Build xdg-dbus-proxy - run: make -j $(getconf _NPROCESSORS_ONLN) V=1 + run: ninja -C _build -v - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 - name: Run tests - run: make -j $(getconf _NPROCESSORS_ONLN) check VERBOSE=1 + run: meson test -C _build -v - name: Collect overall test logs on failure if: failure() - run: mv test-suite.log test-logs/ || true + run: mv _build/meson-logs/testlog.txt test-logs/ || true - name: Collect individual test logs on cancel if: failure() || cancelled() - run: mv tests/*.log test-logs/ || true + run: mv _build/meson-logs/testlog.txt test-logs/ || true - name: Upload test logs uses: actions/upload-artifact@v1 if: failure() || cancelled() @@ -215,23 +144,20 @@ jobs: valgrind: name: Run tests in valgrind - needs: check # Don't run expensive test if main check fails + needs: meson # Don't run expensive test if main check fails runs-on: ubuntu-20.04 # Might as well test with a different one too steps: - name: Install Dependencies run: | sudo apt-get update sudo apt-get install -y \ - autoconf \ - autoconf-archive \ - automake \ - autopoint \ clang \ dbus \ docbook-xml \ docbook-xsl \ libglib2.0-dev \ libtool \ + meson \ valgrind \ xsltproc \ ${NULL+} @@ -241,26 +167,23 @@ jobs: submodules: true - name: Create logs dir run: mkdir test-logs - - name: autoreconf - run: autoreconf -fi - name: configure run: | - mkdir _build - ( cd _build && ../configure ) + meson _build -Db_sanitize=address,undefined env: CFLAGS: >- -O2 -Wp,-D_FORTIFY_SOURCE=2 - name: Build xdg-dbus-proxy - run: make -C _build -j $(getconf _NPROCESSORS_ONLN) V=1 + run: ninja -C _build -v - name: Run tests - run: make -C _build -j $(getconf _NPROCESSORS_ONLN) check VERBOSE=1 + run: meson test -C _build -v - name: Collect overall test logs on failure if: failure() - run: mv _build/test-suite.log test-logs/ || true + run: mv _build/meson-logs/testlog.txt test-logs/ || true - name: Collect individual test logs on cancel if: failure() || cancelled() - run: mv _build/tests/*.log test-logs/ || true + run: mv _build/meson-logs/testlog.txt test-logs/ || true - name: Upload test logs uses: actions/upload-artifact@v1 if: failure() || cancelled() diff --git a/Makefile-docs.am b/Makefile-docs.am deleted file mode 100644 index f66665c..0000000 --- a/Makefile-docs.am +++ /dev/null @@ -1,18 +0,0 @@ -XSLTPROC = xsltproc - -XSLTPROC_FLAGS = \ - --nonet \ - --stringparam man.output.quietly 1 \ - --stringparam funcsynopsis.style ansi \ - --stringparam man.th.extra1.suppress 1 \ - --stringparam man.authors.section.enabled 0 \ - --stringparam man.copyright.section.enabled 0 - -.xml.1: - $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -if ENABLE_MAN -man_MANS = xdg-dbus-proxy.1 -CLEANFILES += $(man_MANS) -endif -EXTRA_DIST += xdg-dbus-proxy.xml diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 07295e2..0000000 --- a/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -include $(top_srcdir)/build-aux/glib-tap.mk - -AM_CPPFLAGS = \ - $(CODE_COVERAGE_CPPFLAGS) \ - $(NULL) -AM_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(CODE_COVERAGE_CFLAGS) \ - $(NULL) -COMMON_LIBS = \ - $(CODE_COVERAGE_LIBS) \ - $(GLIB_LIBS) \ - $(NULL) - -bin_PROGRAMS=xdg-dbus-proxy - -xdg_dbus_proxy_SOURCES = \ - flatpak-proxy.c \ - flatpak-proxy.h \ - dbus-proxy.c \ - backport-autoptr.h \ - $(NULL) -xdg_dbus_proxy_LDADD = $(COMMON_LIBS) - -include Makefile-docs.am -include tests/Makefile.am.inc - -EXTRA_DIST += build-aux/glib-tap.mk -EXTRA_DIST += build-aux/tap-test -EXTRA_DIST += meson.build -EXTRA_DIST += meson_options.txt - -# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE -include $(top_srcdir)/aminclude_static.am diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 5e9924a..0000000 --- a/autogen.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. - -olddir=`pwd` -cd "$srcdir" - -AUTORECONF=`which autoreconf` -if test -z $AUTORECONF; then - echo "*** No autoreconf found, please install it ***" - exit 1 -fi - -# INSTALL are required by automake, but may be deleted by clean -# up rules. to get automake to work, simply touch these here, they will be -# regenerated from their corresponding *.in files by ./configure anyway. -touch INSTALL - -mkdir -p build-aux -mkdir -p m4 - -autoreconf --force --install --verbose || exit $? - -cd "$olddir" -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/configure.ac b/configure.ac deleted file mode 100644 index fdd8c86..0000000 --- a/configure.ac +++ /dev/null @@ -1,63 +0,0 @@ -AC_PREREQ([2.63]) - -AC_INIT([xdg-dbus-proxy],[0.1.6]) -AC_CONFIG_AUX_DIR([build-aux]) - -m4_pattern_forbid([^AX_CODE_COVERAGE$], - [Unexpanded AX_CODE_COVERAGE macro found. Please install GNU autoconf-archive]) - -AC_USE_SYSTEM_EXTENSIONS -AC_SYS_LARGEFILE - -AC_PROG_CC -AM_PROG_CC_C_O - -AC_CONFIG_SRCDIR([dbus-proxy.c]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar foreign subdir-objects]) - -# Enable silent rules is available -AM_SILENT_RULES([yes]) -AM_MAINTAINER_MODE([enable]) - -if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *[[\ \ ]]-Wall[[\ \ ]]*) ;; - *) CFLAGS="$CFLAGS -Wall" ;; - esac -fi - -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.40 gio-2.0 gio-unix-2.0]) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -AC_PROG_AWK -AC_REQUIRE_AUX_FILE([tap-driver.sh]) -GLIB_TESTS - -# Test for code-coverage tools if --enable-code-coverage -AX_CODE_COVERAGE - -AC_ARG_ENABLE(man, - [AS_HELP_STRING([--enable-man], - [generate man pages [default=auto]])],, - enable_man=maybe) - -AS_IF([test "$enable_man" != no], [ - AC_PATH_PROG([XSLTPROC], [xsltproc], []) - AS_IF([test -z "$XSLTPROC"], [ - AS_IF([test "$enable_man" = yes], [ - AC_MSG_ERROR([xsltproc is required for --enable-man]) - ]) - enable_man=no - ], [ - enable_man=yes - ]) -]) -AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no) - -AC_CONFIG_FILES([ -Makefile -]) -AC_OUTPUT diff --git a/m4/ax_ac_append_to_file.m4 b/m4/ax_ac_append_to_file.m4 deleted file mode 100644 index 242b3d5..0000000 --- a/m4/ax_ac_append_to_file.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# =========================================================================== -# 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 -# -# 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" -]) -]) diff --git a/m4/ax_ac_print_to_file.m4 b/m4/ax_ac_print_to_file.m4 deleted file mode 100644 index 642dfc1..0000000 --- a/m4/ax_ac_print_to_file.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# =========================================================================== -# 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 -# -# 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" -]) -]) diff --git a/m4/ax_add_am_macro_static.m4 b/m4/ax_add_am_macro_static.m4 deleted file mode 100644 index 6442d24..0000000 --- a/m4/ax_add_am_macro_static.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# =========================================================================== -# 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 -# Copyright (c) 2009 Allan Caffee -# -# 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]) -]) diff --git a/m4/ax_am_macros_static.m4 b/m4/ax_am_macros_static.m4 deleted file mode 100644 index f4cee8c..0000000 --- a/m4/ax_am_macros_static.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# =========================================================================== -# 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 -# Copyright (c) 2009 Allan Caffee -# -# 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])[ -]) -]) diff --git a/m4/ax_check_gnu_make.m4 b/m4/ax_check_gnu_make.m4 deleted file mode 100644 index 785dc96..0000000 --- a/m4/ax_check_gnu_make.m4 +++ /dev/null @@ -1,95 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false]) -# -# DESCRIPTION -# -# This macro searches for a GNU version of make. If a match is found: -# -# * The makefile variable `ifGNUmake' is set to the empty string, otherwise -# it is set to "#". This is useful for including a special features in a -# Makefile, which cannot be handled by other versions of make. -# * The makefile variable `ifnGNUmake' is set to #, otherwise -# it is set to the empty string. This is useful for including a special -# features in a Makefile, which can be handled -# by other versions of make or to specify else like clause. -# * The variable `_cv_gnu_make_command` is set to the command to invoke -# GNU make if it exists, the empty string otherwise. -# * The variable `ax_cv_gnu_make_command` is set to the command to invoke -# GNU make by copying `_cv_gnu_make_command`, otherwise it is unset. -# * If GNU Make is found, its version is extracted from the output of -# `make --version` as the last field of a record of space-separated -# columns and saved into the variable `ax_check_gnu_make_version`. -# * Additionally if GNU Make is found, run shell code run-if-true -# else run shell code run-if-false. -# -# Here is an example of its use: -# -# Makefile.in might contain: -# -# # A failsafe way of putting a dependency rule into a makefile -# $(DEPEND): -# $(CC) -MM $(srcdir)/*.c > $(DEPEND) -# -# @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND))) -# @ifGNUmake@ include $(DEPEND) -# @ifGNUmake@ else -# fallback code -# @ifGNUmake@ endif -# -# Then configure.in would normally contain: -# -# AX_CHECK_GNU_MAKE() -# AC_OUTPUT(Makefile) -# -# Then perhaps to cause gnu make to override any other make, we could do -# something like this (note that GNU make always looks for GNUmakefile -# first): -# -# if ! test x$_cv_gnu_make_command = x ; then -# mv Makefile GNUmakefile -# echo .DEFAULT: > Makefile ; -# echo \ $_cv_gnu_make_command \$@ >> Makefile; -# fi -# -# Then, if any (well almost any) other make is called, and GNU make also -# exists, then the other make wraps the GNU make. -# -# LICENSE -# -# Copyright (c) 2008 John Darrington -# Copyright (c) 2015 Enrico M. Crisostomo -# -# 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 12 - -AC_DEFUN([AX_CHECK_GNU_MAKE],dnl - [AC_PROG_AWK - AC_CACHE_CHECK([for GNU make],[_cv_gnu_make_command],[dnl - _cv_gnu_make_command="" ; -dnl Search all the common names for GNU make - for a in "$MAKE" make gmake gnumake ; do - if test -z "$a" ; then continue ; fi ; - if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then - _cv_gnu_make_command=$a ; - AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make") - ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }') - break ; - fi - done ;]) -dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise - AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])]) - AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifnGNUmake], ["#"])]) - AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])]) - AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1]) - AC_SUBST([ifGNUmake]) - AC_SUBST([ifnGNUmake]) -]) diff --git a/m4/ax_code_coverage.m4 b/m4/ax_code_coverage.m4 deleted file mode 100644 index 352165b..0000000 --- a/m4/ax_code_coverage.m4 +++ /dev/null @@ -1,272 +0,0 @@ -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_CODE_COVERAGE() -# -# DESCRIPTION -# -# Defines CODE_COVERAGE_CPPFLAGS, CODE_COVERAGE_CFLAGS, -# CODE_COVERAGE_CXXFLAGS and CODE_COVERAGE_LIBS which should be included -# in the CPPFLAGS, CFLAGS CXXFLAGS and LIBS/LIBADD variables of every -# build target (program or library) which should be built with code -# coverage support. Also add rules using AX_ADD_AM_MACRO_STATIC; and -# $enable_code_coverage which can be used in subsequent configure output. -# CODE_COVERAGE_ENABLED is defined and substituted, and corresponds to the -# value of the --enable-code-coverage option, which defaults to being -# disabled. -# -# Test also for gcov program and create GCOV variable that could be -# substituted. -# -# Note that all optimization flags in CFLAGS must be disabled when code -# coverage is enabled. -# -# Usage example: -# -# configure.ac: -# -# AX_CODE_COVERAGE -# -# Makefile.am: -# -# include $(top_srcdir)/aminclude_static.am -# -# my_program_LIBS = ... $(CODE_COVERAGE_LIBS) ... -# my_program_CPPFLAGS = ... $(CODE_COVERAGE_CPPFLAGS) ... -# my_program_CFLAGS = ... $(CODE_COVERAGE_CFLAGS) ... -# my_program_CXXFLAGS = ... $(CODE_COVERAGE_CXXFLAGS) ... -# -# clean-local: code-coverage-clean -# distclean-local: code-coverage-dist-clean -# -# This results in a "check-code-coverage" rule being added to any -# Makefile.am which do "include $(top_srcdir)/aminclude_static.am" -# (assuming the module has been configured with --enable-code-coverage). -# Running `make check-code-coverage` in that directory will run the -# module's test suite (`make check`) and build a code coverage report -# detailing the code which was touched, then print the URI for the report. -# -# This code was derived from Makefile.decl in GLib, originally licensed -# under LGPLv2.1+. -# -# LICENSE -# -# Copyright (c) 2012, 2016 Philip Withnall -# Copyright (c) 2012 Xan Lopez -# Copyright (c) 2012 Christian Persch -# Copyright (c) 2012 Paolo Borelli -# Copyright (c) 2012 Dan Winship -# Copyright (c) 2015,2018 Bastien ROUCARIES -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or (at -# your option) any later version. -# -# This library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . - -#serial 34 - -m4_define(_AX_CODE_COVERAGE_RULES,[ -AX_ADD_AM_MACRO_STATIC([ -# Code coverage -# -# Optional: -# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. -# Multiple directories may be specified, separated by whitespace. -# (Default: \$(top_builddir)) -# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated -# by lcov for code coverage. (Default: -# \$(PACKAGE_NAME)-\$(PACKAGE_VERSION)-coverage.info) -# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage -# reports to be created. (Default: -# \$(PACKAGE_NAME)-\$(PACKAGE_VERSION)-coverage) -# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, -# set to 0 to disable it and leave empty to stay with the default. -# (Default: empty) -# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov -# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov -# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov -# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the -# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov -# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering -# lcov instance. (Default: empty) -# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov -# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the -# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) -# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml -# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore -# -# The generated report will be titled using the \$(PACKAGE_NAME) and -# \$(PACKAGE_VERSION). In order to add the current git hash to the title, -# use the git-version-gen script, available online. -# Optional variables -# run only on top dir -if CODE_COVERAGE_ENABLED - ifeq (\$(abs_builddir), \$(abs_top_builddir)) -CODE_COVERAGE_DIRECTORY ?= \$(top_builddir) -CODE_COVERAGE_OUTPUT_FILE ?= \$(PACKAGE_NAME)-\$(PACKAGE_VERSION)-coverage.info -CODE_COVERAGE_OUTPUT_DIRECTORY ?= \$(PACKAGE_NAME)-\$(PACKAGE_VERSION)-coverage - -CODE_COVERAGE_BRANCH_COVERAGE ?= -CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= \$(if \$(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc lcov_branch_coverage=\$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_LCOV_SHOPTS ?= \$(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) -CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool \"\$(GCOV)\" -CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= \$(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) -CODE_COVERAGE_LCOV_OPTIONS ?= \$(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) -CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= -CODE_COVERAGE_LCOV_RMOPTS ?= \$(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) -CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ -\$(if \$(CODE_COVERAGE_BRANCH_COVERAGE),\ ---rc genhtml_branch_coverage=\$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= \$(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) -CODE_COVERAGE_IGNORE_PATTERN ?= - -GITIGNOREFILES := \$(GITIGNOREFILES) \$(CODE_COVERAGE_OUTPUT_FILE) \$(CODE_COVERAGE_OUTPUT_DIRECTORY) -code_coverage_v_lcov_cap = \$(code_coverage_v_lcov_cap_\$(V)) -code_coverage_v_lcov_cap_ = \$(code_coverage_v_lcov_cap_\$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_lcov_cap_0 = @echo \" LCOV --capture\" \$(CODE_COVERAGE_OUTPUT_FILE); -code_coverage_v_lcov_ign = \$(code_coverage_v_lcov_ign_\$(V)) -code_coverage_v_lcov_ign_ = \$(code_coverage_v_lcov_ign_\$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_lcov_ign_0 = @echo \" LCOV --remove /tmp/*\" \$(CODE_COVERAGE_IGNORE_PATTERN); -code_coverage_v_genhtml = \$(code_coverage_v_genhtml_\$(V)) -code_coverage_v_genhtml_ = \$(code_coverage_v_genhtml_\$(AM_DEFAULT_VERBOSITY)) -code_coverage_v_genhtml_0 = @echo \" GEN \" \"\$(CODE_COVERAGE_OUTPUT_DIRECTORY)\"; -code_coverage_quiet = \$(code_coverage_quiet_\$(V)) -code_coverage_quiet_ = \$(code_coverage_quiet_\$(AM_DEFAULT_VERBOSITY)) -code_coverage_quiet_0 = --quiet - -# sanitizes the test-name: replaces with underscores: dashes and dots -code_coverage_sanitize = \$(subst -,_,\$(subst .,_,\$(1))) - -# Use recursive makes in order to ignore errors during check -check-code-coverage: - -\$(AM_V_at)\$(MAKE) \$(AM_MAKEFLAGS) -k check - \$(AM_V_at)\$(MAKE) \$(AM_MAKEFLAGS) code-coverage-capture - -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook - \$(code_coverage_v_lcov_cap)\$(LCOV) \$(code_coverage_quiet) \$(addprefix --directory ,\$(CODE_COVERAGE_DIRECTORY)) --capture --output-file \"\$(CODE_COVERAGE_OUTPUT_FILE).tmp\" --test-name \"\$(call code_coverage_sanitize,\$(PACKAGE_NAME)-\$(PACKAGE_VERSION))\" --no-checksum --compat-libtool \$(CODE_COVERAGE_LCOV_SHOPTS) \$(CODE_COVERAGE_LCOV_OPTIONS) - \$(code_coverage_v_lcov_ign)\$(LCOV) \$(code_coverage_quiet) \$(addprefix --directory ,\$(CODE_COVERAGE_DIRECTORY)) --remove \"\$(CODE_COVERAGE_OUTPUT_FILE).tmp\" \"/tmp/*\" \$(CODE_COVERAGE_IGNORE_PATTERN) --output-file \"\$(CODE_COVERAGE_OUTPUT_FILE)\" \$(CODE_COVERAGE_LCOV_SHOPTS) \$(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f \"\$(CODE_COVERAGE_OUTPUT_FILE).tmp\" - \$(code_coverage_v_genhtml)LANG=C \$(GENHTML) \$(code_coverage_quiet) \$(addprefix --prefix ,\$(CODE_COVERAGE_DIRECTORY)) --output-directory \"\$(CODE_COVERAGE_OUTPUT_DIRECTORY)\" --title \"\$(PACKAGE_NAME)-\$(PACKAGE_VERSION) Code Coverage\" --legend --show-details \"\$(CODE_COVERAGE_OUTPUT_FILE)\" \$(CODE_COVERAGE_GENHTML_OPTIONS) - @echo \"file://\$(abs_builddir)/\$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html\" - -code-coverage-clean: - -\$(LCOV) --directory \$(top_builddir) -z - -rm -rf \"\$(CODE_COVERAGE_OUTPUT_FILE)\" \"\$(CODE_COVERAGE_OUTPUT_FILE).tmp\" \"\$(CODE_COVERAGE_OUTPUT_DIRECTORY)\" - -find . \\( -name \"*.gcda\" -o -name \"*.gcno\" -o -name \"*.gcov\" \\) -delete - -code-coverage-dist-clean: - -A][M_DISTCHECK_CONFIGURE_FLAGS := \$(A][M_DISTCHECK_CONFIGURE_FLAGS) --disable-code-coverage - else # ifneq (\$(abs_builddir), \$(abs_top_builddir)) -check-code-coverage: - -code-coverage-capture: code-coverage-capture-hook - -code-coverage-clean: - -code-coverage-dist-clean: - endif # ifeq (\$(abs_builddir), \$(abs_top_builddir)) -else #! CODE_COVERAGE_ENABLED -# Use recursive makes in order to ignore errors during check -check-code-coverage: - @echo \"Need to reconfigure with --enable-code-coverage\" -# Capture code coverage data -code-coverage-capture: code-coverage-capture-hook - @echo \"Need to reconfigure with --enable-code-coverage\" - -code-coverage-clean: - -code-coverage-dist-clean: - -endif #CODE_COVERAGE_ENABLED -# Hook rule executed before code-coverage-capture, overridable by the user -code-coverage-capture-hook: - -.PHONY: check-code-coverage code-coverage-capture code-coverage-dist-clean code-coverage-clean code-coverage-capture-hook -]) -]) - -AC_DEFUN([_AX_CODE_COVERAGE_ENABLED],[ - AX_CHECK_GNU_MAKE([],[AC_MSG_ERROR([not using GNU make that is needed for coverage])]) - AC_REQUIRE([AX_ADD_AM_MACRO_STATIC]) - # check for gcov - AC_CHECK_TOOL([GCOV], - [$_AX_CODE_COVERAGE_GCOV_PROG_WITH], - [:]) - AS_IF([test "X$GCOV" = "X:"], - [AC_MSG_ERROR([gcov is needed to do coverage])]) - AC_SUBST([GCOV]) - - dnl Check if gcc is being used - AS_IF([ test "$GCC" = "no" ], [ - AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) - ]) - - AC_CHECK_PROG([LCOV], [lcov], [lcov]) - AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) - - AS_IF([ test x"$LCOV" = x ], [ - AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) - ]) - - AS_IF([ test x"$GENHTML" = x ], [ - AC_MSG_ERROR([Could not find genhtml from the lcov package]) - ]) - - dnl Build the code coverage flags - dnl Define CODE_COVERAGE_LDFLAGS for backwards compatibility - CODE_COVERAGE_CPPFLAGS="-DNDEBUG" - CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" - - AC_SUBST([CODE_COVERAGE_CPPFLAGS]) - AC_SUBST([CODE_COVERAGE_CFLAGS]) - AC_SUBST([CODE_COVERAGE_CXXFLAGS]) - AC_SUBST([CODE_COVERAGE_LIBS]) -]) - -AC_DEFUN([AX_CODE_COVERAGE],[ - dnl Check for --enable-code-coverage - - # allow to override gcov location - AC_ARG_WITH([gcov], - [AS_HELP_STRING([--with-gcov[=GCOV]], [use given GCOV for coverage (GCOV=gcov).])], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov], - [_AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov]) - - AC_MSG_CHECKING([whether to build with code coverage support]) - AC_ARG_ENABLE([code-coverage], - AS_HELP_STRING([--enable-code-coverage], - [Whether to enable code coverage support]),, - enable_code_coverage=no) - - AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test "x$enable_code_coverage" = xyes]) - AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) - AC_MSG_RESULT($enable_code_coverage) - - AS_IF([ test "x$enable_code_coverage" = xyes ], [ - _AX_CODE_COVERAGE_ENABLED - ]) - - _AX_CODE_COVERAGE_RULES -]) diff --git a/m4/ax_file_escapes.m4 b/m4/ax_file_escapes.m4 deleted file mode 100644 index a86fdc3..0000000 --- a/m4/ax_file_escapes.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# =========================================================================== -# 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 -# -# 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="\"" -]) diff --git a/m4/glibtests.m4 b/m4/glibtests.m4 deleted file mode 100644 index 581726a..0000000 --- a/m4/glibtests.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# Increment this whenever this file is changed. -#serial 1 - -dnl GLIB_TESTS -dnl - -AC_DEFUN([GLIB_TESTS], -[ - AC_ARG_ENABLE(installed-tests, - AS_HELP_STRING([--enable-installed-tests], - [Enable installation of some test cases]), - [case ${enableval} in - yes) ENABLE_INSTALLED_TESTS="1" ;; - no) ENABLE_INSTALLED_TESTS="" ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;; - esac]) - AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1") - AC_ARG_ENABLE(always-build-tests, - AS_HELP_STRING([--enable-always-build-tests], - [Enable always building tests during 'make all']), - [case ${enableval} in - yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;; - no) ENABLE_ALWAYS_BUILD_TESTS="" ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;; - esac]) - AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1") - if test "$ENABLE_INSTALLED_TESTS" = "1"; then - AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME) - AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME) - fi -]) diff --git a/release-checklist.md b/release-checklist.md index 6132c81..e3b7fd6 100644 --- a/release-checklist.md +++ b/release-checklist.md @@ -2,9 +2,9 @@ xdg-dbus-proxy release checklist ================================ * Update NEWS, including release date -* Update version number in `configure.ac` **and** `meson.build` +* Update version number in `meson.build` * Commit the changes -* `make distcheck` +* `ninja dist` * Do any final smoke-testing, e.g. update a package, install and test it * `git evtag sign $VERSION` * `git push --atomic origin main $VERSION` @@ -12,6 +12,6 @@ xdg-dbus-proxy release checklist * Fill in the new version's tag in the "Tag version" box * Title: `Release $VERSION` * Copy the `NEWS` text into the description - * Upload the tarball that you built with `make distcheck` + * Upload the tarball that you built with `ninja dist` * Get the `sha256sum` of the tarball and append it to the description * `Publish release`