summaryrefslogtreecommitdiff
path: root/mkconfig
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-05-27 23:18:34 +0200
committerWolfgang Denk <wd@denx.de>2010-06-13 18:08:18 +0200
commited7a196cd5c92fb9ed2d503feb96360a029f37bd (patch)
treefec113c04f99601c3606208133509eeb605dbe95 /mkconfig
parent0e42ada3107709149b708f6ddc3ad7d9b9017fbb (diff)
Makefile: simplify handling of build target names
Instead of stripping the "_config" part from the make target names in each call of the "mkconfig" script let this script strip the string. This prepares the ground for forther simplification of the top level Makefile. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'mkconfig')
-rwxr-xr-xmkconfig6
1 files changed, 3 insertions, 3 deletions
diff --git a/mkconfig b/mkconfig
index d3109e412c4..a71d09e95c5 100755
--- a/mkconfig
+++ b/mkconfig
@@ -16,13 +16,13 @@ while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
- -n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
+ -n) shift ; BOARD_NAME="${1%_config}" ; shift ;;
-t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
*) break ;;
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 <config_defaults.h>
-#include <configs/$1.h>
+#include <configs/${BOARDNAME}.h>
#include <asm/config.h>
EOF