Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 75 lines (63 sloc) 2.193 kB
#!/bin/sh
. config/functions
. config/use
KCONFIG=build/config/Kconfig.use
cat > $KCONFIG <<EOF
############################################
# This file is autogenerated, do not edit! #
############################################
EOF
flags=`grep PKG_USE_SECTION config/use | grep -v PKG_USE_SECTION_DESC | grep -v PKG_USE_SECTION_KCONFIG | sed 's/^PKG_USE_SECTION_\([a-z0-9]*\)=.*$/\1/g' | xargs`
sections=`grep PKG_USE_SECTION_DESC config/use | sed 's/^PKG_USE_SECTION_DESC_\([a-z0-9]*\)=.*$/\1/g' | xargs`
flavours=`ls -d config/flavours/* | sed s:config/flavours/:: | xargs`
for section in $sections; do
cat >> $KCONFIG <<EOF
menu "`valueof PKG_USE_SECTION_DESC_${section}`"
EOF
for use in $flags; do
[ "`valueof PKG_USE_SECTION_${use}`" = "$section" ] || continue
cat >> $KCONFIG <<EOF
config USE_${use}
bool "`valueof PKG_USE_NAME_${use}`"
EOF
archs="`valueof PKG_USE_ARCH_${use}`"
if [ -n "$archs" ]; then
archlist=""
for arch in $archs; do
[ -n "$archlist" ] && archlist="$archlist || "
archlist="${archlist}TARGET_ARCH_${arch}"
platforms="`valueof PKG_USE_PLATFORM_${use}`"
if [ -n "$platforms" ]; then
platformlist=""
for platform in $platforms; do
[ -n "$platformlist" ] && platformlist="$platformlist || "
platformlist="${platformlist}TARGET_PLATFORM_${arch}_${platform}"
done
echo " depends on ( $platformlist )" >> $KCONFIG
fi
done
echo " depends on ( $archlist )" >> $KCONFIG
fi
pkgs="`valueof PKG_USE_DEPENDS_${use}`"
if [ -n "$pkgs" ]; then
for pkg in $pkgs; do
echo " select PKG_${pkg}" >> $KCONFIG
done
fi
for flavour in $flavours; do
unset FLAVOUR_USE
. config/flavours/$flavour/meta
[ "$FLAVOUR_USE" = all ] && FLAVOUR_USE="$flags"
for useflavour in $FLAVOUR_USE; do
[ "$useflavour" = "$use" ] || continue
echo " default y if FLAVOUR_${flavour}" >> $KCONFIG
done
done
echo " default n" >> $KCONFIG
echo >> $KCONFIG
done
cat >> $KCONFIG <<EOF
`valueof PKG_USE_SECTION_KCONFIG_${section}`
endmenu
EOF
done
Jump to Line
Something went wrong with that request. Please try again.