【问题标题】:What is the purpose of "ifeq (a,$(wildcard .a))" in makefile?makefile 中“ifeq (a,$(wildcard .a))”的目的是什么?
【发布时间】:2021-03-16 13:23:57
【问题描述】:
ifeq (.depend_f,$(wildcard .depend_f))
-include .depend_f
endif

它是scst fileio 中的makefile,我想也许只使用-include 就可以了,为什么我们需要使用“ifeq (.depend_f,$(wildcard .depend_f))”?

【问题讨论】:

    标签: linux makefile gnu-make linux-scst


    【解决方案1】:

    嗯,首先你不需要ifeq,你可以写:

    -include $(wildcard .depend_f)
    

    如果不查看 makefile 的其余部分,我们无法真正知道这样做的原因。这样做的主要原因是,如果你写了-include .depend_f,那么make 将尝试重建.depend_f 文件,如果它可以更新,则重新执行它自己。也许作者不希望发生这种情况。

    【讨论】:

      猜你喜欢
      • 2019-04-12
      • 1970-01-01
      • 2011-02-14
      • 2015-06-24
      • 2019-12-18
      • 2022-12-07
      • 2021-12-23
      • 2023-02-18
      • 2011-06-18
      相关资源
      最近更新 更多