From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 19 May 2010 19:40:42 -0400 Subject: [U-Boot] [PATCH 2/3] Makefile: simplify handling of build target names In-Reply-To: <1273970133-10228-3-git-send-email-wd@denx.de> References: <1273970133-10228-1-git-send-email-wd@denx.de> <1273970133-10228-3-git-send-email-wd@denx.de> Message-ID: <201005191940.43513.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday 15 May 2010 20:35:32 Wolfgang Denk wrote: > --- a/mkconfig > +++ b/mkconfig > @@ -22,7 +22,7 @@ while [ $# -gt 0 ] ; do > esac > done > > -[ "${BOARD_NAME}" ] || BOARD_NAME="$1" > +[ "${BOARD_NAME}" ] || BOARD_NAME="${1%%_config}" > > [ $# -lt 4 ] && exit 1 > [ $# -gt 6 ] && exit 1 > @@ -102,7 +102,7 @@ done > cat << EOF >> config.h > #define CONFIG_BOARDDIR board/$BOARDDIR > #include > -#include > +#include > #include > EOF it isnt harmful, but using %% when there are no glob patterns doesnt make sense. so typically the code would be ${1%_config}. or even better, create a new variable up front set to ${1%_config} and use that later on instead of duplicating the same replacement construct multiple times. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20100519/66cf19f3/attachment.pgp