]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mkconfig: split the board make target to multiple config targets
authorWolfgang Denk <wd@denx.de>
Tue, 15 Sep 2009 20:12:31 +0000 (22:12 +0200)
committerTom Rix <Tom.Rix@windriver.com>
Sat, 3 Oct 2009 14:04:25 +0000 (09:04 -0500)
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>
mkconfig

index 9efd2fa7db067ed09fdf3a09c1d802f6c123ceef..4c5675bd3cca3eea89955f8d4feb49dd597d8463 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
 
 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