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

Re: dh 7 broken by design?

Helmut Grohne <helmut@subdivi.de> writes:
> On Tue, Feb 17, 2009 at 07:40:41PM -0500, Joey Hess wrote:
>> Helmut Grohne wrote:

>>> So will the new minimal example look like the following then?
>>> #/usr/bin/make -Bf
>>> %:
>>> 	dh $@

>> Yes, that's how it's looking now.

> You should then take Russ Allbery's comment into account:

> On Tue, Feb 17, 2009 at 02:06:09PM -0800, Russ Allbery wrote:
>> If the -B flag is necessary, this will require a change in Debian Policy;
>> currently, the above arguably violates a must.  I'm inclined to think this
>> isn't the right solution, since it also breaks invoking debian/rules as a
>> makefile instead of as an executable.

> We probably need a different solution for this. :-/

I really think this is a bug in make.

We can change Policy if we have to.  Arguably that line complies with
Policy, but it feels icky to me; Policy's requirement that debian/rules be
a makefile to me means that you should be able to use it as a makefile,
which means not requiring special make flags.  Policy also currently says:

    It must start with the line #!/usr/bin/make -f, so that it can be
    invoked by saying its name rather than invoking make explicitly.

but that's a bit more nit-picky.

More to the point, though, declaring a target as .PHONY shouldn't, I
think, cause it to not be processed by pattern rules.  That really feels
like a bug in make that should be fixed in make, and then debhelper can
just depend on a fixed version of make.  I'd much rather see that approach
than adding a workaround by adding -B.  You still then have to list the
rules as .PHONY in the minimal makefile, which is annoying, but you only
have to do that if your particular package has files by those names.

Right now, rather than changing dh, I'd recommend that people who have
packages that have such files just not use the dh 7 minimal makefile and
instead spell out the necessary rule.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: