AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Larry.Scheer@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	15567	DEC609CD0E54B2448DAF023C89AE9755EB50C49D@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 8 Mar 2010 15:59:08 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Scheer, Larry" <Larry.Scheer@lsi.com>
Subject: Re: Please review change 34728 -- fixes nightly build
Message-ID: <20100308155908.47810e4d@ripper.onstor.net>
In-Reply-To: <DEC609CD0E54B2448DAF023C89AE9755EB50C49D@cosmail02.lsi.com>
References: <DEC609CD0E54B2448DAF023C89AE9755EB50C495@cosmail02.lsi.com>
 <20100305141829.30813287@ripper.onstor.net>
 <DEC609CD0E54B2448DAF023C89AE9755EB50C49D@cosmail02.lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Fri, 5 Mar 2010 17:47:18 -0700 "Scheer, Larry"
<Larry.Scheer@lsi.com> wrote:

> Response inline below...
> ________________________________________
> From: Andrew Sharp [andy.sharp@lsi.com]
> Sent: Friday, March 05, 2010 2:18 PM
> To: Scheer, Larry
> Subject: Re: Please review change 34728 -- fixes nightly build
> 
> On Wed, 3 Mar 2010 20:24:54 -0700 "Scheer, Larry"
> <Larry.Scheer@lsi.com> wrote:
> 
> > Andy,
> >     I think this time I have the fix for the nightly build.
> > It wasn't enough just to add the generated sources to the extra-y
> > definition. The rules for creating the generated sources from
> > the .sm fiiles were inconsistent in the makefiles. Once I started
> > looking at them it was a wonder they even worked as well as they
> > did. There were other problems hiding in the makefiles as well. I
> > think this change will fix most of the problems.
> >
> > I just ran a test of the nightly build with these changes and it
> > completed successfully.
> >
> > Larry
> >
> > Change 34728 by larrys@larrys on 2010/03/02 14:33:10 *pending*
> >
> >         Some makefiles were missing rule for generating .c files
> > from .sm source. Add generic rule to make .c and .h files from .sm
> > files. Remove duplicate code from makefiles.
> >         Fix broken dependency rules.
> >         Add additional modules to clean target in Makefile.tuxstor.
> >         Also add removal of Module.symvers in the code when make
> > clean is run. Reviewed by:
> >
> > Affected files ...
> >
> > ... //depot/tuxrx/nfx-tree/Makefile.tuxstor#14 edit
> > ... //depot/tuxrx/nfx-tree/Tools/smrules.mk#1 add
> > ... //depot/tuxrx/nfx-tree/code/sm-file/Makefile#4 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-fs/Makefile#9 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-ndmp/Makefile#3 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-sanm-agent/Makefile#3 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-sanm-dm/Makefile#3 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-scsi/Makefile#6 edit
> > ... //depot/tuxrx/nfx-tree/code/sm-thread/Makefile#4 edit
> 
> 
> 
> = Change 34728 by larrys@larrys on 2010/03/02 14:33:10 *pending*
> =
> =       Some makefiles were missing rule for generating .c files
> from .sm source. =       Add generic rule to make .c and .h files
> from .sm files. =       Remove duplicate code from makefiles. <-tws
> =       Fix broken dependency rules.
> =       Add additional modules to clean target in Makefile.tuxstor.
> =       Also add removal of Module.symvers in the code when make
> clean is run. =       Reviewed by:
> =
> 
> 
> see tws above
> [lcs] tws? The white space? Dunno when I view the change with p4
> change it is all fine. Maybe a mailtool glitch?

the string "<-tws" is pointing directly at the Trailing White Space


> nfx-tree/Makefile.tuxstor
> 
>      line 57 rm -f can't fail, no need for -
> [lcs] Fixed.
> 
>      strange, it shows ".PHONY: all install" as having changed, but
>      I don't see anything different about it
> 
> [lcs] Ah, yes. Somehow when this file was last checked in it was
> missing the last line terminator.  VI fixed that.

ah yes

> nfx-tree/Tools/smrules.mk
> 
>      >>add nfx-tree/Tools/smrules.mk
> 
>         what is the epitomology of the name smrules.mk, and why,
>         10,000 years from now, will I guess that that is the name
>         of the file that contains what this file contains?
> 
>         Yes, I plan to live that long.
> 
>         Can you pick a more meaningful, intuitive name?  Somethat
>         screams "linux kernel", and "generated code rules".
>         you are allowd 3 characters only.  i kid.  about the
>         3 characters.
> 
>         Please add some comments at the top which explain what
>         this file is for and what's in it.
> 
>         line 3, what does notdir do?  i don't want to know,
>         but maybe 10,000 years from now you might want to know.
>         in other words, put it in the comments ~:^)
> 
>         line 10, comment about where SRCS_SM might be set, and what
>         the contents of it mean.  actually, perhaps the places
>         where this is included should test for that variable to
>         decide whether to include this file, then the ifneq...endif
>         lines can be eliminated, making it a bit easier to read.
> 
>         line 23, 26 can we make the cd foo part invisible, but
>         the perl ... part visible?  like @cd $(@D) && perl ...
> 
>      in general, i like your approach here, it's good code reuse,
>      good makefile design
> 
> [lcs] added comments at top of file and implemented your suggestions
> take another look.

looks good

> nfx-tree/code/sm-file/Makefile
> 
>      looks good
> 
> nfx-tree/code/sm-fs/Makefile
> 
>      line 6, what's wrong with $(obj)?  i don't see the need for an
>      extra variable...
> [lcs] Speed improvement the dir function is only called once versus 3
> times.

say wha?  readability is more important than an unmeasureable speed
improvement on X86 hardware

>      line 91, nice, i should have pushed back on Max's original
> version. but honestly, at the time, i was so thrilled he was making
> headway, i didn't want to slow him down.
> 
>      line 107 why the extra space before $(GENREQ) ?
> [lcs] Unintentional.. fixed.
>      line 110, see first comment, this can all be done easier and
>      clearer with $(obj)
> [lcs] see previous reason.

ok

> nfx-tree/code/sm-ndmp/Makefile
> 
>      line 29, this sure looks odd, do you know why this is?  how can
>      ndmp-data-sm.o depend on ndmp-mover-sm.c unless it includes it?
>      perhaps this should be ndmp_mod.o instead of ndmp-data-sm.o
> 
> [lcs] I think this was a mistake. I removed the line. If it had a
> purpose it would be some strange trick to make the parallel build
> wait. Max had it in the original file and I just changed NFX_TREE to
> obj.

ok

> nfx-tree/code/sm-sanm-agent/Makefile
> 
>      looks good
> 
> nfx-tree/code/sm-sanm-dm/Makefile
> 
>      line 21 i didn't notice this in the other files, but this
> pertains to previous files as well: this is not quite right -- if this
>      file (sanm-dm-sm.h) is included in those files, then kbuild will
>      generate these dependency rules for you. you only need to say
>      that sanm-dm-sm.h depends on sanm-dm-sm.sm, which i believe is
>      covered in smrules.mk.  or it should be.
> 
>      line 23 same goes here -- this is covered by line 14
> 
> [lcs] I think these dependencies may be needed to cause a  parallel
> make to wait until the file is generated before using it. I will need
> to retest everything without them. In the other Makefiles the
> dependency was there in many places because there were hidden
> dependencies on the file and the build would fail because the file
> was not generated before it was referenced.

i'll have to trust you on that

> nfx-tree/code/sm-scsi/Makefile
> 
>      line 5 yup, don't need it
> [lcs] removed it

excellent

> nfx-tree/code/sm-thread/Makefile
> 
>      line 4 i wouldn't mind if you fixed this:
> NFX_TREE=($srctree)/../.. [lcs] maybe in my next go around. It is
> working for now and requires some thought as to how to make it
> better. I just want to drain this swamp before I tackle that one.

ok.  but not much thought needed:

NFX_TREE=($srctree)/../..

is the name as

NFX_TREE=($srctree)/../../../nfx-tree

