Changeset 2629

Show
Ignore:
Timestamp:
05/23/07 15:57:30 (2 years ago)
Author:
tg
Message:

hack to make new “make wconfig”, developer-only, to generate Config.default
feel free to improve

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/Makefile

    r2619 r2629  
    3636        @echo '                 (default when .config does not exist)' 
    3737        @echo '  oldconfig    - Update current config utilising a provided .configs base' 
     38        @echo '  wconfig      - Same as "oldconfig", but also writes out hidden symbols' 
    3839        @echo '  allmodconfig - New config selecting modules when possible' 
    3940        @echo '  allnoconfig  - New config where all options are answered with no' 
     
    8384 
    8485oldconfig: .prereq_done 
    85         @${GMAKE_INV} oldconfig 
     86        @${GMAKE_INV} oldconfig W=-o 
     87 
     88wconfig: .prereq_done 
     89        @${GMAKE_INV} oldconfig W=-A 
    8690 
    8791cleandir: .prereq_done 
  • trunk/freewrt/mk/build.mk

    r2619 r2629  
    138138oldconfig: $(CONFIG)/conf 
    139139        -touch .config 
    140         $(CONFIG)/conf -o $(CONFIG_CONFIG_IN) 
     140        $(CONFIG)/conf ${W} $(CONFIG_CONFIG_IN) 
    141141        ${POSTCONFIG} 
    142142 
  • trunk/freewrt/tools/config/conf.c

    r444 r2629  
    1313#define LKC_DIRECT_LINK 
    1414#include "lkc.h" 
     15 
     16extern int output_mode; 
    1517 
    1618static void conf(struct menu *menu); 
     
    8587        case ask_new: 
    8688        case ask_silent: 
    87                 if (sym_has_value(sym)) { 
     89                if (sym_has_value(sym) || 
     90                    (output_mode && !(sym->flags & SYMBOL_WRITE))) { 
    8891                        printf("%s\n", def); 
    8992                        return; 
     
    491494        if (ac > i && av[i][0] == '-') { 
    492495                switch (av[i++][1]) { 
     496                case 'A': 
     497                        output_mode = 1; 
     498                        /* FALLTHROUGH */ 
    493499                case 'o': 
    494500                        input_mode = ask_new; 
  • trunk/freewrt/tools/config/confdata.c

    r1686 r2629  
    1313#define LKC_DIRECT_LINK 
    1414#include "lkc.h" 
     15 
     16int output_mode = 0; 
    1517 
    1618const char conf_def_filename[] = ".config"; 
     
    338340                } else if (!(sym->flags & SYMBOL_CHOICE)) { 
    339341                        sym_calc_value(sym); 
    340                         if (!(sym->flags & SYMBOL_WRITE)
     342                        if (!(sym->flags & SYMBOL_WRITE) && !output_mode
    341343                                goto next; 
    342344                        sym->flags &= ~SYMBOL_WRITE; 
  • trunk/freewrt/tools/config/symbol.c

    r1 r2629  
    1111#define LKC_DIRECT_LINK 
    1212#include "lkc.h" 
     13 
     14extern int output_mode; 
    1315 
    1416struct symbol symbol_yes = { 
     
    116118        for_all_defaults(sym, prop) { 
    117119                prop->visible.tri = expr_calc_value(prop->visible.expr); 
    118                 if (prop->visible.tri != no
     120                if (prop->visible.tri != no || output_mode
    119121                        return prop; 
    120122        }