mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-01-10 12:18:55 +00:00
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 511c02f611
.
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
9ef45c847a
commit
3c0dbdbd22
1 changed files with 7 additions and 1 deletions
8
mkconfig
8
mkconfig
|
@ -10,12 +10,14 @@
|
||||||
|
|
||||||
APPEND=no # Default: Create new config file
|
APPEND=no # Default: Create new config file
|
||||||
BOARD_NAME="" # Name to print in make output
|
BOARD_NAME="" # Name to print in make output
|
||||||
|
TARGETS=""
|
||||||
|
|
||||||
while [ $# -gt 0 ] ; do
|
while [ $# -gt 0 ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--) shift ; break ;;
|
--) shift ; break ;;
|
||||||
-a) shift ; APPEND=yes ;;
|
-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 ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -82,7 +84,11 @@ else
|
||||||
> config.h # Create new config file
|
> config.h # Create new config file
|
||||||
fi
|
fi
|
||||||
echo "/* Automatically generated - do not edit */" >>config.h
|
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 <configs/$1.h>" >>config.h
|
||||||
echo "#include <asm/config.h>" >>config.h
|
echo "#include <asm/config.h>" >>config.h
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue