Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/scripts/kconfig
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- Location:
- branches/2.2.9/mindi-busybox/scripts/kconfig
- Files:
-
- 3 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/scripts/kconfig/Makefile
r1765 r2725 18 18 $< Config.in 19 19 20 # Mtime granularity problem. 21 # It was observed that these commands: 22 # make allnoconfig; sed -i -e '/CONFIG_TRUE/s/.*/CONFIG_TRUE=y/' .config; make 23 # sometimes produce busybox with "true" applet still disabled. 24 # This is caused by .config updated by sed having mtime which is still 25 # equal to (not bigger than) include/autoconf.h's mtime, 26 # and thus 2nd make does not regenerate include/autoconf.h. 27 # Waiting for 1 second after non-interactive "make XXXXconfig" 28 # prevents this from happening. 29 # 30 # We'd like to detect whether filesystem we are on has coarse mtimes, 31 # but can't do it yet, bbox ls hasn't got --full-time. 32 #MTIME_IS_COARSE:=@ls --full-time -ld | grep -F .000 >/dev/null 33 MTIME_IS_COARSE:=@true 34 20 35 oldconfig: $(obj)/conf 21 36 $< -o Config.in 37 $(MTIME_IS_COARSE) && sleep 1 22 38 23 39 silentoldconfig: $(obj)/conf 24 40 $< -s Config.in 41 $(MTIME_IS_COARSE) && sleep 1 25 42 26 43 update-po-config: $(obj)/kxgettext … … 47 64 randconfig: $(obj)/conf 48 65 $< -r Config.in 66 $(MTIME_IS_COARSE) && sleep 1 49 67 50 68 allyesconfig: $(obj)/conf 51 69 $< -y Config.in 70 $(MTIME_IS_COARSE) && sleep 1 52 71 53 72 allnoconfig: $(obj)/conf 54 73 $< -n Config.in 74 $(MTIME_IS_COARSE) && sleep 1 55 75 56 76 allmodconfig: $(obj)/conf 57 77 $< -m Config.in 78 $(MTIME_IS_COARSE) && sleep 1 58 79 59 80 defconfig: $(obj)/conf … … 64 85 $(Q)$< -D $(KBUILD_DEFCONFIG) Config.in 65 86 endif 87 $(MTIME_IS_COARSE) && sleep 1 66 88 67 89 %_defconfig: $(obj)/conf 68 90 $(Q)$< -D $@ Config.in 91 $(MTIME_IS_COARSE) && sleep 1 69 92 70 93 # Help text used by make help … … 118 141 subdir- += lxdialog 119 142 120 # Needed for systems without gettext 121 KBUILD_HAVE_NLS := $(shell \ 122 if echo "\#include <libintl.h>" | $(HOSTCC) $(HOSTCFLAGS) -E - > /dev/null 2>&1 ; \ 123 then echo yes ; \ 124 else echo no ; fi) 125 ifeq ($(KBUILD_HAVE_NLS),no) 126 HOSTCFLAGS += -DKBUILD_NO_NLS 127 endif 143 # Add environment specific flags 144 HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) 128 145 129 146 # generated files seem to need this to find local include files -
branches/2.2.9/mindi-busybox/scripts/kconfig/conf.c
r1765 r2725 504 504 case 's': 505 505 input_mode = ask_silent; 506 valid_stdin = isatty(0) && isatty(1) && isatty(2);506 valid_stdin = isatty(0); //bbox: && isatty(1) && isatty(2); 507 507 break; 508 508 case 'd': … … 606 606 } while (conf_cnt); 607 607 if (conf_write(NULL)) { 608 fprintf(stderr, _("\n*** Error during writing of the busyboxconfiguration.\n\n"));608 fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); 609 609 return 1; 610 610 } -
branches/2.2.9/mindi-busybox/scripts/kconfig/confdata.c
r1765 r2725 23 23 const char conf_def_filename[] = ".config"; 24 24 25 const char conf_defname[] = " scripts/defconfig";25 const char conf_defname[] = "/dev/null"; //bbox 26 26 27 27 const char *conf_confnames[] = { … … 71 71 { 72 72 struct stat buf; 73 static char fullname[PATH_MAX+1];73 static char *fullname = NULL; 74 74 char *env, *name; 75 75 … … 77 77 env = getenv(SRCTREE); 78 78 if (env) { 79 fullname = realloc(fullname, strlen(env) + strlen(name) + 2); 79 80 sprintf(fullname, "%s/%s", env, name); 80 81 if (!stat(fullname, &buf)) … … 405 406 strftime(buf, sizeof(buf), "#define AUTOCONF_TIMESTAMP " 406 407 "\"%Y-%m-%d %H:%M:%S\"\n", localtime(&now)); 408 } else { /* bbox */ 409 strcpy(buf, "#define AUTOCONF_TIMESTAMP \"\"\n"); 407 410 } 408 411 fprintf(out_h, "/*\n" … … 436 439 } else if (!(sym->flags & SYMBOL_CHOICE)) { 437 440 sym_calc_value(sym); 438 /* bbox: we want to all syms441 /* bbox: we want to see all syms 439 442 if (!(sym->flags & SYMBOL_WRITE)) 440 443 goto next; … … 457 460 /* bbox */ 458 461 fprintf(out_h, "#define ENABLE_%s 0\n", sym->name); 459 fprintf(out_h, "#define USE_%s(...)\n", sym->name);460 fprintf(out_h, "#define SKIP_%s(...) __VA_ARGS__\n", sym->name);462 fprintf(out_h, "#define IF_%s(...)\n", sym->name); 463 fprintf(out_h, "#define IF_NOT_%s(...) __VA_ARGS__\n", sym->name); 461 464 } 462 465 break; … … 472 475 /* bbox */ 473 476 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 474 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);475 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);477 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); 478 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); 476 479 } 477 480 break; … … 504 507 /* bbox */ 505 508 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 506 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);507 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);509 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); 510 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); 508 511 } 509 512 break; … … 516 519 /* bbox */ 517 520 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 518 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);519 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);521 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); 522 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); 520 523 } 521 524 break; … … 523 526 case S_INT: 524 527 str = sym_get_string_value(sym); 528 if (!str[0]) 529 str = "0"; 525 530 fprintf(out, "CONFIG_%s=%s\n", sym->name, str); 526 531 if (out_h) { … … 528 533 /* bbox */ 529 534 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 530 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name);531 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name);535 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name); 536 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name); 532 537 } 533 538 break; -
branches/2.2.9/mindi-busybox/scripts/kconfig/gconf.c
r1765 r2725 742 742 GtkWidget *dialog; 743 743 const gchar *intro_text = _( 744 "Welcome to gkc, the GTK+ graphical busybox configuration tool\n" 745 "for Linux.\n" 744 "Welcome to gkc, the GTK+ graphical configuration tool.\n" 746 745 "For each option, a blank box indicates the feature is disabled, a\n" 747 746 "check indicates it is enabled, and a dot indicates that it is to\n" -
branches/2.2.9/mindi-busybox/scripts/kconfig/lex.zconf.c_shipped
r1765 r2725 785 785 { 786 786 int new_size = text_size + size + 1; 787 if (size > 70) { 788 fprintf (stderr, "%s:%d error: Overlong line\n", 789 current_file->name, current_file->lineno); 790 } 791 787 792 if (new_size > text_asize) { 788 793 new_size += START_STRSIZE - 1; … … 842 847 static int yy_flex_strlen (yyconst char * ); 843 848 #endif 849 850 //bbox: suppressing "defined but not used" warning 851 #define YY_NO_INPUT 1 844 852 845 853 #ifndef YY_NO_INPUT … … 2228 2236 FILE *zconf_fopen(const char *name) 2229 2237 { 2230 char *env , fullname[PATH_MAX+1];2238 char *env; 2231 2239 FILE *f; 2232 2240 … … 2235 2243 env = getenv(SRCTREE); 2236 2244 if (env) { 2245 char *fullname = alloca(strlen(env) + strlen(name) + 2); 2237 2246 sprintf(fullname, "%s/%s", env, name); 2238 2247 f = fopen(fullname, "r"); … … 2315 2324 return current_pos.file ? current_pos.file->name : "<none>"; 2316 2325 } 2317 -
branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/BIG.FAT.WARNING
r1765 r2725 1 1 This is NOT the official version of dialog. This version has been 2 significantly modified from the original. It is for useby the Linux3 busybox configuration script. Please do not bother Savio Lam with 4 questions about this program.2 significantly modified from the original. It was used by the Linux 3 kernel configuration script, and subsequently adapted for busybox. 4 Please do not bother Savio Lam with questions about this program. -
branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/Makefile
r1765 r2725 13 13 PHONY += dochecklxdialog 14 14 $(obj)/dochecklxdialog: 15 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_ LOADLIBES)15 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) 16 16 17 17 hostprogs-y := lxdialog -
branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/check-lxdialog.sh
r1765 r2725 5 5 ldflags() 6 6 { 7 $cc -print-file-name=libncursesw.so | grep -q / 8 if [ $? -eq 0 ]; then 9 echo '-lncursesw' 10 exit 11 fi 12 $cc -print-file-name=libncurses.so | grep -q / 13 if [ $? -eq 0 ]; then 14 echo '-lncurses' 15 exit 16 fi 17 $cc -print-file-name=libcurses.so | grep -q / 18 if [ $? -eq 0 ]; then 19 echo '-lcurses' 20 exit 21 fi 7 for ext in so a dylib ; do 8 for lib in ncursesw ncurses curses ; do 9 $cc -print-file-name=lib${lib}.${ext} | grep -q / 10 if [ $? -eq 0 ]; then 11 echo "-l${lib}" 12 exit 13 fi 14 done 15 done 22 16 exit 1 23 17 } … … 26 20 ccflags() 27 21 { 28 if [ -f /usr/include/ncurses/ncurses.h ]; then 22 if [ -f /usr/include/ncursesw/ncurses.h ]; then 23 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"' 24 elif [ -f /usr/include/ncursesw/curses.h ]; then 25 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' 26 elif [ -f /usr/include/ncurses/ncurses.h ]; then 29 27 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' 30 28 elif [ -f /usr/include/ncurses/curses.h ]; then … … 43 41 # Check if we can link to ncurses 44 42 check() { 45 echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null 43 $cc -xc - -o $tmp 2>/dev/null <<'EOF' 44 #include CURSES_LOC 45 main() {} 46 EOF 46 47 if [ $? != 0 ]; then 47 echo " *** Unable to find the ncurses libraries." 1>&2 48 echo " *** make menuconfig require the ncurses libraries" 1>&2 49 echo " *** " 1>&2 50 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2 51 echo " *** " 1>&2 52 exit 1 48 echo " *** Unable to find the ncurses libraries or the" 1>&2 49 echo " *** required header files." 1>&2 50 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 51 echo " *** " 1>&2 52 echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 53 echo " *** " 1>&2 54 exit 1 53 55 fi 54 56 } 55 57 56 58 usage() { 57 printf "Usage: $0 [-check compiler options|- header|-library]\n"59 printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" 58 60 } 59 61 60 if [ $# ==0 ]; then62 if [ $# -eq 0 ]; then 61 63 usage 62 64 exit 1 -
branches/2.2.9/mindi-busybox/scripts/kconfig/mconf.c
r1765 r2725 116 116 "Menuconfig supports the use of alternate configuration files for\n" 117 117 "those who, for various reasons, find it necessary to switch\n" 118 "between different busyboxconfigurations.\n"118 "between different configurations.\n" 119 119 "\n" 120 120 "At the end of the main menu you will find two options. One is\n" … … 149 149 "Optional personality available\n" 150 150 "------------------------------\n" 151 "If you prefer to have all of the busyboxoptions listed in a single\n"151 "If you prefer to have all of the options listed in a single\n" 152 152 "menu, rather than the default multimenu hierarchy, run the menuconfig\n" 153 153 "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" … … 194 194 load_config_help[] = N_( 195 195 "\n" 196 "For various reasons, one may wish to keep several different busybox\n"196 "For various reasons, one may wish to keep several different\n" 197 197 "configurations available on a single machine.\n" 198 198 "\n" 199 "If you have saved a previous configuration in a file other than 200 " busybox'sdefault, entering the name of the file here will allow you\n"199 "If you have saved a previous configuration in a file other than\n" 200 "default, entering the name of the file here will allow you\n" 201 201 "to modify that configuration.\n" 202 202 "\n" … … 208 208 save_config_help[] = N_( 209 209 "\n" 210 "For various reasons, one may wish to keep different busybox\n"210 "For various reasons, one may wish to keep different\n" 211 211 "configurations available on a single machine.\n" 212 212 "\n" … … 259 259 static char buf[4096], *bufptr = buf; 260 260 static char input_buf[4096]; 261 static c har filename[PATH_MAX+1] = ".config";261 static const char filename[] = ".config"; 262 262 static char *args[1024], **argptr = args; 263 263 static int indent; … … 1071 1071 cprint_init(); 1072 1072 cprint("--yesno"); 1073 cprint(_("Do you wish to save your new busyboxconfiguration?"));1073 cprint(_("Do you wish to save your new configuration?")); 1074 1074 cprint("5"); 1075 1075 cprint("60"); … … 1080 1080 if (conf_write(NULL)) { 1081 1081 fprintf(stderr, _("\n\n" 1082 "Error during writing of the busyboxconfiguration.\n"1083 "Your busyboxconfiguration changes were NOT saved."1082 "Error during writing of the configuration.\n" 1083 "Your configuration changes were NOT saved." 1084 1084 "\n\n")); 1085 1085 return 1; 1086 1086 } 1087 1087 printf(_("\n\n" 1088 "*** End of busyboxconfiguration.\n"1089 "*** Execute 'make' to build busyboxor try 'make help'."1088 "*** End of configuration.\n" 1089 "*** Execute 'make' to build the project or try 'make help'." 1090 1090 "\n\n")); 1091 1091 } else { 1092 1092 fprintf(stderr, _("\n\n" 1093 "Your busyboxconfiguration changes were NOT saved."1093 "Your configuration changes were NOT saved." 1094 1094 "\n\n")); 1095 1095 } -
branches/2.2.9/mindi-busybox/scripts/kconfig/menu.c
r1765 r2725 395 395 return menu; 396 396 } 397 -
branches/2.2.9/mindi-busybox/scripts/kconfig/qconf.cc
r1765 r2725 1300 1300 void ConfigMainWindow::showIntro(void) 1301 1301 { 1302 static char str[] = "Welcome to the qconf graphical busybox configuration tool for Linux.\n\n"1302 static char str[] = "Welcome to the qconf graphical configuration tool.\n\n" 1303 1303 "For each option, a blank box indicates the feature is disabled, a check\n" 1304 1304 "indicates it is enabled, and a dot indicates that it is to be compiled\n" … … 1317 1317 void ConfigMainWindow::showAbout(void) 1318 1318 { 1319 static char str[] = "qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n" 1320 "Bug reports and feature request can also be entered at http://bugs.busybox.net/\n"; 1319 static char str[] = "qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n"; 1321 1320 1322 1321 QMessageBox::information(this, "qconf", str); -
branches/2.2.9/mindi-busybox/scripts/kconfig/util.c
r1765 r2725 45 45 fprintf(out, "\t%s\n", file->name); 46 46 } 47 fprintf(out, "\n.config include/autoconf.h: $(deps_config)\n\n$(deps_config):\n"); 47 fprintf(out, 48 "\n" 49 ".config include/autoconf.h: $(deps_config)\n" 50 "\n" 51 "include/autoconf.h: .config\n" /* bbox */ 52 "\n" 53 "$(deps_config):\n"); 48 54 fclose(out); 49 55 rename("..config.tmp", name); … … 52 58 53 59 54 /* Allocate initial growable st ing */60 /* Allocate initial growable string */ 55 61 struct gstr str_new(void) 56 62 { … … 107 113 return gs->s; 108 114 } 109 -
branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.hash.c_shipped
r1765 r2725 229 229 return 0; 230 230 } 231 -
branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.l
r1765 r2725 50 50 { 51 51 int new_size = text_size + size + 1; 52 if (size > 70) { 53 fprintf (stderr, "%s:%d error: Overlong line\n", 54 current_file->name, current_file->lineno); 55 } 52 56 if (new_size > text_asize) { 53 57 new_size += START_STRSIZE - 1; … … 262 266 FILE *zconf_fopen(const char *name) 263 267 { 264 char *env , fullname[PATH_MAX+1];268 char *env; 265 269 FILE *f; 266 270 … … 269 273 env = getenv(SRCTREE); 270 274 if (env) { 275 char *fullname = alloca(strlen(env) + strlen(name) + 2); 271 276 sprintf(fullname, "%s/%s", env, name); 272 277 f = fopen(fullname, "r"); -
branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.tab.c_shipped
r1765 r2725 1104 1104 `yyls': related to locations. 1105 1105 1106 Refer to the stacks thr useparate pointers, to allow yyoverflow1106 Refer to the stacks through separate pointers, to allow yyoverflow 1107 1107 to reallocate them elsewhere. */ 1108 1108 … … 2174 2174 #include "symbol.c" 2175 2175 #include "menu.c" 2176 2177 -
branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.y
r1765 r2725 14 14 #define LKC_DIRECT_LINK 15 15 #include "lkc.h" 16 17 #include "zconf.hash.c"18 16 19 17 #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) … … 100 98 } if_entry menu_entry choice_entry 101 99 100 %{ 101 #include "zconf.hash.c" 102 %} 103 102 104 %% 103 105 input: stmt_list; … … 472 474 for_all_symbols(i, sym) { 473 475 sym_check_deps(sym); 474 476 } 475 477 476 478 sym_change_count = 1;
Note:
See TracChangeset
for help on using the changeset viewer.