kconfig/kconfig.mk
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sat Aug 04 23:41:24 2012 +0200 (2012-08-04)
branch1.16
changeset 3029 06cf4f81a5a2
parent 2981 80151a249b85
child 3034 11c23aa9c9f9
permissions -rw-r--r--
1.16: create maintenance branch, update version to 1.16.0

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # ===========================================================================
     2 # crosstool-NG configuration targets
     3 # These targets are used from top-level makefile
     4 
     5 #-----------------------------------------------------------
     6 # The configurators rules
     7 
     8 configurators = menuconfig nconfig oldconfig
     9 PHONY += $(configurators)
    10 
    11 $(configurators): config_files
    12 
    13 # We need CONF for savedefconfig in scripts/saveSample.sh
    14 export CONF  := $(CT_LIB_DIR)/kconfig/conf
    15 MCONF := $(CT_LIB_DIR)/kconfig/mconf
    16 NCONF := $(CT_LIB_DIR)/kconfig/nconf
    17 
    18 menuconfig:
    19 	@$(ECHO) "  CONF  $(KCONFIG_TOP)"
    20 	$(SILENT)$(MCONF) $(KCONFIG_TOP)
    21 
    22 nconfig:
    23 	@$(ECHO) "  CONF  $(KCONFIG_TOP)"
    24 	$(SILENT)$(NCONF) $(KCONFIG_TOP)
    25 
    26 oldconfig: .config
    27 	@$(ECHO) "  CONF  $(KCONFIG_TOP)"
    28 	$(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP)
    29 
    30 # Always be silent, the stdout an be >.config
    31 extractconfig:
    32 	@$(awk) 'BEGIN { dump=0; }                                                  \
    33 	         dump==1 && $$0~/^\[.....\][[:space:]]+(# |)CT_/ {                  \
    34 	             $$1="";                                                        \
    35 	             gsub("^[[:space:]]","");                                       \
    36 	             print;                                                         \
    37 	         }                                                                  \
    38 	         $$0~/Dumping user-supplied crosstool-NG configuration: done in/ {  \
    39 	             dump=0;                                                        \
    40 	         }                                                                  \
    41 	         $$0~/Dumping user-supplied crosstool-NG configuration$$/ {         \
    42 	             dump=1;                                                        \
    43 	         }'
    44 
    45 #-----------------------------------------------------------
    46 # Help text used by make help
    47 
    48 help-config::
    49 	@echo  '  menuconfig         - Update current config using a menu based program'
    50 	@echo  '  oldconfig          - Update current config using a provided .config as base'
    51 	@echo  '  extractconfig      - Extract to stdout the configuration items from a'
    52 	@echo  '                       build.log file piped to stdin'