diff mbox

[V2,05/12] board: gdsys: Move common headers to board-common directory

Message ID 1447393422-4169-6-git-send-email-nm@ti.com
State New
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/gdsys
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: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <eibach@gdsys.de>

Signed-off-by: Nishanth Menon <nm@ti.com>

---
 board/gdsys/405ep/dlvision-10g.c                       | 2 +-
 board/gdsys/405ep/iocon.c                              | 6 +++---
 board/gdsys/common/{ => include/board-common}/dp501.h  | 0
 board/gdsys/common/{ => include/board-common}/mclink.h | 0
 board/gdsys/common/{ => include/board-common}/osd.h    | 0
 board/gdsys/common/{ => include/board-common}/phy.h    | 0
 board/gdsys/common/osd.c                               | 2 +-
 board/gdsys/mpc8308/hrcon.c                            | 6 +++---
 board/gdsys/p1022/controlcenterd.c                     | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)
 rename board/gdsys/common/{ => include/board-common}/dp501.h (100%)
 rename board/gdsys/common/{ => include/board-common}/mclink.h (100%)
 rename board/gdsys/common/{ => include/board-common}/osd.h (100%)
 rename board/gdsys/common/{ => include/board-common}/phy.h (100%)

-- 
2.6.2.402.g2635c2b
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/board/gdsys/405ep/dlvision-10g.c b/board/gdsys/405ep/dlvision-10g.c
index 35dfbbc577aa..c8eed0aacd90 100644
--- a/board/gdsys/405ep/dlvision-10g.c
+++ b/board/gdsys/405ep/dlvision-10g.c
@@ -15,7 +15,7 @@ 
 #include "405ep.h"
 #include <gdsys_fpga.h>
 
-#include "../common/osd.h"
+#include <board-common/osd.h>
 
 #define LATCH0_BASE (CONFIG_SYS_LATCH_BASE)
 #define LATCH1_BASE (CONFIG_SYS_LATCH_BASE + 0x100)
diff --git a/board/gdsys/405ep/iocon.c b/board/gdsys/405ep/iocon.c
index 3a51d864cdb1..04799769b353 100644
--- a/board/gdsys/405ep/iocon.c
+++ b/board/gdsys/405ep/iocon.c
@@ -15,9 +15,9 @@ 
 #include "405ep.h"
 #include <gdsys_fpga.h>
 
-#include "../common/osd.h"
-#include "../common/mclink.h"
-#include "../common/phy.h"
+#include <board-common/osd.h>
+#include <board-common/mclink.h>
+#include <board-common/phy.h>
 
 #include <i2c.h>
 #include <pca953x.h>
diff --git a/board/gdsys/common/dp501.h b/board/gdsys/common/include/board-common/dp501.h
similarity index 100%
rename from board/gdsys/common/dp501.h
rename to board/gdsys/common/include/board-common/dp501.h
diff --git a/board/gdsys/common/mclink.h b/board/gdsys/common/include/board-common/mclink.h
similarity index 100%
rename from board/gdsys/common/mclink.h
rename to board/gdsys/common/include/board-common/mclink.h
diff --git a/board/gdsys/common/osd.h b/board/gdsys/common/include/board-common/osd.h
similarity index 100%
rename from board/gdsys/common/osd.h
rename to board/gdsys/common/include/board-common/osd.h
diff --git a/board/gdsys/common/phy.h b/board/gdsys/common/include/board-common/phy.h
similarity index 100%
rename from board/gdsys/common/phy.h
rename to board/gdsys/common/include/board-common/phy.h
diff --git a/board/gdsys/common/osd.c b/board/gdsys/common/osd.c
index 55ecdf10127e..f528a40e0c41 100644
--- a/board/gdsys/common/osd.c
+++ b/board/gdsys/common/osd.c
@@ -9,7 +9,7 @@ 
 #include <i2c.h>
 #include <malloc.h>
 
-#include "dp501.h"
+#include <board-common/dp501.h>
 #include <gdsys_fpga.h>
 
 #define CH7301_I2C_ADDR 0x75
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index e4434b3b6b71..3cbef71d5503 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -22,9 +22,9 @@ 
 
 #include <gdsys_fpga.h>
 
-#include "../common/osd.h"
-#include "../common/mclink.h"
-#include "../common/phy.h"
+#include <board-common/osd.h>
+#include <board-common/mclink.h>
+#include <board-common/phy.h>
 
 #include <pca953x.h>
 #include <pca9698.h>
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 64d90dd3fde0..2b1d8bafc51f 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -41,7 +41,7 @@ 
 #include <i2c.h>
 #include <pca9698.h>
 #include <watchdog.h>
-#include "../common/dp501.h"
+#include <board-common/dp501.h>
 #include "controlcenterd-id.h"
 
 DECLARE_GLOBAL_DATA_PTR;