Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 85 lines (70 sloc) 2.061 kb
#!/bin/sh
. config/path
KCONFIG=build/config/Kconfig.flavours
cat > $KCONFIG <<EOF
############################################
# This file is autogenerated, do not edit! #
############################################
choice FLAVOUR
prompt "Flavour"
default FLAVOUR_geexbox
EOF
flavours=`ls -d config/flavours/* | sed s:config/flavours/:: | xargs`
for flavour in $flavours; do
# clear FLAVOUR_* variables
for var in `set | grep -E '^FLAVOUR_.*$' | cut -f1 -d=`; do
unset $var
done
. config/flavours/$flavour/meta
cat >> $KCONFIG <<EOF
config FLAVOUR_${FLAVOUR_NAME}
bool "${FLAVOUR_SHORTDESC}"
EOF
[ "$FLAVOUR_DEPENDS" = all ] && \
FLAVOUR_DEPENDS="`ls -d packages/* | sed s:packages/::`"
for pkg in $FLAVOUR_DEPENDS; do
echo " select PKG_${pkg}" >> $KCONFIG
done
for i in config/platforms/*; do
arch=`basename $i`
val=`valueof FLAVOUR_DEPENDS_${arch}`
[ -n "$val" ] && for pkg in $val; do
echo " select PKG_${pkg} if TARGET_ARCH_${arch}" >> $KCONFIG
done
for j in config/platforms/$arch/*; do
plat=`basename $j`
val=`valueof FLAVOUR_DEPENDS_${arch}_${plat}`
[ -n "$val" ] && for pkg in $val; do
echo " select PKG_${pkg} if TARGET_PLATFORM_${arch}_${plat}" >> $KCONFIG
done
done
done
cat >> $KCONFIG <<EOF
help
`echo "$FLAVOUR_LONGDESC" | fmt | sed 's/^/ /g'`
EOF
done
cat >> $KCONFIG <<EOF
endchoice
config OPT_FLAVOUR
string
EOF
for flavour in $flavours; do
echo " default \"${flavour}\" if FLAVOUR_${flavour}" >> $KCONFIG
done
for flavour in $flavours; do
unset FLAVOUR_KCONFIG
. config/flavours/$flavour/meta
[ -n "$FLAVOUR_KCONFIG" ] && echo "$FLAVOUR_KCONFIG" >> $KCONFIG
done
cat >> $KCONFIG <<EOF
config OPT_DISTRONAME
string "Distribution name"
EOF
for flavour in $flavours; do
unset FLAVOUR_DISTRONAME
. config/flavours/$flavour/meta
[ -z "$FLAVOUR_DISTRONAME" ] && continue
echo " default \"${FLAVOUR_DISTRONAME}\" if FLAVOUR_${FLAVOUR_NAME}" >> $KCONFIG
done
echo " default \"OpenBricks\"" >> $KCONFIG
Jump to Line
Something went wrong with that request. Please try again.