scummvm random work
[patches.git] / uclinux-search-LINUXDIR-for-defconfig.patch
1 --- uClinux-dist/config/setconfig
2 +++ uClinux-dist/config/setconfig
3 @@ -225,17 +225,23 @@
4
5 if [ ! -f $LINUXDIR/.config ] || var_isset CONFIG_DEFAULTS_OVERRIDE; then
6 if [ ! -f "vendors/$VENDOR/$PRODUCT/config.$LINUXDIR" ]; then
7 - echo; echo; echo; echo
8 - echo "*********************** NOTICE ****************************"
9 - echo "There is no preset config for $LINUXDIR on platform $VENDOR/$PRODUCT."
10 - echo "If you choose to continue you will have to setup a linux"
11 - echo "config from scratch which is a very complex task."
12 - echo "You will find it easier if you can copy a config.$LINUXDIR"
13 - echo "from another platform that is similar."
14 - echo
15 - echo "If you know what you are doing press <ENTER> otherwise"
16 - echo "Type ^C to abort."
17 - read dummy
18 + ARCH=$(echo -e "e:\\n\\t@echo \$(ARCH)\\ninclude config.arch" | \
19 + ROOTDIR=$PWD make --no-print-directory -s -f - 2>/dev/null)
20 + if [ ! -f "$LINUXDIR/arch/$ARCH/configs/${PRODUCT}_defconfig" ]; then
21 + echo; echo; echo; echo
22 + echo "*********************** NOTICE ****************************"
23 + echo "There is no preset config for $LINUXDIR on platform $VENDOR/$PRODUCT."
24 + echo "If you choose to continue you will have to setup a linux"
25 + echo "config from scratch which is a very complex task."
26 + echo "You will find it easier if you can copy a config.$LINUXDIR"
27 + echo "from another platform that is similar."
28 + echo
29 + echo "If you know what you are doing press <ENTER> otherwise"
30 + echo "Type ^C to abort."
31 + read dummy
32 + else
33 + cp "$LINUXDIR/arch/$ARCH/configs/${PRODUCT}_defconfig" $LINUXDIR/.config
34 + fi
35 else
36 cp "vendors/$VENDOR/$PRODUCT/config.$LINUXDIR" $LINUXDIR/.config
37 fi