BUILD Option

Syntax

BUILD=expression

The BUILD option specifies which topics containing build tags are included in or excluded from a build. Use this option only if the RTF topic files have build tags.

A topic contains a build tag if it includes a build tag footnote (*). Topics without build tags are always compiled, regardless of the current build expression.

Parameter

expression

A logical statement that specifies which topics to include in or exclude from the build. This parameter consists of a combination of build tags (specified in the [BUILDTAGS] section) and the following logical operators.

Operator Description

~ Applies the NOT operator to a single build tag. The Help compiler compiles a topic only if the tag is not present. This operator has the highest precedence; the compiler applies it before any other operator.
& Combines two build tags by using the AND operator. The Help compiler compiles a topic only if it contains both build tags used in the expression. The compiler applies this operator only after the ~ operator has been applied.
| Combines two build tags by using the OR operator. The Help compiler compiles a topic if it has at least one of the build tags used in the expression. This operator has the lowest precedence; the compiler applies it only after all other operators have been applied.

Parentheses may be used to override operator precedence. Expressions enclosed within parentheses are always evaluated first.

Comments

Only one BUILD option can be given per Help project file.

The Help compiler evaluates all build expressions from left to right, using the specified precedence rules.

Example

The following examples assume that the [BUILDTAGS] section in the Help project defines the build tags DEMO, MASTER, and TEST_BUILD. Although the following examples show several BUILD options on consecutive lines using these build tags, only one BUILD option would be allowed in the Help project file.

Example Compile all topics

BUILD=DEMO

That have the DEMO tag

BUILD=DEMO & MASTER

With both the DEMO and MASTER tag

BUILD=DEMO | MASTER

With either the DEMO or MASTER tag

BUILD=(DEMO | MASTER) & TEST_BUILD

That have either the DEMO or MASTER tag and also the TEST_BUILD tag

BUILD=~ MASTER

That do not have the MASTER tag

See Also

[BUILDTAGS] Section, [OPTIONS] Section