Adding comments to Makefile

前端 未结 5 921
时光取名叫无心
时光取名叫无心 2021-02-13 19:15

How do I add comments (with echo) in a Makefile so that they\'re printed when ran?

5条回答
  •  一生所求
    2021-02-13 19:41

    Or, since Make just pushes whatever is in a rule to bash, you could just use a pound to have bash treat it as a comment.

    Rule:  Dependencies
        # Your Comment
        Command
    

    Will output

    $ make Rule
        # Your Comment
        Command
    

提交回复
热议问题