linuxmakefilegnu-make

What is the proper way to comment in a makefile recipe?


For years I have lived with this annoying Emacs behavior:

enter image description here

As described in this question

Today I realized that Emacs is actually right: make is not interpreting those lines as comments. It just passes them to the shell and the shell interprets them as comments. Which means that:

What would be the proper way of commenting (with a real makefile comment) within a recipe / target, without visually breaking indentation?


Solution

  • What would be the proper way of commenting (with a real makefile comment) within a recipe / target, without visually breaking indentation?

    Not really.