Adding make targets for lint/sparse/etc.

Donnie Berkholz spyderous at gentoo.org
Wed Jun 28 20:37:45 PDT 2006


Alan Coopersmith wrote:
> One of the things we used in the Imake builds but lost in modularization
> was rules to run lint on the source code.
> 
> I've been experimenting with restoring this and started with the nice
> easy case of lib/Xau.   If you run configure with "--with-lint" it will
> add a rule so that running "make lint" runs lint on the source with the
> right set of -I & -D flags.   If you did "--with-lint=sparse", then
> "make lint" runs sparse instead.   (Those are the two checkers I'm familiar
> with and tested with, but it could be extended to similar tools easily as
> well.)   If you don't specify --with-lint (as most end users probably
> won't)
> then it changes nothing from the current builds.    (Even with the easy
> case
> of lib/Xau, both sparse & lint found different things to complain about
> - see
> the previous commits today to clean those up.)

I like the idea a lot.

> This requires changes to both configure.ac and Makefile.am - so I could put
> the configure.ac bits in a macro in the Xorg macro package, but would still
> have to modify the Makefile.am in every package on a change, so I'm not
> sure
> putting it in a macro buys much, and making packages depend on updates
> to the
> xorg-macros package seems to have caused pain in the past.

It would probably be less painful if util-macros installed a pkgconfig
file so the configure.ac's could require specific versions.

Putting it in a macro will buy a whole lot if we ever want to change it,
and the configure.ac appears much more likely to change (e.g., whenever
some OS besides solaris wants to add its own lint flags).

Makefile.am allows for other files to be included via 'include'
statements. Is there any way this could be used?

Thanks,
Donnie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20060628/f1ff5a8e/attachment.pgp>


More information about the xorg mailing list