summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-09-15 22:12:31 +0200
committerWolfgang Denk <wd@denx.de>2009-09-15 22:14:18 +0200
commit804d83a563c47b55e1f14f5de3b6e9d7e2a7ef5e (patch)
treee92b01cd4d8ea37aaf835b60434d2be0537a80e4
parent041a6a0c2ea8cd4039c34c5eeaf54b188c89b892 (diff)
downloadbootable_bootloader_goldelico_gta04-804d83a563c47b55e1f14f5de3b6e9d7e2a7ef5e.zip
bootable_bootloader_goldelico_gta04-804d83a563c47b55e1f14f5de3b6e9d7e2a7ef5e.tar.gz
bootable_bootloader_goldelico_gta04-804d83a563c47b55e1f14f5de3b6e9d7e2a7ef5e.tar.bz2
mkconfig: split the board make target to multiple config targets
To simplify the top level makefile it useful to be able to parse the top level makefile target to multiple individual target, then put them to the config.h, leave the board config file to handle the different targets. Note that this method uses the '_'(underline) as the delimiter when splits the board make target. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> This also reverts commit 511c02f611cb5afa1b8ca5980caaaabaa0de377f. Signed-off-by: Wolfgang Denk <wd@denx.de>
-rwxr-xr-xmkconfig8
1 files changed, 7 insertions, 1 deletions
diff --git a/mkconfig b/mkconfig
index 9efd2fa..4c5675b 100755
--- a/mkconfig
+++ b/mkconfig
@@ -10,12 +10,14 @@
APPEND=no # Default: Create new config file
BOARD_NAME="" # Name to print in make output
+TARGETS=""
while [ $# -gt 0 ] ; do
case "$1" in
--) shift ; break ;;
-a) shift ; APPEND=yes ;;
-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
+ -t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
*) break ;;
esac
done
@@ -82,7 +84,11 @@ else
> config.h # Create new config file
fi
echo "/* Automatically generated - do not edit */" >>config.h
-echo "#define CONFIG_MK_${BOARD_NAME} 1" >>config.h
+
+for i in ${TARGETS} ; do
+ echo "#define CONFIG_MK_${i} 1" >>config.h ;
+done
+
echo "#include <configs/$1.h>" >>config.h
echo "#include <asm/config.h>" >>config.h