summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-17 12:21:01 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-17 12:21:01 -0500
commit378b377ef732119de4c2a08dcb9721500b017da1 (patch)
treec8e46d06901320360d52dfde8458d38cbb641534 /dh
parentae4994f07656deb47ffc55b8ebd4668c158b9333 (diff)
dh: Support debian/rules calling make with -B
That is useful to avoid issues with phony implicit rules (see bug #509756). Apparently make treats the name of the Makfile as an automaticall set up target, so this causes it to try to build the Makefile even though it's up-to-date, and the implicit target makes it run 'dh debian/rules'. So, make that a no-op.
Diffstat (limited to 'dh')
-rwxr-xr-xdh6
1 files changed, 5 insertions, 1 deletions
diff --git a/dh b/dh
index 8938baa..39b1170 100755
--- a/dh
+++ b/dh
@@ -320,7 +320,11 @@ if (! @ARGV) {
error "specify a sequence to run";
}
my $sequence=shift;
-if (! exists $sequences{$sequence}) {
+if ($sequence eq 'debian/rules') {
+ # make -B causes the rules file to be run as a target
+ exit 0
+}
+elsif (! exists $sequences{$sequence}) {
error "Unknown sequence $sequence (choose from: ".
join(" ", sort keys %sequences).")";
}