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

Nishanth Menon nm at ti.com
Fri Nov 13 06:43:42 CET 2015


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/xes
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: Peter Tyser <ptyser at xes-inc.com>

Signed-off-by: Nishanth Menon <nm at ti.com>
---
 board/xes/common/board.c                                    | 2 +-
 board/xes/common/{ => include/board-common}/fsl_8xxx_misc.h | 0
 board/xes/xpedite517x/xpedite517x.c                         | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename board/xes/common/{ => include/board-common}/fsl_8xxx_misc.h (100%)

diff --git a/board/xes/common/board.c b/board/xes/common/board.c
index 4ed6f50e5cf8..ca156e60bec0 100644
--- a/board/xes/common/board.c
+++ b/board/xes/common/board.c
@@ -5,7 +5,7 @@
  */
 
 #include <common.h>
-#include "fsl_8xxx_misc.h"
+#include <board-common/fsl_8xxx_misc.h>
 
 int checkboard(void)
 {
diff --git a/board/xes/common/fsl_8xxx_misc.h b/board/xes/common/include/board-common/fsl_8xxx_misc.h
similarity index 100%
rename from board/xes/common/fsl_8xxx_misc.h
rename to board/xes/common/include/board-common/fsl_8xxx_misc.h
diff --git a/board/xes/xpedite517x/xpedite517x.c b/board/xes/xpedite517x/xpedite517x.c
index 0028870db077..38c25ccf46b9 100644
--- a/board/xes/xpedite517x/xpedite517x.c
+++ b/board/xes/xpedite517x/xpedite517x.c
@@ -11,7 +11,7 @@
 #include <asm/io.h>
 #include <fdt_support.h>
 #include <pca953x.h>
-#include "../common/fsl_8xxx_misc.h"
+#include <board-common/fsl_8xxx_misc.h>
 
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_PCI)
 extern void ft_board_pci_setup(void *blob, bd_t *bd);
-- 
2.6.2.402.g2635c2b


More information about the U-Boot mailing list