]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh
move dh_auto_configure out of @bd_minimal
[debhelper.git] / dh
diff --git a/dh b/dh
index 8af408c453046e3c8e8a6f2fd5973023ac1fd993..dcf3b9c6e748d74e9d3c8b6bcf956078f3959fa0 100755 (executable)
--- a/dh
+++ b/dh
@@ -340,20 +340,16 @@ if (is_make_jobserver_unavailable()) {
 my %sequences;
 my @bd_minimal = qw{
        dh_testdir
-       dh_auto_configure
 };
 my @bd = qw{
        dh_testdir
        dh_auto_configure
        dh_auto_build
        dh_auto_test
-};
-# The build sequences will call 'debian/rules build-arch' and
-# 'debian/rules build-indep' after running the standard sequence;
-# these will typically be no-ops but this permits the standard targets
-# to be customised by the user and still run as a side-effect of the
-# build target.
-$sequences{build} = [@bd, 'rules:build-arch', 'rules:build-indep'];
+       };
+# rules:build-arch and rules:build-indep are not called by build,
+# as an optimisation (code below will adjust this if explicit targets exist).
+$sequences{build} = [@bd];
 $sequences{'build-indep'} = [@bd];
 $sequences{'build-arch'} = [@bd];
 $sequences{clean} = [qw{
@@ -406,12 +402,10 @@ my @i = qw{
        dh_compress
        dh_fixperms
 };
-# The install sequences will call 'debian/rules build' before running
-# the standard sequence, and 'debian/rules install-arch' and
-# 'debian/rules install-indep' after running the standard sequence;
-# these will typically be no-ops but this permits the install-arch and
-# install-indep targets to be customised by the user and still run as
-# a side-effect of the install target.
+# The install sequences will call rules:build before running
+# the standard sequence. rules:install-arch and rules:install-indep
+# are not called by install, as an optimisation (code below will adjust
+# this if explicit targets exist).
 $sequences{'install'} = ['rules:build', @i, 'rules:install-arch', 'rules:install-indep'];
 $sequences{'install-indep'} = ['rules:build-indep', @i];
 $sequences{'install-arch'} = ['rules:build-arch', @i];
@@ -547,10 +541,11 @@ else {
 if (! defined $sequence) {
        error "specify a sequence to run";
 }
+# make -B causes the rules file to be run as a target.
+# Also support completly empty override targets.
+# Note: it's not safe to use rules_explicit_target before this check.
 if ($sequence eq 'debian/rules' ||
     $sequence =~ /^override_dh_/) {
-       # make -B causes the rules file to be run as a target.
-       # Also support completly empty override targets.
        exit 0;
 }
 elsif (! exists $sequences{$sequence}) {
@@ -558,14 +553,10 @@ elsif (! exists $sequences{$sequence}) {
                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 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'];
+       $sequences{build} = [@bd_minimal, 'rules:build-arch', 'rules:build-indep'];
 }
 # If debian/rules defines install-arch or install-indep, run sequences
 # separately.