fMerge Tool

The FMerge tool (FMerge.exe) is an application called by Makeimg.exe to combine files together. It combines all existing binary image builder (.bib) files into a single file called Ce.bib. It also combines all existing registry (.reg) files into a single file called Reginit.ini.

Each of the following sections below describes the keywords that can be used in .bib files and are recognized by FMerge.

The following table shows keywords that you can use with FMerge.

Keyword Description
#define Specifies the value of a variable.
#undef Resets a variable to its original value.
#include Specifies a file to be included in the build.
#error Generates an error message to stderr and stops execution of FMerge.
#message Generates an output message to stdout.

Decision Statements and Operators

You can use several standard decision statements and operators with the fMerge application. The following standard expressions are available.

#if expression_list
#elif expression_list
#else
#endif
  • expression_list
    An expression that is evaluated by the application.

Standard join operators and conditional operators are supported. The following operators can be used with the fMerge application: &&, ||, == and !=.

Example Code

The following code example shows how the #if statement is used.

#if ! defined DRIVER_DIRECTORY
#define DRIVER_DIRECTORY $(_PUBLICROOT)\oak\common\drivers
#endif

The following code example shows how the #else statement is used.

#if $(LOCALE)==0409
; do something
#elif $(LOCALE)==0411
; do something else
#else
#error LOCALE $(LOCALE) is unsupported.
#endif

The following code example shows how the && join operator is used.

#if ! defined BSP_NOUSB && defined BSP_USB_OHCI
; do something
#endif

Variable Substitution

You can substitute variables by using the $() operator. Variables are not substituted in comments or in #define statements. When using a variable for substitution, variables defined in the active files are checked first, followed by environment variables. If the variable is not found in either place, execution will fail. The exception to this is in conditional expressions where you may use a variable that is undefined.

Nested variables are resolved when the containing variable is used. If the variable varone contained the variable $(vartwo), when $(varone) is used, $(vartwo) would be resolved to its last defined value prior to the use of $(varone). When a variable is resolved, its value will be checked for nested variables up to a nested depth of 10 variables.

Example Code

The following code example shows how variable substitution is used.

#include "$(_PROJECTOAKROOT)\drivers\keybd\$(keyboard_type)\keybd.reg"; Includes the registry file for the keyboard

See Also

Build Demo Tool | Binary Image Builder File | Build Release Directory Tool | Make Binary Image Tool

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.