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	0	DEC609CD0E54B2448DAF023C89AE9755EB50C495@cosmail02.lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 5 Mar 2010 14:18:29 -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: <20100305141829.30813287@ripper.onstor.net>
In-Reply-To: <DEC609CD0E54B2448DAF023C89AE9755EB50C495@cosmail02.lsi.com>
References: <DEC609CD0E54B2448DAF023C89AE9755EB50C495@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 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




= 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:
= 

nfx-tree/Makefile.tuxstor

     line 57 rm -f can't fail, no need for -

     strange, it shows ".PHONY: all install" as having changed, but
     I don't see anything different about it


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


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...

     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) ?

     line 110, see first comment, this can all be done easier and
     clearer with $(obj)



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



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

nfx-tree/code/sm-scsi/Makefile

     line 5 yup, don't need it


nfx-tree/code/sm-thread/Makefile

     line 4 i wouldn't mind if you fixed this: NFX_TREE=($srctree)/../..


