summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
Diffstat (limited to 'dh')
-rwxr-xr-xdh24
1 files changed, 24 insertions, 0 deletions
diff --git a/dh b/dh
index 75070ea8..8af408c4 100755
--- a/dh
+++ b/dh
@@ -338,6 +338,10 @@ if (is_make_jobserver_unavailable()) {
# Definitions of sequences.
my %sequences;
+my @bd_minimal = qw{
+ dh_testdir
+ dh_auto_configure
+};
my @bd = qw{
dh_testdir
dh_auto_configure
@@ -357,6 +361,9 @@ $sequences{clean} = [qw{
dh_auto_clean
dh_clean
}];
+my @i_minimal = qw{
+ dh_testroot
+};
my @i = qw{
dh_testroot
dh_prep
@@ -550,6 +557,23 @@ elsif (! exists $sequences{$sequence}) {
error "Unknown sequence $sequence (choose from: ".
join(" ", sort keys %sequences).")";
}
+
+# Note: it's not safe to run rules_explicit_target before this point
+# due to dh being recursively invoked with debhelper-fail-me as the
+# sequence
+# If debian/rules defines build-arch or build-indep, run sequences
+# separately.
+if (rules_explicit_target('build-arch') ||
+ rules_explicit_target('build-indep')) {
+ $sequences{build} = [@bd_minimal, 'rules:build-arch', 'rules:build-indep'];
+}
+# If debian/rules defines install-arch or install-indep, run sequences
+# separately.
+if (rules_explicit_target('install-arch') ||
+ rules_explicit_target('install-indep')) {
+ $sequences{'install'} = ['rules:build', @i_minimal, 'rules:install-arch', 'rules:install-indep'];
+}
+
my @sequence=@{$sequences{$sequence}};
# The list of all packages that can be acted on.