[dpkg] 109/187: Dpkg: Add new Dpkg::PROGMAKE variable to store GNU make command name
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository dpkg.
commit c9fd007bbe22d52bd490f815f58bd46a398d53ae
Author: Guillem Jover <guillem at debian.org>
Date: Sun Aug 28 17:02:46 2016 +0200
Dpkg: Add new Dpkg::PROGMAKE variable to store GNU make command name
---
debian/changelog | 1 +
scripts/Dpkg.pm | 8 +++++++-
scripts/Makefile.am | 2 ++
scripts/dpkg-buildpackage.pl | 2 +-
scripts/t/mk.t | 3 ++-
5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f2ebbe6..c302d5d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -69,6 +69,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
- Change Dpkg::Compression::FileHandle to inherit directly from IO::File
instead of FileHandle.
- Add new Dpkg::PROGTAR variable to store GNU tar command name.
+ - Add new Dpkg::PROGMAKE variable to store GNU make command name.
* Packaging:
- Add liblocale-gettext-perl to libdpkg-perl Recommends.
- Wrap and document dependency relationships.
diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm
index 2eece99..c5ee468 100644
--- a/scripts/Dpkg.pm
+++ b/scripts/Dpkg.pm
@@ -33,6 +33,7 @@ our $VERSION = '1.02';
our @EXPORT_OK = qw(
$PROGNAME
$PROGVERSION
+ $PROGMAKE
$PROGTAR
$CONFDIR
$ADMINDIR
@@ -61,6 +62,10 @@ Contains the name of the current program.
Contains the version of the dpkg suite.
+=item $Dpkg::PROGMAKE
+
+Contains the name of the system GNU make program.
+
=item $Dpkg::PROGTAR
Contains the name of the system GNU tar program.
@@ -89,6 +94,7 @@ our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)};
# The following lines are automatically fixed at install time
our $PROGVERSION = '1.18.x';
+our $PROGMAKE = $ENV{DPKG_PROGMAKE} // 'make';
our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar';
our $CONFDIR = '/etc/dpkg';
@@ -108,7 +114,7 @@ our $pkgdatadir = $DATADIR;
=head2 Version 1.02 (dpkg 1.18.11)
-New variable: $PROGTAR.
+New variable: $PROGTAR, $PROGMAKE.
=head2 Version 1.01 (dpkg 1.17.0)
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 264c16c..dba3d77 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -127,6 +127,7 @@ do_perl_subst = $(AM_V_GEN) sed \
-e "s:\$$ADMINDIR = .*;:\$$ADMINDIR = '$(admindir)';:" \
-e "s:\$$LIBDIR = .*;:\$$LIBDIR = '$(pkglibdir)';:" \
-e "s:\$$DATADIR = .*;:\$$DATADIR = '$(pkgdatadir)';:" \
+ -e "s:\$$PROGMAKE = .*;:\$$PROGMAKE = '$(MAKE)';:" \
-e "s:\$$PROGTAR = .*;:\$$PROGTAR = '$(TAR)';:" \
-e "s:\$$PROGVERSION = .*;:\$$PROGVERSION = '$(PACKAGE_VERSION)';:"
@@ -189,6 +190,7 @@ coverage-clean:
TEST_ENV_VARS = \
DPKG_PROGTAR=$(TAR) \
+ DPKG_PROGMAKE=$(MAKE) \
DPKG_DATADIR=$(top_srcdir)/data \
DPKG_ORIGINS_DIR=$(srcdir)/t/origins
TEST_COVERAGE = $(PERL_COVERAGE)
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 42131d6..52aec04 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -740,7 +740,7 @@ sub build_target_fallback {
# Check if the build-{arch,indep} targets are supported. If not, fallback
# to build.
- my $pid = spawn(exec => [ 'make', '-f', @debian_rules, '-qn', $buildtarget ],
+ my $pid = spawn(exec => [ $Dpkg::PROGMAKE, '-f', @debian_rules, '-qn', $buildtarget ],
from_file => '/dev/null', to_file => '/dev/null',
error_to_file => '/dev/null');
my $cmdline = "make -f @debian_rules -qn $buildtarget";
diff --git a/scripts/t/mk.t b/scripts/t/mk.t
index a0453b0..90310bb 100644
--- a/scripts/t/mk.t
+++ b/scripts/t/mk.t
@@ -19,6 +19,7 @@ use warnings;
use Test::More tests => 5;
use File::Spec::Functions qw(rel2abs);
+use Dpkg ();
use Dpkg::ErrorHandling;
use Dpkg::IPC;
use Dpkg::Vendor;
@@ -38,7 +39,7 @@ $ENV{DEB_BUILD_PATH} = rel2abs($datadir);
sub test_makefile {
my $makefile = shift;
- spawn(exec => [ 'make', '-C', $datadir, '-f', $makefile ],
+ spawn(exec => [ $Dpkg::PROGMAKE, '-C', $datadir, '-f', $makefile ],
wait_child => 1, nocheck => 1);
ok($? == 0, "makefile $makefile computes all values correctly");
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list