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