Makefile (1c5af5cf9308fff327f52c7efd2dfa732d370871) | Makefile (694c49a7c01cc87194be40cb26404b58b68c291c) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2# =========================================================================== 3# Kernel configuration targets 4# These targets are used from top-level makefile 5 | 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 syncconfig update-po-config \ | 6PHONY += xconfig gconfig menuconfig config syncconfig \ |
7 localmodconfig localyesconfig 8 9ifdef KBUILD_KCONFIG 10Kconfig := $(KBUILD_KCONFIG) 11else 12Kconfig := Kconfig 13endif 14 --- 35 unchanged lines hidden (view full) --- 50 $< $(silent) --oldconfig $(Kconfig); \ 51 mv -f .config.old.1 .config.old) \ 52 else \ 53 mv -f .tmp.config .config; \ 54 $< $(silent) --oldconfig $(Kconfig); \ 55 fi 56 $(Q)rm -f .tmp.config 57 | 7 localmodconfig localyesconfig 8 9ifdef KBUILD_KCONFIG 10Kconfig := $(KBUILD_KCONFIG) 11else 12Kconfig := Kconfig 13endif 14 --- 35 unchanged lines hidden (view full) --- 50 $< $(silent) --oldconfig $(Kconfig); \ 51 mv -f .config.old.1 .config.old) \ 52 else \ 53 mv -f .tmp.config .config; \ 54 $< $(silent) --oldconfig $(Kconfig); \ 55 fi 56 $(Q)rm -f .tmp.config 57 |
58# Create new linux.pot file 59# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files 60update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h 61 $(Q)$(kecho) " GEN config.pot" 62 $(Q)xgettext --default-domain=linux \ 63 --add-comments --keyword=_ --keyword=N_ \ 64 --from-code=UTF-8 \ 65 --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ 66 --directory=$(srctree) --directory=$(objtree) \ 67 --output $(obj)/config.pot 68 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot 69 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ 70 $(srctree)/arch/*/um/Kconfig`; \ 71 do \ 72 $(kecho) " GEN $$i"; \ 73 $(obj)/kxgettext $$i \ 74 >> $(obj)/config.pot; \ 75 done ) 76 $(Q)$(kecho) " GEN linux.pot" 77 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ 78 --output $(obj)/linux.pot 79 $(Q)rm -f $(obj)/config.pot 80 | |
81# These targets map 1:1 to the commandline options of 'conf' 82simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ 83 alldefconfig randconfig listnewconfig olddefconfig 84PHONY += $(simple-targets) 85 86$(simple-targets): $(obj)/conf 87 $< $(silent) --$@ $(Kconfig) 88 --- 85 unchanged lines hidden (view full) --- 174 @echo ' tinyconfig - Configure the tiniest possible kernel' 175 176# =========================================================================== 177# Shared Makefile for the various kconfig executables: 178# conf: Used for defconfig, oldconfig and related targets 179# object files used by all kconfig flavours 180 181conf-objs := conf.o zconf.tab.o | 58# These targets map 1:1 to the commandline options of 'conf' 59simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ 60 alldefconfig randconfig listnewconfig olddefconfig 61PHONY += $(simple-targets) 62 63$(simple-targets): $(obj)/conf 64 $< $(silent) --$@ $(Kconfig) 65 --- 85 unchanged lines hidden (view full) --- 151 @echo ' tinyconfig - Configure the tiniest possible kernel' 152 153# =========================================================================== 154# Shared Makefile for the various kconfig executables: 155# conf: Used for defconfig, oldconfig and related targets 156# object files used by all kconfig flavours 157 158conf-objs := conf.o zconf.tab.o |
182kxgettext-objs := kxgettext.o zconf.tab.o | |
183 | 159 |
184hostprogs-y := conf kxgettext | 160hostprogs-y := conf |
185 186targets += zconf.lex.c | 161 162targets += zconf.lex.c |
187clean-files += gconf.glade.h 188clean-files += config.pot linux.pot | |
189 | 163 |
190# Add environment specific flags 191HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) \ 192 -DLOCALE 193HOST_EXTRACXXFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCXX) $(HOSTCXXFLAGS)) \ 194 -DLOCALE | |
195# generated files seem to need this to find local include files 196HOSTCFLAGS_zconf.lex.o := -I$(src) 197HOSTCFLAGS_zconf.tab.o := -I$(src) 198 199# nconf: Used for the nconfig target based on ncurses 200hostprogs-y += nconf 201nconf-objs := nconf.o zconf.tab.o nconf.gui.o 202 --- 36 unchanged lines hidden (view full) --- 239 240HOSTLOADLIBES_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) 241HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) 242 243$(obj)/gconf.o: $(obj)/.gconf-cfg 244 245$(obj)/zconf.tab.o: $(obj)/zconf.lex.c 246 | 164# generated files seem to need this to find local include files 165HOSTCFLAGS_zconf.lex.o := -I$(src) 166HOSTCFLAGS_zconf.tab.o := -I$(src) 167 168# nconf: Used for the nconfig target based on ncurses 169hostprogs-y += nconf 170nconf-objs := nconf.o zconf.tab.o nconf.gui.o 171 --- 36 unchanged lines hidden (view full) --- 208 209HOSTLOADLIBES_gconf = $(shell . $(obj)/.gconf-cfg && echo $$libs) 210HOSTCFLAGS_gconf.o = $(shell . $(obj)/.gconf-cfg && echo $$cflags) 211 212$(obj)/gconf.o: $(obj)/.gconf-cfg 213 214$(obj)/zconf.tab.o: $(obj)/zconf.lex.c 215 |
247# Extract gconf menu items for i18n support 248$(obj)/gconf.glade.h: $(obj)/gconf.glade 249 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ 250 $(obj)/gconf.glade 251 | |
252# check if necessary packages are available, and configure build flags 253define filechk_conf_cfg 254 $(CONFIG_SHELL) $< 255endef 256 257$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE 258 $(call filechk,conf_cfg) 259 260clean-files += .*conf-cfg | 216# check if necessary packages are available, and configure build flags 217define filechk_conf_cfg 218 $(CONFIG_SHELL) $< 219endef 220 221$(obj)/.%conf-cfg: $(src)/%conf-cfg.sh FORCE 222 $(call filechk,conf_cfg) 223 224clean-files += .*conf-cfg |