Skip to content

Commit 7c12070

Browse files
author
Colin Robertson
committed
Acrolinx all the things, fix a ref
1 parent 4e6d4af commit 7c12070

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

docs/build/reference/description-blocks.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Description blocks"
3-
ms.date: "10/28/2019"
3+
ms.date: "10/29/2019"
44
helpviewer_keywords: ["description blocks", "NMAKE program, description blocks", "blocks, description"]
55
ms.assetid: 1321f228-d389-40ac-b0cd-4f6e9293602b
66
---
@@ -19,7 +19,7 @@ A *dependency line* specifies one or more targets, and zero or more dependents.
1919

2020
`hi_bye.exe : hello.obj goodbye.obj helper.lib`
2121

22-
In this example, `hi_bye.exe` is the target. Its dependencies are `hello.obj`, `goodbye.obj`, and `helper.lib`. This dependency line tells NMAKE to build the target whenever `hello.obj`, `goodbye.obj`, or `helper.lib` has changed more recently than `hi_bye.exe`.
22+
In this dependency line, `hi_bye.exe` is the target. Its dependencies are `hello.obj`, `goodbye.obj`, and `helper.lib`. The dependency line tells NMAKE to build the target whenever `hello.obj`, `goodbye.obj`, or `helper.lib` has changed more recently than `hi_bye.exe`.
2323

2424
A target must be at the start of the line. It can't be indented with any spaces or tabs. Use a colon (`:`) to separate targets from dependents. Spaces or tabs are allowed between targets, the colon separator (`:`), and dependents. To split the dependency line, use a backslash (`\`) after a target or dependent.
2525

@@ -40,11 +40,12 @@ bounce.exe leap.exe : jump.obj
4040
echo Building...
4141
```
4242

43-
is evaluated as this:
43+
is evaluated as:
4444

4545
```makefile
4646
bounce.exe : jump.obj
4747
echo Building...
48+
4849
leap.exe : jump.obj
4950
echo Building...
5051
```
@@ -61,14 +62,14 @@ bounce.exe : up.obj
6162
echo Building bounce.exe...
6263
```
6364

64-
is evaluated as this:
65+
is evaluated as:
6566

6667
```makefile
6768
bounce.exe : jump.obj up.obj
6869
echo Building bounce.exe...
6970
```
7071

71-
Multiple targets in multiple dependency lines in a single description block are evaluated as if each were specified in a separate description block, but targets that aren't in the last dependency line don't use the commands block. NMAKE attempts to use an inference rule for such targets.
72+
When you have multiple targets in multiple dependency lines in a single description block, NMAKE evaluates them as if each were specified in a separate description block. However, only targets in the last dependency line use the commands block. NMAKE attempts to use an inference rule for the other targets.
7273

7374
For example, this set of rules,
7475

@@ -78,13 +79,15 @@ bounce.exe climb.exe : up.obj
7879
echo Building bounce.exe...
7980
```
8081

81-
is evaluated as this:
82+
is evaluated as:
8283

8384
```makefile
8485
leap.exe : jump.obj
8586
# invokes an inference rule
87+
8688
bounce.exe : jump.obj up.obj
8789
echo Building bounce.exe...
90+
8891
climb.exe : up.obj
8992
echo Building bounce.exe...
9093
```
@@ -104,7 +107,7 @@ target.lib :: four.c five.c
104107

105108
### <a name="dependency-side-effects"></a> Dependency side effects
106109

107-
If a target is specified with a colon (:) in two dependency lines in different locations, and if commands appear after only one of the lines, NMAKE interprets the dependencies as if adjacent or combined. It doesn't invoke an inference rule for the dependency that has no commands, but instead assumes that the dependencies belong to one description block and executes the commands specified with the other dependency. For example, this set of rules:
110+
You might specify a target with a colon (:) in two dependency lines in different locations. If commands appear after only one of the lines, NMAKE interprets the dependencies as if the lines were adjacent or combined. It doesn't invoke an inference rule for the dependency that has no commands. Instead, NMAKE assumes the dependencies belong to one description block, and executes the commands specified with the other dependency. Consider this set of rules:
108111

109112
```makefile
110113
bounce.exe : jump.obj
@@ -113,7 +116,7 @@ bounce.exe : jump.obj
113116
bounce.exe : up.obj
114117
```
115118

116-
is evaluated as this:
119+
is evaluated as:
117120

118121
```makefile
119122
bounce.exe : jump.obj up.obj
@@ -129,7 +132,7 @@ bounce.exe :: jump.obj
129132
bounce.exe :: up.obj
130133
```
131134

132-
is evaluated as this:
135+
is evaluated as:
133136

134137
```makefile
135138
bounce.exe : jump.obj
@@ -177,7 +180,7 @@ In a dependency line, specify zero or more dependents after the colon (`:`) or d
177180

178181
### <a name="inferred-dependents"></a> Inferred dependents
179182

180-
Along with dependents you explicitly list in the dependency line, NMAKE can assume an *inferred dependent*. An inferred dependent is derived from an inference rule, and is evaluated before explicit dependents. If an inferred dependent is out-of-date compared to its target, NMAKE invokes the command block for the dependency. If an inferred dependent doesn't exist, or is out-of-date compared to its own dependents, NMAKE first updates the inferred dependent. For more information about inferred dependents, see [Inference rules](inference-rules.md).
183+
Along with dependents you explicitly list in the dependency line, NMAKE can assume an *inferred dependent*. An inferred dependent is derived from an inference rule, and is evaluated before explicit dependents. When an inferred dependent is out-of-date compared to its target, NMAKE invokes the command block for the dependency. If an inferred dependent doesn't exist, or is out-of-date compared to its own dependents, NMAKE first updates the inferred dependent. For more information about inferred dependents, see [Inference rules](inference-rules.md).
181184

182185
### <a name="search-paths-for-dependents"></a> Search paths for dependents
183186

docs/build/reference/running-nmake.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Running NMAKE"
3-
ms.date: "08/11/2019"
3+
ms.date: "10/29/2019"
44
helpviewer_keywords: ["targets, building", "response files, NMAKE", "targets", "command files", "NMAKE program, targets", "NMAKE program, running", "command files, NMAKE"]
55
ms.assetid: 0421104d-8b7b-4bf3-86c1-928d9b7c1a8c
66
---
@@ -12,7 +12,7 @@ ms.assetid: 0421104d-8b7b-4bf3-86c1-928d9b7c1a8c
1212
1313
## Remarks
1414

15-
NMAKE builds only specified *targets* or, when none is specified, the first target in the makefile. The first makefile target can be a [pseudotarget](pseudotargets.md) that builds other targets. NMAKE uses makefiles specified with **/F**, or if **/F** isn't specified, the Makefile file in the current directory. If no makefile is specified, it uses inference rules to build command-line *targets*.
15+
NMAKE builds only specified *targets* or, when none is specified, the first target in the makefile. The first makefile target can be a [pseudotarget](description-blocks.md#pseudotargets) that builds other targets. NMAKE uses makefiles specified with **/F**, or if **/F** isn't specified, the Makefile file in the current directory. If no makefile is specified, it uses inference rules to build command-line *targets*.
1616

1717
The *command-file* text file (or response file) contains command-line input. Other input can precede or follow \@*command-file*. A path is permitted. In *command-file*, line breaks are treated as spaces. Enclose macro definitions in quotation marks if they contain spaces.
1818

@@ -23,7 +23,7 @@ NMAKE options are described in the following table. Options are preceded by eith
2323
| Option | Purpose |
2424
| ------------ | ------------- |
2525
| **/A** | Forces build of all evaluated targets, even if not out-of-date compared to dependents. Doesn't force builds of unrelated targets. |
26-
| **/B** | Forces build even if timestamps are equal. Recommended only for very fast systems (resolution of two seconds or less). |
26+
| **/B** | Forces build even if timestamps are equal. Recommended only for fast systems (resolution of two seconds or less). |
2727
| **/C** | Suppresses default output, including nonfatal NMAKE errors or warnings, timestamps, and NMAKE copyright message. Suppresses warnings issued by **/K**. |
2828
| **/D** | Displays timestamps of each evaluated target and dependent and a message when a target doesn't exist. Useful with **/P** for debugging a makefile. Use `!CMDSWITCHES` to set or clear **/D** for part of a makefile. |
2929
| **/E** | Causes environment variables to override makefile macro definitions. |

0 commit comments

Comments
 (0)