Comentários em um Makefile

Preceda um comentário com um sinal numérico (#).NMAKE ignora o texto de sinal numérico para o próximo caractere de nova linha.Exemplos:

# 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  # Err: cannot comment this
 # Error: # must be the first character
.obj.exe: ; link $<  # Error: cannot comment this

Para especificar um sinal numérico literal, preceda-o com um acento circunflexo (^), da seguinte forma:

DEF = ^#define  #Macro for a C preprocessing directive

Consulte também

Conceitos

Conteúdo de um Makefile