OMAKE Guide, Release 2002.05.00, Windows
1. Introduction
1.1 File Manifest
1.2 Configuring omake
1.3 Notes on Using omake
omake's Configuration Management Features
Configuration Lookup
Derived Object Sharing
Configuration Record Creation
Express Builds
Command-Line Options
Location of Temporary Files
Non-MVFS Dependencies
Differences Between omake and Standard Make Tools
Running omake
Makefiles
Supporting Both omake and clearmake
Parallel and Distributed Build Operations
Build Scripts and the rm Command
Pathnames in CRs
1.4 Auditing 16-bit Tools
2. Overview of Using omake
2.1 The omake Process
2.2 Invoking omake from the Command Line
2.3 Initialization Files and Makefiles
The Initialization File
The Makefile
Continued Lines
Comments
Contents of Initialization Files and Makefiles
2.4 Rules
2.5 Dependency Lines
Explicit and Inferred Dependencies
Macros in Dependency Lines
The Make Process Is Recursive
Detected Dependencies
Wildcards in Dependency Lines
The Dependency Line Separator
A Dependency Example
2.6 Build Scripts
Build Script Execution
Auto-Detection Mode
Standard Execution Mode
Build-Script Line Exit Status
2.7 Macros
Macro Precedence
Defining Macros in the Makefile
Read-Time Expansion of Macros
Standard Macro Definition: name = [ text ]
Conditional Macro Definition: name ?= [ text ]
Expanded Macro Definition: name := [ text ]
Appended Macro Definition: name += [ text ]
Case-Sensitivity of Macro Names
The Location of Macro Definitions
Indenting Macro Definitions
Undefining Macros
Example Macro Definitions
Defining Macros on the Command Line
Dynamic Macros
Macro Modifiers
File Name Components
Tokenize
Other Modifiers
Environment Variables
Macro Expansion or Macro Referencing
Run-Time Expansion of Macros
Recursive Macro Definitions
2.8 Inference Rules
Defining Inference Rules
The General Inference Rule Definition
The Target Inherits Build Scripts and Attributes
Alternative (Suffix-Only) Form
Automatic Use of Inference Rules
Inference Rules and Target Groups
Multiple-Step Inference Rules
Chained Targets Are Deleted Automatically
Preventing Multiple-Step Rules
Inference Rule Search Order
Overriding the Rule Ordering
Rule Finding for Target Names with a Directory Component
Common Operations on Inference Rules
Built-In Inference Rules
Compatibility with Suffix Rules (.SUFFIXES)
Handling of Suffix Rules and .SUFFIXES
2.9 Response Files
Inline Response Files
2.10 Directives
2.11 The Keep-Working Mode
3. omake Reference
3.1 Command-Line Options
Initial Command-Line Parameters: OMAKEOPTS
The Command-Line Options
The Current Options
3.2 Locating the Initialization File
Disabling the Initialization File
3.3 The Make Process
Read Time
Run Time
Run-Time Initialization and Deinitialization
Updating the Time Stamp
3.4 Targets
Case-Sensitivity of Target Names
A Target Has a Name and a Pathname
Using the Path Separator in Names
The First Target in the Makefile Is the Default Target
Targets May Appear on Several Dependency Lines
Double-Colon Dependency Lines
Mixing Single-Colon and Double-Colon Dependency Lines
Targets Without Dependencies
Target Groups
3.5 Macros
Macro Modifiers
Filename Components
Absolute Pathname
Append and Prepend Strings
Change Case
Expand Pathnames
Include File
Include File with Regular Expression Matching
Member and Nonmember
Select a Particular Element
String Substitution
Tokenize
Wildcard Expand File and Directory Names
Regular Expressions
Configuring Regular Expressions
Regular Expressions for the M Modifier
Regular Expressions for the S Modifier
With Configuring .REGEX_CHAR and .REGEX_WILD
Predefined and Built-In Macros
Predefined Macros: Run-Time Macros
Run-Time Macros
Predefined Macros: General Macros
Predefined Macros: State Macros
An Example Use of the State Macros
Built-in Macros
Compatibility with Other Make Utilities
3.6 Build-Script Line Prefixes
Do Not Echo the Build-Script Line (Silent Operation)
Ignore the Build-Script Line Exit Status
Override the -n Command-Line Option
Select the Shell Program
Iterate the Build Script
Miscellaneous Prefixes
Build Script Compatibility with Other Make Utilities
3.7 Build-Script Problems: The cd and set commands
Using Multiple-Command Build-Script Lines
Using Directives: %chdir and %setenv
3.8 Makefile Directives
Percent Directives
Conditional Directives
Iteration Directives
Other Percent Directives
Conditional Directives
Conditional Directives and Continued Lines
Conditional Expressions
Simple Expressions
Comparison Operators
Functional Operators (Also Called Built-In Functions)
File-Test Operators
Command-Execution Operator
Logical Operators
Iteration Directives
The %foreach Directive
The %while Directive
Effects of %foreach and %while when Using omake in a VOB
Interrupting the Iteration
Another Method of Iteration
A Sample Makefile
Other Percent Directives
Compatibility with Other Make Utilities
Dot Directives
Compatibility with Other Make Utilities
3.9 Target Attributes
Using Attributes
Attributes and Inference Rules
List of Attributes
3.10 Special Targets
Compatibility with Other Make Utilities
3.11 Search Directories
Implied Location of Missing Files
Search Directory Macros
The .PATH Macros
The VPATH Macros
Search Directories and Run-Time Macros
Search Directories and File Lookup
Search Directories and Inference Rules
Debugging the Search Directories
Compatibility with Other Make Utilities
3.12 Response Files
Automatic Responses
Adding Program Names
Response Class Parameters
Defining or Modifying a Response Class
Disabling a Response Class
Response File Example #1
Response File Example #2
Using Automatic Responses
Generation of Automatic Responses
Deletion of Automatic Responses
Built-In Automatic Responses
Built-in Responses for Windows NT
Inline Response Files
Deletion of Inline Response Files
Inline Response File Example
Compatibility with Other Make Utilities
4. Debugging Makefiles
4.1 Command-Line Options
4.2 Read-Time Debugging
Output Produced by -#1
Output Produced by -p
The Macro Definitions
The Search Directories
The Automatic Response Definitions
The Inference Rules
The Targets and Build Scripts
The Final -p Output
A. Errors and Warnings
A.1 Reducing Message Severity
A.2 Error Messages and Explanations
B. Exit Status Values
C. Built-In Macros and Rules
C.1 Macros
Predefined General Macros
Predefined State Macros
Built-In Macros
C.2 Macro Modifiers
C.3 Inference Rules
Compatibility with Other Make Utilities
D. Compatibility and Emulation
D.1 PM/CB (Intersolv Configuration Builder and PolyMake)
System Macros
Transformation Macros
Built-In Functions
Built-In Operations (Percent Directives)
Directives
Reserved Targets
Local Input Scripts
Operation-Line Modifiers
PM/CB Emulation
Emulation at Startup Time
Emulation After Startup Time
The Command Line
The Emulation File (BUILTINS.CB)
The Initialization File (TOOLS.INI)
The BUILTINS File
The Makefile
Makefile Contents
Operation Lines (Build Scripts)
Unsupported PM/CB Features
Unimplemented Directives and Reserved Targets
Iteration Groups
Suffix Dependencies
Command-Line Flags
Makefile Contents
Shared Definitions
Operation-Line Modifiers
Built-In Operations
D.2 Microsoft NMAKE Compatibility
NMAKE Directives
NMAKE Emulation
Emulation at Startup Time
Emulation After Start-Up Time
The Command Line
The Emulation File (BUILTINS.NM)
The Initialization File (TOOLS.INI)
Makefile Contents
Macros
Build Scripts
Inline Response Files
Unsupported NMAKE Features
D.3 Opus Make v5.2x Compatibility and Emulation
D.4 Borland Make Compatibility
D.5 UNIX Make Compatibility
E. Regular Expressions
E.1 Configuration of Regular Expressions
Regular Expression Components
Referencing the Matched Expression
E.2 Macro Modifiers in OMAKE
Regular Expressions for the M Modifier
Regular Expressions for the S Modifier