Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/scripts/kconfig


Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
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  
    1818    $< Config.in
    1919
     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
     33MTIME_IS_COARSE:=@true
     34
    2035oldconfig: $(obj)/conf
    2136    $< -o Config.in
     37    $(MTIME_IS_COARSE) && sleep 1
    2238
    2339silentoldconfig: $(obj)/conf
    2440    $< -s Config.in
     41    $(MTIME_IS_COARSE) && sleep 1
    2542
    2643update-po-config: $(obj)/kxgettext
     
    4764randconfig: $(obj)/conf
    4865    $< -r Config.in
     66    $(MTIME_IS_COARSE) && sleep 1
    4967
    5068allyesconfig: $(obj)/conf
    5169    $< -y Config.in
     70    $(MTIME_IS_COARSE) && sleep 1
    5271
    5372allnoconfig: $(obj)/conf
    5473    $< -n Config.in
     74    $(MTIME_IS_COARSE) && sleep 1
    5575
    5676allmodconfig: $(obj)/conf
    5777    $< -m Config.in
     78    $(MTIME_IS_COARSE) && sleep 1
    5879
    5980defconfig: $(obj)/conf
     
    6485    $(Q)$< -D $(KBUILD_DEFCONFIG) Config.in
    6586endif
     87    $(MTIME_IS_COARSE) && sleep 1
    6688
    6789%_defconfig: $(obj)/conf
    6890    $(Q)$< -D $@ Config.in
     91    $(MTIME_IS_COARSE) && sleep 1
    6992
    7093# Help text used by make help
     
    118141subdir- += lxdialog
    119142
    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
     144HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
    128145
    129146# generated files seem to need this to find local include files
  • branches/2.2.9/mindi-busybox/scripts/kconfig/conf.c

    r1765 r2725  
    504504        case 's':
    505505            input_mode = ask_silent;
    506             valid_stdin = isatty(0) && isatty(1) && isatty(2);
     506            valid_stdin = isatty(0); //bbox: && isatty(1) && isatty(2);
    507507            break;
    508508        case 'd':
     
    606606    } while (conf_cnt);
    607607    if (conf_write(NULL)) {
    608         fprintf(stderr, _("\n*** Error during writing of the busybox configuration.\n\n"));
     608        fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
    609609        return 1;
    610610    }
  • branches/2.2.9/mindi-busybox/scripts/kconfig/confdata.c

    r1765 r2725  
    2323const char conf_def_filename[] = ".config";
    2424
    25 const char conf_defname[] = "scripts/defconfig";
     25const char conf_defname[] = "/dev/null"; //bbox
    2626
    2727const char *conf_confnames[] = {
     
    7171{
    7272    struct stat buf;
    73     static char fullname[PATH_MAX+1];
     73    static char *fullname = NULL;
    7474    char *env, *name;
    7575
     
    7777    env = getenv(SRCTREE);
    7878    if (env) {
     79        fullname = realloc(fullname, strlen(env) + strlen(name) + 2);
    7980        sprintf(fullname, "%s/%s", env, name);
    8081        if (!stat(fullname, &buf))
     
    405406                strftime(buf, sizeof(buf), "#define AUTOCONF_TIMESTAMP "
    406407                    "\"%Y-%m-%d %H:%M:%S\"\n", localtime(&now));
     408        } else { /* bbox */
     409            strcpy(buf, "#define AUTOCONF_TIMESTAMP \"\"\n");
    407410        }
    408411        fprintf(out_h, "/*\n"
     
    436439        } else if (!(sym->flags & SYMBOL_CHOICE)) {
    437440            sym_calc_value(sym);
    438 /* bbox: we want to all syms
     441/* bbox: we want to see all syms
    439442            if (!(sym->flags & SYMBOL_WRITE))
    440443                goto next;
     
    457460                        /* bbox */
    458461                        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);
    461464                    }
    462465                    break;
     
    472475                        /* bbox */
    473476                        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);
    476479                    }
    477480                    break;
     
    504507                    /* bbox */
    505508                    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);
    508511                }
    509512                break;
     
    516519                        /* bbox */
    517520                        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);
    520523                    }
    521524                    break;
     
    523526            case S_INT:
    524527                str = sym_get_string_value(sym);
     528                if (!str[0])
     529                    str = "0";
    525530                fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
    526531                if (out_h) {
     
    528533                    /* bbox */
    529534                    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);
    532537                }
    533538                break;
  • branches/2.2.9/mindi-busybox/scripts/kconfig/gconf.c

    r1765 r2725  
    742742    GtkWidget *dialog;
    743743    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"
    746745        "For each option, a blank box indicates the feature is disabled, a\n"
    747746        "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  
    785785{
    786786    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
    787792    if (new_size > text_asize) {
    788793        new_size += START_STRSIZE - 1;
     
    842847static int yy_flex_strlen (yyconst char * );
    843848#endif
     849
     850//bbox: suppressing "defined but not used" warning
     851#define YY_NO_INPUT 1
    844852
    845853#ifndef YY_NO_INPUT
     
    22282236FILE *zconf_fopen(const char *name)
    22292237{
    2230     char *env, fullname[PATH_MAX+1];
     2238    char *env;
    22312239    FILE *f;
    22322240
     
    22352243        env = getenv(SRCTREE);
    22362244        if (env) {
     2245            char *fullname = alloca(strlen(env) + strlen(name) + 2);
    22372246            sprintf(fullname, "%s/%s", env, name);
    22382247            f = fopen(fullname, "r");
     
    23152324    return current_pos.file ? current_pos.file->name : "<none>";
    23162325}
    2317 
  • branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/BIG.FAT.WARNING

    r1765 r2725  
    11This is NOT the official version of dialog.  This version has been
    2 significantly modified from the original.  It is for use by the Linux
    3 busybox configuration script.  Please do not bother Savio Lam with
    4 questions about this program.
     2significantly modified from the original.  It was used by the Linux
     3kernel configuration script, and subsequently adapted for busybox.
     4Please do not bother Savio Lam with questions about this program.
  • branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/Makefile

    r1765 r2725  
    1313PHONY += dochecklxdialog
    1414$(obj)/dochecklxdialog:
    15     $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES)
     15    $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
    1616
    1717hostprogs-y := lxdialog
  • branches/2.2.9/mindi-busybox/scripts/kconfig/lxdialog/check-lxdialog.sh

    r1765 r2725  
    55ldflags()
    66{
    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
    2216    exit 1
    2317}
     
    2620ccflags()
    2721{
    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
    2927        echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
    3028    elif [ -f /usr/include/ncurses/curses.h ]; then
     
    4341# Check if we can link to ncurses
    4442check() {
    45     echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
     43        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
     44#include CURSES_LOC
     45main() {}
     46EOF
    4647    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
    5355    fi
    5456}
    5557
    5658usage() {
    57     printf "Usage: $0 [-check compiler options|-header|-library]\n"
     59    printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n"
    5860}
    5961
    60 if [ $# == 0 ]; then
     62if [ $# -eq 0 ]; then
    6163    usage
    6264    exit 1
  • branches/2.2.9/mindi-busybox/scripts/kconfig/mconf.c

    r1765 r2725  
    116116"Menuconfig supports the use of alternate configuration files for\n"
    117117"those who, for various reasons, find it necessary to switch\n"
    118 "between different busybox configurations.\n"
     118"between different configurations.\n"
    119119"\n"
    120120"At the end of the main menu you will find two options.  One is\n"
     
    149149"Optional personality available\n"
    150150"------------------------------\n"
    151 "If you prefer to have all of the busybox options listed in a single\n"
     151"If you prefer to have all of the options listed in a single\n"
    152152"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
    153153"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
     
    194194load_config_help[] = N_(
    195195    "\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"
    197197    "configurations available on a single machine.\n"
    198198    "\n"
    199     "If you have saved a previous configuration in a file other than \n"
    200     "busybox's default, 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"
    201201    "to modify that configuration.\n"
    202202    "\n"
     
    208208save_config_help[] = N_(
    209209    "\n"
    210     "For various reasons, one may wish to keep different busybox\n"
     210    "For various reasons, one may wish to keep different\n"
    211211    "configurations available on a single machine.\n"
    212212    "\n"
     
    259259static char buf[4096], *bufptr = buf;
    260260static char input_buf[4096];
    261 static char filename[PATH_MAX+1] = ".config";
     261static const char filename[] = ".config";
    262262static char *args[1024], **argptr = args;
    263263static int indent;
     
    10711071        cprint_init();
    10721072        cprint("--yesno");
    1073         cprint(_("Do you wish to save your new busybox configuration?"));
     1073        cprint(_("Do you wish to save your new configuration?"));
    10741074        cprint("5");
    10751075        cprint("60");
     
    10801080        if (conf_write(NULL)) {
    10811081            fprintf(stderr, _("\n\n"
    1082                 "Error during writing of the busybox configuration.\n"
    1083                 "Your busybox configuration changes were NOT saved."
     1082                "Error during writing of the configuration.\n"
     1083                "Your configuration changes were NOT saved."
    10841084                "\n\n"));
    10851085            return 1;
    10861086        }
    10871087        printf(_("\n\n"
    1088             "*** End of busybox configuration.\n"
    1089             "*** Execute 'make' to build busybox or try 'make help'."
     1088            "*** End of configuration.\n"
     1089            "*** Execute 'make' to build the project or try 'make help'."
    10901090            "\n\n"));
    10911091    } else {
    10921092        fprintf(stderr, _("\n\n"
    1093             "Your busybox configuration changes were NOT saved."
     1093            "Your configuration changes were NOT saved."
    10941094            "\n\n"));
    10951095    }
  • branches/2.2.9/mindi-busybox/scripts/kconfig/menu.c

    r1765 r2725  
    395395    return menu;
    396396}
    397 
  • branches/2.2.9/mindi-busybox/scripts/kconfig/qconf.cc

    r1765 r2725  
    13001300void ConfigMainWindow::showIntro(void)
    13011301{
    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"
    13031303        "For each option, a blank box indicates the feature is disabled, a check\n"
    13041304        "indicates it is enabled, and a dot indicates that it is to be compiled\n"
     
    13171317void ConfigMainWindow::showAbout(void)
    13181318{
    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";
    13211320
    13221321    QMessageBox::information(this, "qconf", str);
  • branches/2.2.9/mindi-busybox/scripts/kconfig/util.c

    r1765 r2725  
    4545            fprintf(out, "\t%s\n", file->name);
    4646    }
    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");
    4854    fclose(out);
    4955    rename("..config.tmp", name);
     
    5258
    5359
    54 /* Allocate initial growable sting */
     60/* Allocate initial growable string */
    5561struct gstr str_new(void)
    5662{
     
    107113    return gs->s;
    108114}
    109 
  • branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.hash.c_shipped

    r1765 r2725  
    229229  return 0;
    230230}
    231 
  • branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.l

    r1765 r2725  
    5050{
    5151    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    }
    5256    if (new_size > text_asize) {
    5357        new_size += START_STRSIZE - 1;
     
    262266FILE *zconf_fopen(const char *name)
    263267{
    264     char *env, fullname[PATH_MAX+1];
     268    char *env;
    265269    FILE *f;
    266270
     
    269273        env = getenv(SRCTREE);
    270274        if (env) {
     275            char *fullname = alloca(strlen(env) + strlen(name) + 2);
    271276            sprintf(fullname, "%s/%s", env, name);
    272277            f = fopen(fullname, "r");
  • branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.tab.c_shipped

    r1765 r2725  
    11041104     `yyls': related to locations.
    11051105
    1106      Refer to the stacks thru separate pointers, to allow yyoverflow
     1106     Refer to the stacks through separate pointers, to allow yyoverflow
    11071107     to reallocate them elsewhere.  */
    11081108
     
    21742174#include "symbol.c"
    21752175#include "menu.c"
    2176 
    2177 
  • branches/2.2.9/mindi-busybox/scripts/kconfig/zconf.y

    r1765 r2725  
    1414#define LKC_DIRECT_LINK
    1515#include "lkc.h"
    16 
    17 #include "zconf.hash.c"
    1816
    1917#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
     
    10098} if_entry menu_entry choice_entry
    10199
     100%{
     101#include "zconf.hash.c"
     102%}
     103
    102104%%
    103105input: stmt_list;
     
    472474    for_all_symbols(i, sym) {
    473475        sym_check_deps(sym);
    474         }
     476    }
    475477
    476478    sym_change_count = 1;
Note: See TracChangeset for help on using the changeset viewer.