How to add multi line comments in makefiles
I believe the answer is no. The only comment styling I can find is # for each line, or use \ to wrap the first line.
Is there a way to comment out multiple lines in makefiles like as in C syntax
/* */ ?
define BOGUS lines ..... endef
Not exactly what you're looking for, but similar in spirit. I don't expect it to be the accepted answer, but maybe it can help someone.
Assuming you're editing your makefiles in VIM:
Either decide which lines you want to comment or select them with 'v'.
Then you can use the regex
s/^/#/ to comment out the lines
s/^#// to revert them.
- To open the vim command line, press
- To prep the command for the next 'n' lines, use
- A sample line using "v" looks like: