Inline Files in a .mak File
Collapse the table of content
Expand the table of content

Inline Files in a .mak File

Windows CE .NET

An inline file contains text that you specify in the .mak file. Its name can be used in commands as input, for example, a LINK command file, or it can pass commands to the operating system (OS). The file is created on disk when a command that creates the file is run.

The following example shows the syntax for specifying an inline file in a command.


Specify two opening angle brackets (<<) in the command where FileName is to appear. The angle brackets cannot be a macro expansion. When the command is run, the angle brackets are replaced by FileName, if specified, or by a unique Nmake.exe-generated name. If specified, FileName must follow angle brackets without a space or tab. A path is permitted. No extension is required or assumed. If FileName is specified, the file is created in the current or specified directory, overwriting any existing file by that name. Otherwise, it is created in the Tmp directory, or the current directory, if the TMP environment variable is not defined. If a previous FileName is reused, Nmake.exe replaces the previous file.

The following example shows the syntax for creating the content of an inline file.


Specify InlineText on the first line after the command to create the file. Mark the end with two opening angle brackets (<<) at the beginning of a separate line. The file contains all InlineText before the delimiting angle brackets. The InlineText can have macro expansions and substitutions, but not directives or .mak file comments. Spaces, tabs, and newline characters are treated as literals.

Inline files can be temporary or permanent. A temporary file exists for the duration of the session and can be reused by other commands. Specify KEEP after the delimiting angle brackets to retain the file after the Nmake.exe session; an unnamed file is preserved on disk with the generated file name. Specify NOKEEP or nothing for a temporary file. KEEP and NOKEEP are not case-sensitive.

To reuse an inline file, specify <<FileName where the file is defined and first used and then reuse FileName without the opening angle brackets (<<) later in the same or another command. The command to create the inline file must run before all commands that use the file.

A command can create more than one inline file. The following example shows the syntax for creating more than one inline file.

command << <<

For each file, specify one or more lines of inline text followed by a closing line containing the delimiting angle brackets. Begin the text for the second file on the line following the delimiting line for the first file.

See Also

Commands in a .mak File | File Name Syntax

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.

© 2016 Microsoft