Re: make menuconfig
I am not subscribed to this lists!
Hi,
I had the same the problem until I tracked it down.
It looks like there is a bug in the Menuconfig Script
(kernel-source-2.4.18/scripts/Menuconfig),
precisely in the function 'callawk'. Try to replace "$1" with "$*" in
function callawk(). It helped me.
Here is a 'diff -u Menuconfig.orig Menuconfig':
------------------------------- snip
----------------------------------------------------------
/usr/srckernel-source-2.4.18/scripts # diff -u Menuconfig.orig Menuconfig
--- Menuconfig.orig Sat Sep 7 20:17:45 2002
+++ Menuconfig Fri Aug 30 00:29:19 2002
@@ -694,7 +694,7 @@
# Call awk, and watch for error codes, etc.
#
function callawk () {
-awk "$1" || echo "Awk died with error code $?. Giving up." || exit 1
+awk "$*" || echo "Awk died with error code $?. Giving up." || exit 1
}
#
-------------------------------- snap
------------------------------------------------------
My analysis:
The function callawk() is called out of the function parser1() with more
then one arguments.
As you can see, the argument should be 1 string from lineno 705 up to
746, but is intersected in
many more becauce of many hyphens "'".
------------------------------- snip
----------------------------------------------------------
700 #
701 # A faster awk based recursive parser. (I hope)
702 #
703 function parser1 () {
704 callawk '
705 BEGIN {
706 menu_no = 0
707 comment_is_option = 0
708 parser("'$CONFIG_IN'","MCmenu0")
709 }
710
711 function parser(ifile,menu) {
712
713 while (getline <ifile) {
714 if ($1 == "mainmenu_option") {
715 comment_is_option = "1"
716 }
717 else if ($1 == "comment" && comment_is_option == "1") {
718 comment_is_option= "0"
719 sub($1,"",$0)
720 ++menu_no
721
722 printf("submenu %s MCmenu%s\n", $0, menu_no)
>>menu
723
724 newmenu = sprintf("MCmenu%d", menu_no);
725 printf( "function MCmenu%s () {\n"\
726 "default=$1\n"\
727 "menu_name %s\n",\
728 menu_no, $0) >newmenu
729
730 parser(ifile, newmenu)
731 }
732 else if ($0 ~ /^#|\$MAKE|mainmenu_name/) {
733 printf("") >>menu
734 }
735 else if ($1 ~ "endmenu") {
736 printf("}\n") >>menu
737 return
738 }
739 else if ($1 == "source") {
740 parser($2,menu)
741 }
742 else {
743 print >>menu
744 }
745 }
746 }'
747 }
-------------------------------- snap
------------------------------------------------------
If I am not wrong I wonder wy nobody noticed this since Menuconfig is
dated back years before.
If I had more experience with mailing list, I would report to kernel.org
also. Maybe somebody else could do this?
Tamas
Reply to: