Bug#482086: lintian should not parse debian/rules but use debian/rules -nq <target> instead
Pierre Habouzit <madcoder@debian.org> writes:
> Package: lintian
> Version: 1.23.48
> Severity: normal
>
>
> When using implicit rules, like %:, you won't see the target name
> spelled out explicitly.
>
> The proper way to do is to use the -q gnu make feature to know for
> sure if the target is here.
>
> debian/rules -nq <target-name> will return 0 or 1 if the target exists,
> 2 if not (0 means the target exists and is up 2 date, 1 that the target
> exists and is _not_ up 2 date, and 2 that the target doesn't exist).
>
> Of course, this implies that debian/rules is makefile, but AFAICT
> it's always the case in Debian.
Running -n might have side effects. It can create files, remove files,
run subshells doing various things. It can easily fail if you run it
on the wrong architecture because it triggers an explicit architecture
check in packages that are only for some archs.
MfG
Goswin
Reply to: