fMerge Tool (Windows CE 5.0)
The FMerge tool (FMerge.exe) is an application that Makeimg.exe calls to combine files in the following manner:
- It combines binary image builder (.bib) files into a file called Ce.bib.
- It also combines registry (.reg) files into a file called Reginit.ini.
Each of the following sections describes the keywords that are used in .bib files and are recognized by FMerge.
The following table shows keywords that you can use with FMerge.
Keyword | Description |
---|---|
#define (FMerge.exe) | Specifies the value of a variable. |
#undef (FMerge.exe) | Resets a variable to its original value. |
#include (FMerge.exe) | Specifies a file to be included in the build. |
#error (FMerge.exe) | Generates an error message to stderr and stops execution of FMerge. |
#message (FMerge.exe) | 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. However, 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 can use a variable that is undefined.
Nested variables are resolved when the containing variable is used. For example, if the variable varone
contains the variable $(vartwo)
, when $(varone)
is used, $(vartwo)
is resolved to its last defined value prior to the use of $(varone)
. When a variable is resolved, its value is 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
Send Feedback on this topic to the authors