All of lore.kernel.org
 help / color / mirror / Atom feed
* wonky autotools question
@ 2007-07-27 19:48 Chuck Lever
  2007-07-27 20:08 ` J. Bruce Fields
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2007-07-27 19:48 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

Hi all-

It would be nice to enable more static code checking in nfs-utils (I'm 
especially interested in utils/mount/).  Is there a clean way to add 
additional CFLAGS, like -Wall, to utils/mount/Makefile using the 
autotools set up?  How about a lint or sparse target?

I'm not just interested in autotools foo, but also in knowing how the 
nfs-utils maintainers prefer this sort of thing to be done.  Thanks!

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 259 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wonky autotools question
  2007-07-27 19:48 wonky autotools question Chuck Lever
@ 2007-07-27 20:08 ` J. Bruce Fields
  2007-07-27 20:17   ` Chuck Lever
  0 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2007-07-27 20:08 UTC (permalink / raw)
  To: Chuck Lever; +Cc: nfs

On Fri, Jul 27, 2007 at 03:48:06PM -0400, Chuck Lever wrote:
> Hi all-
>
> It would be nice to enable more static code checking in nfs-utils (I'm 
> especially interested in utils/mount/).  Is there a clean way to add 
> additional CFLAGS, like -Wall, to utils/mount/Makefile using the autotools 
> set up?  How about a lint or sparse target?

I don't know, sounds like a good idea.

Last I checked, though, I thought there were still a fair number of
warnings just with the current defaults.  Maybe we should fix those up
first?

--b.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wonky autotools question
  2007-07-27 20:08 ` J. Bruce Fields
@ 2007-07-27 20:17   ` Chuck Lever
  2007-07-27 20:29     ` Garrick Staples
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2007-07-27 20:17 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: nfs

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

J. Bruce Fields wrote:
> On Fri, Jul 27, 2007 at 03:48:06PM -0400, Chuck Lever wrote:
>> Hi all-
>>
>> It would be nice to enable more static code checking in nfs-utils (I'm 
>> especially interested in utils/mount/).  Is there a clean way to add 
>> additional CFLAGS, like -Wall, to utils/mount/Makefile using the autotools 
>> set up?  How about a lint or sparse target?
> 
> I don't know, sounds like a good idea.

So far, "CFLAGS=-Wall -O2 -g ./configure" enables full warnings 
everywhere in the tree, but I haven't found anything on how to specify 
additional CFLAGS in one subdir, and have it happen automatically.

> Last I checked, though, I thought there were still a fair number of
> warnings just with the current defaults.  Maybe we should fix those up
> first?

I'm focusing on utils/mount at the moment, and that seems pretty clean 
with the present C flags.  I have noticed warnings in other parts of the 
tree, but haven't had time to poke at them.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 259 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wonky autotools question
  2007-07-27 20:17   ` Chuck Lever
@ 2007-07-27 20:29     ` Garrick Staples
  2007-07-27 21:41       ` Chuck Lever
  0 siblings, 1 reply; 6+ messages in thread
From: Garrick Staples @ 2007-07-27 20:29 UTC (permalink / raw)
  To: chuck.lever; +Cc: J. Bruce Fields, nfs



----- Original Message -----
From: Chuck Lever <chuck.lever@oracle.com>
Date: Friday, July 27, 2007 1:19 pm
Subject: Re: [NFS] wonky autotools question
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: nfs@lists.sourceforge.net

> J. Bruce Fields wrote:
> > On Fri, Jul 27, 2007 at 03:48:06PM -0400, Chuck Lever wrote:
> >> Hi all-
> >>
> >> It would be nice to enable more static code checking in nfs-
> utils (I'm 
> >> especially interested in utils/mount/).  Is there a clean way to 
> add 
> >> additional CFLAGS, like -Wall, to utils/mount/Makefile using the 
> autotools 
> >> set up?  How about a lint or sparse target?
> > 
> > I don't know, sounds like a good idea.
> 
> So far, "CFLAGS=-Wall -O2 -g ./configure" enables full warnings 
> everywhere in the tree, but I haven't found anything on how to 
> specify 
> additional CFLAGS in one subdir, and have it happen automatically.
> 
> > Last I checked, though, I thought there were still a fair number of
> > warnings just with the current defaults.  Maybe we should fix 
> those up
> > first?
> 
> I'm focusing on utils/mount at the moment, and that seems pretty 
> clean 
> with the present C flags.  I have noticed warnings in other parts 
> of the 
> tree, but haven't had time to poke at them.

In configure.ac, add something like this:
     GCC_WARNING_FLAGS="" 
     if test "x$GCC" = "xyes" ;then
        GCC_WARNING_FLAGS="-Wall -O2 -g"
     fi
     AC_SUBST(GCC_WARNING_FLAGS)

And then in utils/mount/Makefile.am, add something like this:
   mount_CFLAGS = $(GCC_WARNING_FLAGS)
  

This is a pretty generic answer because I haven't actually looked at the source tree to know if these are correct for your autotools stuff.  If you like, I can grab it and send you a patch.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wonky autotools question
  2007-07-27 20:29     ` Garrick Staples
@ 2007-07-27 21:41       ` Chuck Lever
  2007-07-27 22:31         ` Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2007-07-27 21:41 UTC (permalink / raw)
  To: Garrick Staples; +Cc: J. Bruce Fields, nfs

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

Garrick Staples wrote:
> ----- Original Message -----
> From: Chuck Lever <chuck.lever@oracle.com>
> Date: Friday, July 27, 2007 1:19 pm
> Subject: Re: [NFS] wonky autotools question
> To: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: nfs@lists.sourceforge.net
> 
>> J. Bruce Fields wrote:
>>> On Fri, Jul 27, 2007 at 03:48:06PM -0400, Chuck Lever wrote:
>>>> Hi all-
>>>>
>>>> It would be nice to enable more static code checking in nfs-
>> utils (I'm 
>>>> especially interested in utils/mount/).  Is there a clean way to 
>> add 
>>>> additional CFLAGS, like -Wall, to utils/mount/Makefile using the 
>> autotools 
>>>> set up?  How about a lint or sparse target?
>>> I don't know, sounds like a good idea.
>> So far, "CFLAGS=-Wall -O2 -g ./configure" enables full warnings 
>> everywhere in the tree, but I haven't found anything on how to 
>> specify 
>> additional CFLAGS in one subdir, and have it happen automatically.
>>
>>> Last I checked, though, I thought there were still a fair number of
>>> warnings just with the current defaults.  Maybe we should fix 
>> those up
>>> first?
>> I'm focusing on utils/mount at the moment, and that seems pretty 
>> clean 
>> with the present C flags.  I have noticed warnings in other parts 
>> of the 
>> tree, but haven't had time to poke at them.
> 
> In configure.ac, add something like this:
>      GCC_WARNING_FLAGS="" 
>      if test "x$GCC" = "xyes" ;then
>         GCC_WARNING_FLAGS="-Wall -O2 -g"
>      fi
>      AC_SUBST(GCC_WARNING_FLAGS)
> 
> And then in utils/mount/Makefile.am, add something like this:
>    mount_CFLAGS = $(GCC_WARNING_FLAGS)
>   
> 
> This is a pretty generic answer because I haven't actually looked at
> the source tree to know if these are correct for your autotools stuff.
 > If you like, I can grab it and send you a patch.

This is pretty straightforward, plus gives us a generic tool that can be 
added to each subdirectory as we please.

Though really, it does make sense to set -Wall for the whole package. 
Would anyone mind if I sent a patch that did that?

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 259 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wonky autotools question
  2007-07-27 21:41       ` Chuck Lever
@ 2007-07-27 22:31         ` Neil Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Brown @ 2007-07-27 22:31 UTC (permalink / raw)
  To: chuck.lever; +Cc: J. Bruce Fields, Garrick Staples, nfs

On Friday July 27, chuck.lever@oracle.com wrote:
> 
> Though really, it does make sense to set -Wall for the whole package. 
> Would anyone mind if I sent a patch that did that?

I'd be keen on
   -Wall -Werror -Wstrict-prototypes

though I suspect we need a lot of cleanup before all of those can
pass, and we -Werror would have to be conditional on using the
internal rpcgen as the libc one generates code that produced warning.
I guess I really should try pushing those rpcgen fixes upstream to
glibc...

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-27 22:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 19:48 wonky autotools question Chuck Lever
2007-07-27 20:08 ` J. Bruce Fields
2007-07-27 20:17   ` Chuck Lever
2007-07-27 20:29     ` Garrick Staples
2007-07-27 21:41       ` Chuck Lever
2007-07-27 22:31         ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.