[U-Boot] [PATCH V2 07/12] board: LaCie: Move common headers to board-common directory

Tom Rini trini at konsulko.com
Fri Nov 13 15:06:45 CET 2015


On Fri, Nov 13, 2015 at 11:30:43AM +0100, Simon Guinot wrote:
> Hi Nishanth,
> 
> On Thu, Nov 12, 2015 at 11:43:37PM -0600, Nishanth Menon wrote:
> > Header files can be located in a generic location without
> > needing to reference them with ../common/
> > 
> > Generated with the following script
> > 
> >  #!/bin/bash
> > vendor=board/LaCie
> > common=$vendor/common
> > 
> > cfiles=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep c$`
> > headers=`git grep "../common" $vendor|grep "#include"|cut -d '"' -f2|sort -u|grep h$`
> > 
> > mkdir -p $common/include/board-common
> > set -x
> > for header in $headers
> > do
> > 	echo "processing $header in $common"
> > 	hbase=`basename $header`
> > 	git mv $common/$hbase $common/include/board-common
> > 	sed -i -e "s/\"..\/common\/$hbase\"/<board-common\/$hbase>/g" $vendor/*/*.[chS]
> > 	sed -i -e "s/\"$hbase\"/<board-common\/$hbase>/g" $vendor/common/*.[chS]
> > done
> > 
> > Cc: Simon Guinot <simon.guinot at sequanux.org>
> > Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
> > 
> > Signed-off-by: Nishanth Menon <nm at ti.com>
> > ---
> >  board/LaCie/common/cpld-gpio-bus.c                            | 2 +-
> >  board/LaCie/common/{ => include/board-common}/common.h        | 0
> 
> Is that really a good idea to move a LaCie-specific file named common.h
> to a place shared with other boards ?
> 
> >  board/LaCie/common/{ => include/board-common}/cpld-gpio-bus.h | 0
> 
> IMO, this headers are specific to LaCie boards and it don't make much
> sense to move them to a shared place. Moreover it is quite convenient to
> have them close from the board setup files.
> 
> Please don't move them.

Please read and then suggest changes in the "Makefile: Include vendor
common library in include search path" thread.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151113/0a43981f/attachment.sig>


More information about the U-Boot mailing list