From 4cd060b7fe6e2f9cc7ca8f8c128d1b5c1de9c137 Mon Sep 17 00:00:00 2001 From: David Steele Date: Sat, 14 Mar 2020 12:48:08 -0400 Subject: [PATCH] Generate src/build/aclocal.m4 automatically. This file is required when macros from the autoconf archive are used in configure.ac --- CONTRIBUTING.md | 4 ++-- doc/xml/contributing.xml | 4 ++-- src/build/aclocal.m4 | 1 + test/Vagrantfile | 2 +- test/test.pl | 6 ++++++ 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 src/build/aclocal.m4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1dfce6a34..539312414 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,8 +11,8 @@ This example is based on Ubuntu 19.04, but it should work on many versions of De pgbackrest-dev => Install development tools ``` sudo apt-get install rsync git devscripts build-essential valgrind autoconf \ - libssl-dev zlib1g-dev libxml2-dev libpq-dev libxml-checker-perl \ - libyaml-libyaml-perl libdbd-pg-perl + autoconf-archive libssl-dev zlib1g-dev libxml2-dev libpq-dev \ + libxml-checker-perl libyaml-libyaml-perl libdbd-pg-perl ``` Coverage testing is an important component of pgBackRest testing and is integrated directly into the test harness. Unfortunately, the default version of lcov is often not compatible with gcc. lcov 1.14 works up to gcc 8. diff --git a/doc/xml/contributing.xml b/doc/xml/contributing.xml index 5e5f70277..a55414449 100644 --- a/doc/xml/contributing.xml +++ b/doc/xml/contributing.xml @@ -57,8 +57,8 @@ apt-get install rsync git devscripts build-essential valgrind autoconf - libssl-dev zlib1g-dev libxml2-dev libpq-dev libxml-checker-perl - libyaml-libyaml-perl libdbd-pg-perl + autoconf-archive libssl-dev zlib1g-dev libxml2-dev libpq-dev + libxml-checker-perl libyaml-libyaml-perl libdbd-pg-perl -y 2>&1 diff --git a/src/build/aclocal.m4 b/src/build/aclocal.m4 new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/build/aclocal.m4 @@ -0,0 +1 @@ + diff --git a/test/Vagrantfile b/test/Vagrantfile index 0c9a63dfd..f1167af3f 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -71,7 +71,7 @@ Vagrant.configure(2) do |config| #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Build Tools' && date apt-get install -y devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev \ - libxml2-dev liblz4-dev liblz4-tool libpq-dev valgrind lcov + libxml2-dev liblz4-dev liblz4-tool libpq-dev valgrind lcov autoconf-archive #--------------------------------------------------------------------------------------------------------------------------- echo 'Install Docker' && date diff --git a/test/test.pl b/test/test.pl index 425a4e382..542ec7fdc 100755 --- a/test/test.pl +++ b/test/test.pl @@ -500,6 +500,12 @@ eval if (!defined($rstrConfigure) || !defined($$rstrConfigure) || $strConfigureAcHash ne substr($$rstrConfigure, length($$rstrConfigure) - 41, 40)) { + # Generate aclocal.m4 + my $strAcLocal = executeTest("cd ${strBackRestBase}/src/build && aclocal --OUT=-"); + $strAcLocal = trim($strAcLocal) . "\n"; + + buildPutDiffers($oStorageBackRest, "${strBackRestBase}/src/build/aclocal.m4", $strAcLocal); + # Generate configure my $strConfigure = executeTest("cd ${strBackRestBase}/src/build && autoconf --output=-"); $strConfigure =