我使用的是 Linux Makefile(4.2.0)。
如果我使用不存在的目标调用 make,例如“make ABCDEF”,则 make 始终重新制作目标:include/config/%.conf(第 570 行附近),其配方为“makesilentoldconfig”。
下面是目标(第 556 行附近):
# Read in config
-include include/config/auto.conf
ifeq ($(KBUILD_EXTMOD),)
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
-include include/config/auto.conf.cmd
# To avoid any implicit rule to kick in, define an empty command
$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
# If .config is newer than include/config/auto.conf, someone tinkered
# with it and forgot to run make oldconfig.
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
我只是想知道为什么这个目标“include/config/%.conf”总是被构建?甚至连目标也没有被调用。
有人可以帮助我吗?
最佳答案
使用 make -d 查看规则执行的原因
关于Linux Makefile : Why include/config/%. conf 总是被构建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32620915/