From 8e9e73464c3da06ca315006e9ea5da6833780d14 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Sun, 2 Sep 2018 15:50:27 +0300 Subject: Support of terse flag in DEB_BUILD_OPTIONS * Also fix using of the QUIET internal setting in autoconf and cmake build systems. --- lib/Debian/Debhelper/Buildsystem/autoconf.pm | 4 ++-- lib/Debian/Debhelper/Buildsystem/cmake.pm | 6 ++++-- lib/Debian/Debhelper/Dh_Lib.pm | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/Debian/Debhelper/Buildsystem/autoconf.pm b/lib/Debian/Debhelper/Buildsystem/autoconf.pm index 142c27ea..70d3511e 100644 --- a/lib/Debian/Debhelper/Buildsystem/autoconf.pm +++ b/lib/Debian/Debhelper/Buildsystem/autoconf.pm @@ -8,7 +8,7 @@ package Debian::Debhelper::Buildsystem::autoconf; use strict; use warnings; -use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value sourcepackage compat); +use Debian::Debhelper::Dh_Lib qw(%dh dpkg_architecture_value sourcepackage compat); use parent qw(Debian::Debhelper::Buildsystem::makefile); sub DESCRIPTION { @@ -38,7 +38,7 @@ sub configure { push @opts, "--infodir=\${prefix}/share/info"; push @opts, "--sysconfdir=/etc"; push @opts, "--localstatedir=/var"; - if (defined $ENV{DH_QUIET} && $ENV{DH_QUIET} ne "") { + if ($dh{QUIET}) { push @opts, "--enable-silent-rules"; } else { push @opts, "--disable-silent-rules"; diff --git a/lib/Debian/Debhelper/Buildsystem/cmake.pm b/lib/Debian/Debhelper/Buildsystem/cmake.pm index c732ba41..b2364a59 100644 --- a/lib/Debian/Debhelper/Buildsystem/cmake.pm +++ b/lib/Debian/Debhelper/Buildsystem/cmake.pm @@ -8,12 +8,11 @@ package Debian::Debhelper::Buildsystem::cmake; use strict; use warnings; -use Debian::Debhelper::Dh_Lib qw(compat dpkg_architecture_value error is_cross_compiling); +use Debian::Debhelper::Dh_Lib qw(%dh compat dpkg_architecture_value error is_cross_compiling); use parent qw(Debian::Debhelper::Buildsystem); my @STANDARD_CMAKE_FLAGS = qw( -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var @@ -85,6 +84,9 @@ sub configure { my $generator = $TARGET_BUILD_SYSTEM2CMAKE_GENERATOR{$backend}; push(@flags, "-G${generator}"); } + unless ($dh{QUIET}) { + push(@flags, "-DCMAKE_VERBOSE_MAKEFILE=ON"); + } if ($ENV{CC}) { push @flags, "-DCMAKE_C_COMPILER=" . $ENV{CC}; diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm index f6c3fc51..9359eb27 100644 --- a/lib/Debian/Debhelper/Dh_Lib.pm +++ b/lib/Debian/Debhelper/Dh_Lib.pm @@ -255,7 +255,7 @@ sub init { # make sure verbose is on. Otherwise, check DH_QUIET. if (defined $ENV{DH_VERBOSE} && $ENV{DH_VERBOSE} ne "") { $dh{VERBOSE}=1; - } elsif (defined $ENV{DH_QUIET} && $ENV{DH_QUIET} ne "") { + } elsif (defined $ENV{DH_QUIET} && $ENV{DH_QUIET} ne "" || get_buildoption("terse")) { $dh{QUIET}=1; } -- cgit v1.2.3