Comments in a Makefile

Precede a comment with a number sign (#). NMAKE ignores text from the number sign to the next newline character. The following are examples of comments:

# Comment on line by itself
OPTIONS = /MAP # Comment on macro definition line

all.exe : one.obj two.obj # Comment on dependency line
    link one.obj two.obj
# Comment in commands block
#   copy *.obj \objects # Command turned into comment
    copy one.exe \release

.obj.exe: # Comment on inference rule line
    link $<

 my.exe : my.obj ; link my.obj # Error: cannot comment this
  # Error: # must be the first character
.obj.exe: ; link $< # Error: cannot comment this

To specify a literal number sign, precede it with a caret (^), as follows:

DEF = ^#define #Macro representing a Fortran compiler directive