public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 08/12] board: mpl: Move common headers to board-common directory
Date: Thu, 12 Nov 2015 23:43:38 -0600	[thread overview]
Message-ID: <1447393422-4169-9-git-send-email-nm@ti.com> (raw)
In-Reply-To: <1447393422-4169-1-git-send-email-nm@ti.com>

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/mpl
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: Bin Meng <bmeng.cn@gmail.com>
Cc: "David M?ller" <d.mueller@elsoft.ch>
Cc: Denis Peter <d.peter@mpl.ch>

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 board/mpl/common/common_util.c                            | 2 +-
 board/mpl/common/{ => include/board-common}/common_util.h | 0
 board/mpl/common/{ => include/board-common}/isa.h         | 0
 board/mpl/common/isa.c                                    | 2 +-
 board/mpl/common/kbd.c                                    | 2 +-
 board/mpl/common/pci.c                                    | 2 +-
 board/mpl/mip405/cmd_mip405.c                             | 2 +-
 board/mpl/mip405/mip405.c                                 | 2 +-
 board/mpl/pip405/cmd_pip405.c                             | 2 +-
 board/mpl/pip405/pip405.c                                 | 4 ++--
 board/mpl/vcma9/cmd_vcma9.c                               | 2 +-
 board/mpl/vcma9/vcma9.c                                   | 2 +-
 12 files changed, 11 insertions(+), 11 deletions(-)
 rename board/mpl/common/{ => include/board-common}/common_util.h (100%)
 rename board/mpl/common/{ => include/board-common}/isa.h (100%)

diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index 6b96bd526e80..5626ecdf8b48 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <video_fb.h>
-#include "common_util.h"
+#include <board-common/common_util.h>
 #include <asm/processor.h>
 #include <asm/byteorder.h>
 #include <i2c.h>
diff --git a/board/mpl/common/common_util.h b/board/mpl/common/include/board-common/common_util.h
similarity index 100%
rename from board/mpl/common/common_util.h
rename to board/mpl/common/include/board-common/common_util.h
diff --git a/board/mpl/common/isa.h b/board/mpl/common/include/board-common/isa.h
similarity index 100%
rename from board/mpl/common/isa.h
rename to board/mpl/common/include/board-common/isa.h
diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c
index 54ec66bd45b0..83628bba5d58 100644
--- a/board/mpl/common/isa.c
+++ b/board/mpl/common/isa.c
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/processor.h>
 #include <stdio_dev.h>
-#include "isa.h"
+#include <board-common/isa.h>
 #include "piix4_pci.h"
 #include "kbd.h"
 #include "video.h"
diff --git a/board/mpl/common/kbd.c b/board/mpl/common/kbd.c
index 1da72c53989c..cdcee1907dca 100644
--- a/board/mpl/common/kbd.c
+++ b/board/mpl/common/kbd.c
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/processor.h>
 #include <stdio_dev.h>
-#include "isa.h"
+#include <board-common/isa.h>
 #include "kbd.h"
 
 
diff --git a/board/mpl/common/pci.c b/board/mpl/common/pci.c
index cd969cb5182d..ff1822d1cc6f 100644
--- a/board/mpl/common/pci.c
+++ b/board/mpl/common/pci.c
@@ -10,7 +10,7 @@
 
 #include <common.h>
 #include <pci.h>
-#include "isa.h"
+#include <board-common/isa.h>
 
 #ifdef CONFIG_405GP
 #ifdef CONFIG_PCI
diff --git a/board/mpl/mip405/cmd_mip405.c b/board/mpl/mip405/cmd_mip405.c
index ca6f0affe48f..d71e6dbd3fbc 100644
--- a/board/mpl/mip405/cmd_mip405.c
+++ b/board/mpl/mip405/cmd_mip405.c
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include "mip405.h"
-#include "../common/common_util.h"
+#include <board-common/common_util.h>
 
 
 extern void print_mip405_info(void);
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index 4a0d6966a6fa..e762f57ea1a1 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -51,7 +51,7 @@
 #include <asm/ppc4xx.h>
 #include <asm/ppc4xx-i2c.h>
 #include <miiphy.h>
-#include "../common/common_util.h"
+#include <board-common/common_util.h>
 #include <stdio_dev.h>
 #include <i2c.h>
 #include <rtc.h>
diff --git a/board/mpl/pip405/cmd_pip405.c b/board/mpl/pip405/cmd_pip405.c
index 43b182e57ebb..5a6e49ef07dd 100644
--- a/board/mpl/pip405/cmd_pip405.c
+++ b/board/mpl/pip405/cmd_pip405.c
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <command.h>
 #include "pip405.h"
-#include "../common/common_util.h"
+#include <board-common/common_util.h>
 
 
 extern void print_pip405_info(void);
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 7c7690ff555b..e46e8be9d9dd 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -12,8 +12,8 @@
 #include <asm/processor.h>
 #include <i2c.h>
 #include <stdio_dev.h>
-#include "../common/isa.h"
-#include "../common/common_util.h"
+#include <board-common/isa.h>
+#include <board-common/common_util.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/board/mpl/vcma9/cmd_vcma9.c b/board/mpl/vcma9/cmd_vcma9.c
index c2d62e4aaf4b..c70ae90e0b06 100644
--- a/board/mpl/vcma9/cmd_vcma9.c
+++ b/board/mpl/vcma9/cmd_vcma9.c
@@ -12,7 +12,7 @@
 #include <command.h>
 #include <net.h>
 #include "vcma9.h"
-#include "../common/common_util.h"
+#include <board-common/common_util.h>
 
 #if defined(CONFIG_CS8900)
 #include <../drivers/net/cs8900.h>
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index 43a3d47d2b03..2ddba0539837 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -16,7 +16,7 @@
 #include <asm/arch/s3c24x0_cpu.h>
 
 #include "vcma9.h"
-#include "../common/common_util.h"
+#include <board-common/common_util.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-- 
2.6.2.402.g2635c2b

  parent reply	other threads:[~2015-11-13  5:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  5:43 [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 01/12] Makefile: Include vendor common library in include search path Nishanth Menon
2015-11-15 14:45   ` Igor Grinberg
2015-11-13  5:43 ` [U-Boot] [PATCH V2 02/12] board: BuR: Move common headers to board-common directory Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 03/12] board: compulab: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 05/12] board: gdsys: " Nishanth Menon
2015-11-16  8:01   ` Dirk Eibach
2015-11-16  8:04     ` Dirk Eibach
2015-11-13  5:43 ` [U-Boot] [PATCH V2 06/12] board: keymile: " Nishanth Menon
2015-11-18 13:58   ` Valentin Longchamp
2015-11-13  5:43 ` [U-Boot] [PATCH V2 07/12] board: LaCie: " Nishanth Menon
2015-11-13 10:30   ` Simon Guinot
2015-11-13 14:06     ` Tom Rini
2015-11-13 15:32       ` Simon Guinot
2015-11-13 23:57         ` Nishanth Menon
2015-11-14  2:05           ` Simon Glass
2015-11-16  1:53             ` Tom Rini
2015-11-14 23:56   ` Masahiro Yamada
2015-11-15  5:38     ` Nishanth Menon
2015-11-16  3:32       ` Masahiro Yamada
2015-11-16 15:34         ` Nishanth Menon
2015-11-17  0:45           ` Tom Rini
2015-11-13  5:43 ` Nishanth Menon [this message]
2015-11-13  8:19   ` [U-Boot] [PATCH V2 08/12] board: mpl: " David Müller (ELSOFT AG)
2015-11-13 14:02     ` Tom Rini
2015-11-13  5:43 ` [U-Boot] [PATCH V2 09/12] board: seco: " Nishanth Menon
2015-11-13  5:43 ` [U-Boot] [PATCH V2 10/12] board: siemens: " Nishanth Menon
2015-11-16  9:17   ` Egli, Samuel
2015-11-13  5:43 ` [U-Boot] [PATCH V2 11/12] board: varisys: " Nishanth Menon
2015-11-16  7:42   ` Andy Fleming
2015-11-13  5:43 ` [U-Boot] [PATCH V2 12/12] board: xes: " Nishanth Menon
2015-11-13  5:51 ` [U-Boot] [PATCH RESEND V2 04/12] board: freescale: " Nishanth Menon
2015-12-19 23:07 ` [U-Boot] [PATCH V2 00/12] Series to move headers to a consistent include location Simon Glass
2015-12-20  0:25   ` Nishanth Menon
2015-12-28  4:22     ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447393422-4169-9-git-send-email-nm@ti.com \
    --to=nm@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox