3.1 General Rules

The general rules for all EDK II INI style documents follow.


Note: Path and Filename elements within the INF are case-sensitive in order to support building on UNIX style operating systems. Additionally, names that are C variables or used as a macro are case sensitive. Other elements such as section tags or hex digits, in the INF file are not case-sensitive. The use of "..", "../" and "./" in paths and filenames is strictly prohibited.


Note: This document uses a backslash "\" character to indicate that a line that cannot be displayed in this document on a single line. Within the INF specification, each entry must appear on a single line.


  • Multiple INF files may exist in a directory, however either the FILE_GUID or the VERSION_STRING must be unique to the INF file. It is recommended that the BASE_NAME also be unique (and match the INF filename, as in BaseLib.inf will use a BASE_NAME of BaseLib).

  • Text in section tags (text between square brackets) is not case sensitive.

  • A section terminates with either another section definition or the end of the file.

  • To append comment information to any item, the comment must start with a hash "#" character.

  • All comments terminate with the end of line character.

  • Any comment not associated with a defined comment format is considered a global comment.

  • Global comments must be separated from formatted comments by a blank line.

  • Field separators for lines that contain more than one field is the pipe "|" character. This character was selected to reduce the possibility of having the field separator character appear in a string, such as a filename or text string.


Note: The only notable exception is the PcdName which is a combination of the PcdTokenSpaceGuidCName and the PcdCName that are separated by the period "." character. This notation for a PCD name was used to uniquely identify the PCD.


  • A line terminates with either an end of line character or a comment.

  • Except for binary "As Built" INF files generated by the tools, when processing numeric values, either integer or hex, leading zeros specified in the entry may be ignored. For example, 0x00000000000000000000001 can be a valid value for a UINT8 data type, as the actual value is 1 The generated binary "As Built" INF file must use zero byte filled in order to specify a the length of a VOID* PCD value.

  • Sections with duplicate tags, such as two section tags: [BuildOptions], will be combined by tools, with the second section's content appended to the section content that was first in the file.

  • Sections with architectural modifiers are appended by tools to section content with either the "common" or no architectural modifiers if it exists. The combined result is then considered a complete section.

3.1.1 Backslash

The backslash "\" character in this document is only for lines that cannot be displayed within the margins of this document. The backslash character must not be used to extend a line over multiple lines in the INF file.

3.1.2 Whitespace characters

Whitespace (space and tab) characters are permitted between token and field separator elements for all entries.

Whitespace characters are not permitted between the PcdTokenSpaceGuidCName and the dot, nor are they permitted between the dot and the PcdCName.

3.1.3 Paths for File Names

Note that for specifying the path for a file name, if the path value starts with a dollar "$" sign character a local MACRO variable is being specified. White space characters are not permitted in path names.


Note: The use of "..", "./" and "../" in a path element is prohibited.


For all EDK II INF files, the directory path must use the forward slash character for separating directories. (For example, MdePkg/Include/ should be specified).

Unless otherwise noted, all file names and paths must be relative to the directory where the INF file is located.