[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh 7 broken by design?

Helmut Grohne wrote:
> I recently tried converting my packages to dh 7 and ... failed.
> The simple rule
> %:
> 	dh $@
> will fail miserably if there is any file named like a target. Try `touch
> build' in your favourite dh-7-package to see it break.
> GNU make users probably know that this is why there is a .PHONY: ...
> rule. However that one does not work with implicit dependencies and
> results in make thinking there is nothing to be done.

I was not aware of this behavior of make and had assumed .PHONY could be used
as usual in this case. But I see that bug #509756 was recently opened on make
about it.

> Another idea was to supply the -B switch to make:
>   -B, --always-make           Unconditionally make all targets.
> However `make -Bf ./debian/rules clean' does not seem to work since make
> executes `dh ./debian/rules'. I did not find out why.

Apparently make always tries to run a target with the name of the 
Makefile. So this causes it to try to build the Makefile
even though it's up-to-date.

I will make dh handle this case in the next release, by doing the equivilant

	# no-op

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: