summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-25 22:57:39 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-25 22:57:39 +0200
commit4b459cb2d00da072b74ca2b6d80ef7bff143232d (patch)
treedbe53f9ba0ab59488fc756326a1f9c514a018311
parent4df83ae826c782bf557418d780b041a0a86e9799 (diff)
Fix generation of .config files
The .config file now contains options which are prefixed with CONFIG_.
-rw-r--r--Makefile17
-rw-r--r--tools/kconfig/Makefile6
2 files changed, 8 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e496db0d..5371c7ac 100644
--- a/Makefile
+++ b/Makefile
@@ -48,16 +48,11 @@ endef
define xbuild_gen_autoconf_h
$(call xbuild_action,GEN,$@)cat $< \
- | sed -e 's/^\([^#]\)/#define CONFIG_\1/g' \
+ | sed -e 's/^\([^#]\)/#define \1/g' \
-e 's/=/ /' \
| grep '^#define' > $@
endef
-define xbuild_gen_autoconf_mk
- $(call xbuild_action,GEN,$@)cat $< \
- | sed -e 's/^\([^#]\)/CONFIG_\1/g' > $@
-endef
-
# $(call xbuild_check_cc_option,<option>)
define xbuild_check_cc_option
$(shell printf "int main(void){ return 0; }\n" \
@@ -195,7 +190,8 @@ help:
# Don't create a %config pattern rule as it would conflict with .config
KCONFIG_TARGETS := config nconfig menuconfig xconfig gconfig \
allnoconfig allyesconfig alldefconfig randconfig \
- oldconfig defconfig savedefconfig listnewconfig
+ oldconfig olddefconfig defconfig savedefconfig \
+ listnewconfig
.PHONY: $(KCONFIG_TARGETS)
$(KCONFIG_TARGETS):
@@ -207,12 +203,7 @@ $(KCONFIG_TARGETS):
include/generated/autoconf.h: .config $(ALL_MAKEFILES)
$(call xbuild_gen_autoconf_h)
-include/generated/autoconf.mk: .config $(ALL_MAKEFILES)
- $(call xbuild_gen_autoconf_mk)
-
-ifneq ($(MAKECMDGOALS),help)
--include include/generated/autoconf.mk
-endif
+-include .config
ifdef CONFIG_CC_EXE
# Use printf to remove quotes
diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile
index 11b54644..efec36ae 100644
--- a/tools/kconfig/Makefile
+++ b/tools/kconfig/Makefile
@@ -42,7 +42,7 @@ nconfig: $(obj)/nconf
# These targets map 1:1 to the commandline options of 'conf'
simple-targets := oldconfig allnoconfig allyesconfig \
- alldefconfig randconfig listnewconfig
+ alldefconfig randconfig listnewconfig olddefconfig
PHONY += $(simple-targets)
$(simple-targets): $(obj)/conf
@@ -72,6 +72,8 @@ help:
@echo ' alldefconfig - New configuration - default values'
@echo ' randconfig - New configuration - random values'
@echo ' oldconfig - Reuse existing .config for configuration'
+ @echo ' olddefconfig - Same as oldconfig but sets new symbols to their'
+ @echo ' default value'
@echo ' defconfig - Default architecture-specific configuration'
@echo ' savedefconfig - Save configuration as ./defconfig (minimal config)'
@echo ' listnewconfig - List new options'
@@ -246,7 +248,7 @@ host-cxxmulti := $(addprefix $(obj)/,$(foreach m,$(__hostprogs),\
host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs))))
host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))))
-HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
+HOST_EXTRACFLAGS += -I$(obj)
$(host-csingle): %: %.c
$(Q)mkdir -p $(@D)