diff mbox

[V2,11/12] board: varisys: Move common headers to board-common directory

Message ID 1447393422-4169-12-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/varisys
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: Alison Wang <b18965@freescale.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>

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

---
 board/varisys/common/{ => include/board-common}/eeprom.h | 0
 board/varisys/common/sys_eeprom.c                        | 2 +-
 board/varisys/cyrus/cyrus.c                              | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename board/varisys/common/{ => include/board-common}/eeprom.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/varisys/common/eeprom.h b/board/varisys/common/include/board-common/eeprom.h
similarity index 100%
rename from board/varisys/common/eeprom.h
rename to board/varisys/common/include/board-common/eeprom.h
diff --git a/board/varisys/common/sys_eeprom.c b/board/varisys/common/sys_eeprom.c
index b55ab818e698..cee0bbcf0bfb 100644
--- a/board/varisys/common/sys_eeprom.c
+++ b/board/varisys/common/sys_eeprom.c
@@ -16,7 +16,7 @@ 
 #include <i2c.h>
 #include <linux/ctype.h>
 
-#include "eeprom.h"
+#include <board-common/eeprom.h>
 
 #ifdef CONFIG_SYS_I2C_EEPROM_NXID_MAC
 #define MAX_NUM_PORTS	CONFIG_SYS_I2C_EEPROM_NXID_MAC
diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index 79c363cf841a..6ce7814cb3b9 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -20,7 +20,7 @@ 
 #include <pci.h>
 
 #include "cyrus.h"
-#include "../common/eeprom.h"
+#include <board-common/eeprom.h>
 
 DECLARE_GLOBAL_DATA_PTR;