From: Joey Hess Date: Tue, 17 Feb 2009 17:21:01 +0000 (-0500) Subject: dh: Support debian/rules calling make with -B X-Git-Tag: 7.2.0~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=378b377ef732119de4c2a08dcb9721500b017da1;p=debhelper.git 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. --- diff --git a/debian/changelog b/debian/changelog index bbabe30..89403bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,9 @@ debhelper (7.2.0) UNRELEASED; urgency=low * dh: Fix typo. Closes: #509754 * debhelper.pod: Fix typo. Closes: #510180 * dh_gconf: Support mandatory settings. Closes: #513923 + * dh: Support debian/rules calling make with -B, + which is useful to avoid issues with phony implicit + rules (see bug #509756). -- Joey Hess Thu, 25 Dec 2008 16:26:36 -0500 diff --git a/debian/rules b/debian/rules index 03db2d0..ae14186 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,4 @@ -#!/usr/bin/make -f +#!/usr/bin/make -Bf # If you're looking for an example debian/rules that uses debhelper, see # the examples directory. # @@ -11,3 +11,5 @@ # Not intended for use by anyone except the author. announcedir: @echo ${HOME}/src/joeywiki/code/debhelper/news + +.PHONY: build 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).")"; }