Linux Makefile : Why include/config/%. conf 总是被构建?

标签 linux makefile

我使用的是 Linux Makefile(4.2.0)。

如果我使用不存在的目标调用 make,例如“make ABCDEF”,则 make 始终重新制作目标:include/config/%.conf(第 570 行附近),其配方为“ma​​kesilentoldconfig”。

下面是目标(第 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/

相关文章:

linux - 如何欺骗系统日志消息的源IP地址?

linux - 奇怪的差异行为

c - 将基于 makefile 的 C 项目导入 IDE

c++ - 如何在 Visual Studio Code 中的构建目标之间切换?

linux - 如果 LDFLAGS 中有多个目录,链接器如何知道先去哪里查找?

linux - 如何在 unix 中删除 X 文件

linux - 在Jenkins中使用maven exec插件运行nodejs

python - 使用多个命令运行子进程并分离到后台保持顺序

makefile - 从 make 移动到 cmake : how to use build target with wildcards

makefile - 指定编号的 Make -j(多个作业)在 QNX 中不起作用