Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.86 KB

commands-in-a-makefile.md

File metadata and controls

39 lines (31 loc) · 1.86 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Commands in a Makefile | Microsoft Docs
11/04/2016
cpp-tools
article
C++
commands, makefiles
8085517e-42f4-493b-b8f8-44311fc08c64
7
corob-msft
corob
ghogen

Commands in a Makefile

A description block or inference rule specifies a block of commands to run if the dependency is out-of-date. NMAKE displays each command before running it, unless /S, .SILENT, !CMDSWITCHES, or @ is used. NMAKE looks for a matching inference rule if a description block is not followed by a commands block.

A commands block contains one or more commands, each on its own line. No blank line can appear between the dependency or rule and the commands block. However, a line containing only spaces or tabs can appear; this line is interpreted as a null command, and no error occurs. Blank lines are permitted between command lines.

A command line begins with one or more spaces or tabs. A backslash ( \ ) followed by a newline character is interpreted as a space in the command; use a backslash at the end of a line to continue a command onto the next line. NMAKE interprets the backslash literally if any other character, including a space or tab, follows the backslash.

A command preceded by a semicolon (;) can appear on a dependency line or inference rule, whether or not a commands block follows:

project.obj : project.c project.h ; cl /c project.c  

What do you want to know more about?

Command modifiers

Filename-parts syntax

Inline files in a makefile

See Also

NMAKE Reference