patch-1.3.36 linux/scripts/tkparse.c

Next file: linux/scripts/tkparse.h
Previous file: linux/scripts/tkgen.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.35/linux/scripts/tkparse.c linux/scripts/tkparse.c
@@ -26,6 +26,7 @@
 struct kconfig * clast = NULL;
 struct kconfig * koption = NULL;
 static int lineno = 0;
+static int menus_seen = 0;
 /*
  * Simple function just to skip over spaces and tabs in config.in.
  */
@@ -243,6 +244,7 @@
     }
   else if (strncmp(pnt, "mainmenu_option", 15) == 0) 
     {
+      menus_seen++;
       tok = tok_menuoption;
       pnt += 15;
     }
@@ -441,6 +443,12 @@
     }
 
 
+  if( menus_seen == 0 )
+    {
+      fprintf(stderr,"The config.in file for this platform does not support\n");
+      fprintf(stderr,"menus.\n");
+      exit(1);
+    }
   /*
    * Input file is now parsed.  Next we need to go through and attach
    * the correct conditions to each of the actual menu items and kill

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this