diff options
-rwxr-xr-x | dh | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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. |