代码之家  ›  专栏  ›  技术社区  ›  blueFast

在makefile配方中注释的正确方式是什么?

  •  0
  • blueFast  · 技术社区  · 2 年前

    Emacs

    enter image description here

    this question

    make 并不是把这些话解释为评论。它只是将它们传递到外壳上 shell将它们解释为注释。这意味着:

    评论的正确方式是什么(用 真实的 makefile 注释),而不会在视觉上破坏缩进?

    2 回复  |  直到 2 年前
        1
  •  3
  •   tripleee    2 年前

    你完全可以使用适当的 make 食谱中的评论。简单地说,不要像你在一个例子中所做的那样缩进它们。

    target-annoying-face:
    # a comment
        echo "Hi"
    # another comment
        echo "Bye"
    
        2
  •  2
  •   John Bollinger    2 年前

    评论的正确方式是什么(用 makefile 注释),而不会在视觉上破坏缩进?

    不是真的。

    • emacs ,但肯定 vim 这样做。