summaryrefslogtreecommitdiff
path: root/dh
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-17 00:53:22 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-27 15:11:58 -0500
commit6c80d913e37857ae525d6ff7464cedcb01a67658 (patch)
tree9106d7aa4d0c4e8a72c8252c65226ef01733abc6 /dh
parent7aa4f2005122d3255305229374f61fed7ff228dd (diff)
misc minor cleanups of patch
(cherry picked from commit ae4994f07656deb47ffc55b8ebd4668c158b9333)
Diffstat (limited to 'dh')
-rwxr-xr-xdh17
1 files changed, 10 insertions, 7 deletions
diff --git a/dh b/dh
index e3a5943..88dc9c4 100755
--- a/dh
+++ b/dh
@@ -495,24 +495,27 @@ sub rules_explicit_target {
# Checks if a specified target exists as an explicit target
# in debian/rules.
my $target=shift;
- my $processing_targets = 0;
- my $not_a_target = 0;
if (! $rules_parsed) {
+ my $processing_targets = 0;
+ my $not_a_target = 0;
open(MAKE, "make -Rrnpsf debian/rules debhelper-fail-me 2>/dev/null |");
while (<MAKE>) {
if ($processing_targets) {
if (/^# Not a target:/) {
$not_a_target = 1;
- } else {
- if (!$not_a_target && /^([^#:]+)::?/ && !exists $targets{$1}) {
+ }
+ else {
+ if (!$not_a_target && /^([^#:]+)::?/) {
# Target is defined.
- # NOTE: if it is a depenency of .PHONY it will be
+ # NOTE: if it is a depenency
+ # of .PHONY it will be
# defined too but that's ok.
$targets{$1} = 1;
}
- # "Not a target:" is always followed by a target name,
- # so resetting this one here is safe.
+ # "Not a target:" is always followed by
+ # a target name, so resetting this one
+ # here is safe.
$not_a_target = 0;
}
} elsif (/^# Files$/) {