From: Marek Vasut Date: Sun, 3 Oct 2010 18:34:32 +0200 Subject: [U-Boot] [PATCH 1/3] Build: Implement sentinel to pass board options Message-ID: <1286123674-13461-1-git-send-email-marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de With this implementation, the sentinel character in TARGET name is interpreted as an option and expanded to CONFIG_MK_xxx. Signed-off-by: Marek Vasut --- boards.cfg | 1 + mkconfig | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/boards.cfg b/boards.cfg index 62bcca8..96c8890 100644 --- a/boards.cfg +++ b/boards.cfg @@ -12,6 +12,7 @@ # # Lines starting with '#' are comments. # Blank lines are ignored. +# Sentinel is used to specify board options. # # To keep the list sorted, use something like # diff --git a/mkconfig b/mkconfig index b661071..62d6bd6 100755 --- a/mkconfig +++ b/mkconfig @@ -43,7 +43,10 @@ done [ $# -lt 4 ] && exit 1 [ $# -gt 6 ] && exit 1 -CONFIG_NAME="${1%_config}" +# The sentinel is used to define board options +TARGETS="`echo $1 | sed "s/^[^@]*@//" | sed 's:@: :g'` ${TARGETS}" + +CONFIG_NAME="`echo ${1%_config} | sed 's/@.*$//g'`" [ "${BOARD_NAME}" ] || BOARD_NAME="${CONFIG_NAME}" @@ -52,7 +55,7 @@ cpu="$3" if [ "$4" = "-" ] ; then board=${BOARD_NAME} else - board="$4" + board="`echo $1 | sed 's/@.*$//g'`" fi [ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5" [ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6" -- 1.7.1