Makefile (ecb41832bd2a7a3f8ac93527cec5e51e3827daed) Makefile (3266c806dc8692e079768ee2814498dcd6a91e61)
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
7 build_menuconfig build_nconfig build_gconfig build_xconfig
8
9ifdef KBUILD_KCONFIG
10Kconfig := $(KBUILD_KCONFIG)
11else
12Kconfig := Kconfig
13endif
14
1# SPDX-License-Identifier: GPL-2.0
2# ===========================================================================
3# Kernel configuration targets
4# These targets are used from top-level makefile
5
6PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
7 build_menuconfig build_nconfig build_gconfig build_xconfig
8
9ifdef KBUILD_KCONFIG
10Kconfig := $(KBUILD_KCONFIG)
11else
12Kconfig := Kconfig
13endif
14
15ifndef KBUILD_DEFCONFIG
16KBUILD_DEFCONFIG := defconfig
17endif
18
15ifeq ($(quiet),silent_)
16silent := -s
17endif
18
19# We need this, in case the user has it in its environment
20unexport CONFIG_
21
22xconfig: $(obj)/qconf

--- 46 unchanged lines hidden (view full) ---

69 $< $(silent) --$@ $(Kconfig)
70
71PHONY += savedefconfig defconfig
72
73savedefconfig: $(obj)/conf
74 $< $(silent) --$@=defconfig $(Kconfig)
75
76defconfig: $(obj)/conf
19ifeq ($(quiet),silent_)
20silent := -s
21endif
22
23# We need this, in case the user has it in its environment
24unexport CONFIG_
25
26xconfig: $(obj)/qconf

--- 46 unchanged lines hidden (view full) ---

73 $< $(silent) --$@ $(Kconfig)
74
75PHONY += savedefconfig defconfig
76
77savedefconfig: $(obj)/conf
78 $< $(silent) --$@=defconfig $(Kconfig)
79
80defconfig: $(obj)/conf
77ifeq ($(KBUILD_DEFCONFIG),)
78 $< $(silent) --defconfig $(Kconfig)
79else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
81ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
80 @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
81 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
82else
83 @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
84 $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
85endif
86
87%_defconfig: $(obj)/conf
88 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
89
90configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
91
92%.config: $(obj)/conf
93 $(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
94 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
82 @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
83 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
84else
85 @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
86 $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
87endif
88
89%_defconfig: $(obj)/conf
90 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
91
92configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
93
94%.config: $(obj)/conf
95 $(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
96 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
95 +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
97 $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
96
97PHONY += kvmconfig
98kvmconfig: kvm_guest.config
99 @:
100
101PHONY += xenconfig
102xenconfig: xen.config
103 @:

--- 105 unchanged lines hidden ---
98
99PHONY += kvmconfig
100kvmconfig: kvm_guest.config
101 @:
102
103PHONY += xenconfig
104xenconfig: xen.config
105 @:

--- 105 unchanged lines hidden ---