kconfig/kconfig.mk
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
parent 2981 80151a249b85
child 3034 11c23aa9c9f9
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
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'