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

Re: lintian: r563 - in trunk: checks debian testset testset/maintainer-scripts/debian



rra@debian.org writes:

> -				    if (grep ($_ eq $target, qw(clean binary-arch build-arch))) {
> +				    if (/^(\S+):(.*)/) {
> +					$target = $1;
> +					if (grep ($_ eq $target, @rules)) {
> +					    push (@rules, split (' ', $2));
> +					}
> +				    }
> +				    if (grep ($_ eq $target, @rules)) {

That won't work for makefiles like this one:

clean-bla:
        foofoo

clean-foo: clean-bla
        barbar

clean: clean-foo
       blabla

clean-foo will be added to @rules when the actual clean-foo target was
already parsed. Probably better to go over the makefile more than once
(hey, lintian performance sucks anyway, and debian/rules is short). So
let's simply restart parsing when we change the content of @rules (of
cource, we need to check that the targets we want to add are not in
there).

I just woke up, so it's probably a better idea if someone else actually
implements this and checks if I'm right.

Marc, who was probably on bad crack when he wrote that simply make
 parser
-- 
BOFH #311:
transient bus protocol violation

Attachment: pgpQ2L9k3njpl.pgp
Description: PGP signature


Reply to: