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

Bug#311786: blocked? "missing debian/rules targets to cause lintian error"



On Wed, Nov 30, 2005 at 09:26:11PM +0100, Marc 'HE' Brockschmidt wrote:
> Justin Pryzby <justinpryzby@users.sourceforge.net> writes:
> > Regarding these bugs:
> >
> >   #311786: "lintian should definitely put an error for missing
> >   debian/rules targets"
> >
> > merged with
> >
> >   #88021: "[new check (checks/rules?)] Ensure that debian/rules is a
> >   makefile and parse for common problems"
> >
> > Marc says:
> >
> >   Due to a problem with make -n (and recursive $(MAKE) calls), this
> >   check has been postponed to a later release.
> >
> > What is the problem with make -n?  Is it fixed?  Is the bug documented
> > on Debian BTS?
> 
> It's not a bug, so it's not in the BTS.
> The problem are rules like this:
> 
> binary:
>         $(MAKE) -f $(CWD)/debian/rules binary-arch FOO=BAR BAZ=BAR
> 
> Though there are other ways to write a Makefile with the same effect,
> this is still a commonly used statement that will *not* be covered by
> this check. In fact, it often leads to false positives, so the whole
> check is disabled. This can't be fixed in make(1), it's a bug in the
> proposed check.
I thought I understood the problem, but I was wrong, and now I'm even
more confused.

#311786 requests checks for missing required rules, and #88021 is
maybe a bit more general, as it also requests other parsing.

I can't see that there's a problem with your make snippet; you said
that it can lead to false positives.  Do you mean that lintian would
output an error when it should not?  How would it do so?

The only thing I can come up with is that you mean false negative (by
my interpretation), meaning that lintian would not catch errors that
it (hypothetically) could.  This could happen with, for example:

foo:
	$(MAKE) -f $(CWD)/debian/rules bar

where the "foo" rule is required (build, binary, binary-arch,
binary-indep ...) and the "bar" rules does not exist.  Since it is a
command, and not a prerequisite, it will not be run, and thusly there
will be no check for the "foo" rule => false negative.

Is this what you mean?

I think that the make -n check for each of the required rules is still
worthwhile, since it also asserts that the rules file is sane.

-- 
Clear skies,
Justin



Reply to: