Home Product Info Orders Downloads About Us Contact Us
Opus Make v6.1x achieves a great deal of compatibility with Microsoft NMAKE. This means Opus Make understands the makefiles of NMAKE without you needing to change anything.
Where something in Opus Make differs from NMAKE we provide emulation. One example difference is in the command line: Opus Make and NMAKE don't have the same command line but with emulation Opus Make handles the NMAKE command-line syntax.
There are also some NMAKE features not supported by Opus Make. Follow the unsupported link.
Opus Make v6.1 is highly compatible with Microsoft NMAKE up to version 1.62 (the version supplied with Visual C++ 5.0). Opus Make supports all NMAKE directives, macros, paths, and rules. As well, Make can be integrated into the Visual C++ IDE.
Opus Make supports the following NMAKE directives:
!CMDSWITCHES {+|} opt
This read-time directive turns on (+) or off () one or more options, opt.
!message message
This read-time directive is like the "%echo message" directive except that I/O redirection is not allowed.
Opus Make is highly compatible with NMAKE but there are differences in how these two read makefiles and in how they run. Opus Makes NMAKE emulation mode causes Opus Make to operate like NMAKE.
If NMAKE emulation mode is selected at start-up time, Make emulates the NMAKE command line and selection of the initialization file. Selection of NMAKE emulation at start-up time is done with:
- the "EN" flag, either on the command line or in the OPUSMAKEOPTS environment variable, or
- the use of the setem utility we supply to set the start-up emulation mode. This utility can be used to create a special version of Make that is a drop-in replacement for NMAKE. See Appendix F for details.
To determine the start-up emulation mode, Make first checks if setem was used to set the start-up emulation to NMAKE. If not, Make examines the OPUSMAKEOPTS environment variable for "Ex" flags. Make then examines the command-line for "Ex" flags. If the last "Ex" flag is "EN", Make starts up emulating NMAKE.
The .MS_NMAKE directive turns on NMAKE emulation mode from the point it appears in the initialization file or any makefile.
First the OPUSMAKEOPTS environment variable is parsed for options, then the command line is parsed. When Opus Make is emulating NMAKE, parsing entails:
- Handling the case-insensitivity of the NMAKE command line.
- Handling all NMAKE command-line options.
- Switching the help screen to the options available with NMAKE v1.62. The help screens contents are stored in the file help611.nm.
- Printing a banner, unless the "nologo" command-line flag was used.
If Opus Make is emulating NMAKE at start up, Opus Make first reads its internal rules and macros, then looks for builtins.nm first in the directory of make.ini, then in the directory of the make.exe file, then along directories of the INIT environment variable. If builtins.nm is found it is read for macros and rules that give more complete NMAKE emulation.
If Opus Make is emulating NMAKE at start up, Opus Make reads the initialization file:
- called tools.ini in the current directory, or
- called tools.ini in a directory named by the INIT environment variable.
If Make finds the initialization file it reads information in the file starting with the section heading "[NMAKE".
If Opus Make is emulating NMAKE:
- The "^" character is used for quoting and produces the following affects:
Sequence Interpretation ^^ literal "^" ^enter literal "enter" ^$ literal "^$" ^\ literal "\" ^# literal "#" (same as Opus \#)
- The "!else if", "!else ifdef", and "!else ifndef" directives are supported.
- Macro definitions of the form:
VAR = ... $(VAR) ...are supported and result in $(VAR) being expanded before VAR is redefined. Other macro references in the macro value are not expanded.
- Macro definitions of the form:
ENVVAR = valuewhere ENVVAR is an environment variable result in the ENVVAR macro getting the value and in the export of value into the environment. Note however that if the "E" command-line flag was used, makefile macros cant override environment macros and this macro redefinition is ignored.
- Target names can be enclosed in double quotes. For example:
all : "VeryLongFileName.exe"
- Slash "/" and backslash "\" are the same in target names.
- Wild card characters used on the right-side of dependency lines return both file names and directory names. Without emulation, only file names are returned.
- Search paths for dependents are supported. These look like:
forward.exe : {\src\alpha;d:\proj}pass.obj ...
- Inference rule search paths are supported. These look like:
[{fromdir}].fromext{todir}.toext : shell line for inference rule
- Inference rules for targets that have a directory component look for the inferred source in the directory of the target.
- The "!include file" directive is supported. If file is an absolute path name it is used otherwise Make looks for file in the current directory then in the directory of the including file. If file appears inside angle brackets (i.e. <file>), Make then looks along the directories in the INCLUDE environment variable.
- Double-colon dependencies without shell lines are allowed.
- Double-colon dependencies do not do an inference check.
If Make is emulating NMAKE, the following macro features are supported:
- Command-line macros are exported to the environment, so are available to recursive makes.
- Environment variables override most built-in macro definitions. Built-in macros not overridden by environment variables are: FIRSTTARGET, MAKE, MAKEFILE, OSRELEASE, OSVERSION and SHELLSUFFIX.
- The environment.MAKEFLAGS macro is exported to the environment.
If Make is emulating NMAKE, the following shell-line features are supported:
- The shell program is used for executing every shell line.
- The shell lines "cd dir", "chdir dir" and "X:" change to directory dir or drive X and stay there until explicitly changed back.
- A "set var=val" shell line is treated specially and sets the environment variable var to the value val. That is, this shell line is treated exactly like the Opus Make directive "%setenv var=val".
- The filename-parts syntax is supported. You can use this to get at the components of the name of the first source file. The complete filename is represented with the syntax: %s. Parts of the filename are represented with the syntax: %| [parts] F, where parts is zero or more of the following letters: none, the complete name; d, drive; p, path; f, file base name; e, file extension.
- Shell-line prefixes are limited to "@", "" and "!". A "^" as a prefix stops processing of prefixes.
- The "#" character is not treated as a comment in shell lines.
- Macros in non-rule shell lines are expanded. For example:
all : test1 test2 MACRO = one test1 : echo test1 $(TEST) MACRO = two test2 : echo test2 $(TEST)With emulation you get:
test1 one test2 twoWithout emulation you get:
test1 two test2 two
If Make is emulating NMAKE, the following features are supported:
- Under WinNT the creation time of directories is used for their timestamp. Without emulation the last-written time is used.
Opus Make supports the NMAKE response file syntax, except that multiple in-line response files on a single shell line are not support.
NMAKE and Opus Make allow the KEEP or NOKEEP keywords in the epilog of the inline response file. KEEP causes the response file to be kept (that is, not deleted). The default is NOKEEP.
If Opus Make is emulating NMAKE the following occur in inline response files:
- The comment character # is interpreted literally. Without emulation, # is a comment.
- !if, !else and !endif are interpreted at read-time. Without emulation they are treated at run-time.
Multiple in-line response files on a single shell line are not supported.
Home Product Info Orders Downloads About Us Contact Us
Opus Software, Inc.
1032 Irving Street, Suite 439 San Francisco, CA 94122 USA
Phone: 415-485-9703 Fax: 415-485-9704 Email:biz@opussoftware.com