diff mbox

[U-Boot,V2,02/12] board: BuR: Move common headers to board-common directory

Message ID 1447393422-4169-3-git-send-email-nm@ti.com
State Rejected
Delegated to: Tom Rini
Headers show

Commit Message

Nishanth Menon Nov. 13, 2015, 5:43 a.m. UTC
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/BuR
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: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hannes Petermaier <oe5hpm@oevsv.at>
Cc: Hannes Schmelzer <hannes.schmelzer@br-automation.com>

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 board/BuR/common/common.c                                | 2 +-
 board/BuR/common/{ => include/board-common}/bur_common.h | 0
 board/BuR/kwb/board.c                                    | 2 +-
 board/BuR/tseries/board.c                                | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename board/BuR/common/{ => include/board-common}/bur_common.h (100%)
diff mbox

Patch

diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 441465c005ec..9ef7f3444758 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -31,7 +31,7 @@ 
 #ifdef CONFIG_USE_FDT
   #include <fdt_support.h>
 #endif
-#include "bur_common.h"
+#include <board-common/bur_common.h>
 #include "../../../drivers/video/am335x-fb.h"
 #include <nand.h>
 #include <fdt_simplefb.h>
diff --git a/board/BuR/common/bur_common.h b/board/BuR/common/include/board-common/bur_common.h
similarity index 100%
rename from board/BuR/common/bur_common.h
rename to board/BuR/common/include/board-common/bur_common.h
diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c
index 039ec207c26d..45b71a1ba811 100644
--- a/board/BuR/kwb/board.c
+++ b/board/BuR/kwb/board.c
@@ -25,7 +25,7 @@ 
 #include <asm/gpio.h>
 #include <i2c.h>
 #include <power/tps65217.h>
-#include "../common/bur_common.h"
+#include <board-common/bur_common.h>
 #include <lcd.h>
 
 /* -------------------------------------------------------------------------*/
diff --git a/board/BuR/tseries/board.c b/board/BuR/tseries/board.c
index bc119e69736e..8cd23aed52aa 100644
--- a/board/BuR/tseries/board.c
+++ b/board/BuR/tseries/board.c
@@ -26,7 +26,7 @@ 
 #include <asm/gpio.h>
 #include <i2c.h>
 #include <power/tps65217.h>
-#include "../common/bur_common.h"
+#include <board-common/bur_common.h>
 #include <lcd.h>
 #include <watchdog.h>