omake reads its instructions from an initialization file, which holds instructions used to customize the general operation of omake, and from a makefile, which has instructions for a specific project.
The initialization file contains instructions for all make programs and is used to customize the operation of omake. omake reads the initialization file, ccase-home-dir\bin\make.ini, whenever it starts up.
The initialization file contains targets, inference rules, and macro definitions that you do not want to duplicate in every makefile, and it is used to customize the operation of omake. The initialization file is processed like a makefile, with the following exceptions:
The first target in the first makefile is the default target and is built if no command-line targets are specified. There is no special significance to the first target in the initialization file.
Targets defined in the initialization file are redefined by targets of the same name that are defined in the makefile. That is, these targets are available to all make programs, but they can be redefined in the makefile.
The makefile has instructions for a specific project. The default name of the makefile is literally makefile, but you can specify a different name with the -f option. The -f file command-line option names the makefile, and several -f options can be given; each makefile is read in the order it appears on the command line. If there are no -f command-line options, omake tries the file named makefile. If it doesn't exist, omake tries makefile.mak.
Lines in the makefile can be very long; the total makefile line length is limited only by available memory. For easier reading, a long line can be broken up by typing \<ENTER> after part of the line and typing the rest of the logical line on the next physical line of the makefile. For example, the line
first_part_of_line second_part_of_line
first_part_of_line \
second_part_of_line
To have the backslash (\) as the last character on the line, use \\<ENTER> or \<SPACE>,<ENTER>.
The simplest makefile statement is a comment, which begins with the comment character (#). Everything on a makefile line after the # is ignored. Use \# for a literal # character. The following large comment may appear in a makefile to describe its contents:
#
# Makefile for omake
#
# Compiler: Microsoft Visual C++ 5.0
# Linker: Microsoft(R) 32-Bit Incremental Linker Version 5.00.7022a
#
The comment character can also be used at the end of another makefile statement:
some makefile statement # a comment
If \<ENTER> appears on a commented line, the comment acts until the end of the line and the following line is still continued. The following examples are equivalent:
line_one \
line_two # more_line_two \
line_three
line_one line_two line_three
With a few exceptions, the initialization file holds the same kind of information as a makefile. Both the initialization file and makefiles consist of these components:
Rules
Dependency lines
Build scripts
Macro definitions
Inference rules
Response files
Directives
These components are described in the following sections.
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |