summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-17 12:33:57 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-17 12:33:57 -0500
commit86fbd6038ee5b7222efa774751fcceedeffedfc2 (patch)
treefe10638c9c3e748a6f255f8313a711cc2b763484
parent378b377ef732119de4c2a08dcb9721500b017da1 (diff)
make dh override_dh_* a no-op
This happens if the override target is completly empty. Make sees it is, and runs the implicit dh target.
-rwxr-xr-xdebian/rules3
-rwxr-xr-xdh13
2 files changed, 13 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index ae141867..23b782b1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,10 @@
# Each debhelper command in this rules file has to be run using ./run,
# to ensure that the commands and libraries in the source tree are used,
# rather than the installed ones.
+
%:
./run dh $@
# 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 39b11700..cbc5f10c 100755
--- a/dh
+++ b/dh
@@ -182,6 +182,15 @@ after a particular debhelper command is run.
dh_fixperms
chmod 4755 debian/foo/usr/bin/foo
+If the package's source tree might get files with names
+like build or clean in it, the rules file would not
+run targets with the same names. This issue can be worked
+around by passing -B to make.
+
+ #!/usr/bin/make -Bf
+ %:
+ dh $@
+
=cut
# Stash this away before init modifies it.
@@ -320,8 +329,10 @@ if (! @ARGV) {
error "specify a sequence to run";
}
my $sequence=shift;
-if ($sequence eq 'debian/rules') {
+if ($sequence eq 'debian/rules' ||
+ $sequence =~ /^override_dh_/) {
# make -B causes the rules file to be run as a target
+ # and support completly empty override targets
exit 0
}
elsif (! exists $sequences{$sequence}) {