Home Product Info Orders Downloads About Us Contact Us
Opus Make v6.1x achieves a great deal of compatibility with PolyMake / Configuration Builder (PM/CB). This means Opus Make understands the makefiles of PM/CB without you needing to change anything.
Where something in Opus Make differs from PM/CB we provide emulation. One example difference is in the command line: Opus Make and PM/CB don't have the same command line but with emulation Opus Make handles the PM/CB command line syntax.
There are also some PM/CB features not supported by Opus Make. Follow the unsupported link.
Opus Make v6.1x is highly compatible with PolyMake up to v4.0 and with Configuration Builder to v5.1. Opus Make supports all PM/CB macros and transformation macros, library object modules, local input scripts and most directives.
Opus Make supports the PolyMake/Configuration Builder system macros listed below:
System Macro Value Opus Macro _Arguments command-line arguments MAKEARGS _Cwd current working directory MAKEDIR _Directory current working directory MAKEDIR _Exe path name of the Make program MAKE _FirstTarget first command-line target or, if none, the first makefile target FIRSTTARGET _Flags command-line flags MAKEFLAGS _FlagsMacros command-line flags and macros _InputFile current makefile INPUTFILE _Macros command-line macros MAKEMACROS _PctStatus status of last operation line status _Script default or first-named makefile MAKEFILE _Source source for current target .SOURCE _SourceRev version control version of current target .VERSION _Sources sources for current target .SOURCES _SysMode operating system mode: "PROT" (Win95, WinNT & OS/2) or "REAL" (MSDOS) _System operating system: "MS-DOS" or "OS/2" OS _SysVer operating system version: "major.minor" _TargRoot root part of the current target name .TARGETROOT _Version the PM/CB version number: "v5.1". M_ARGS see _MakeArgs above MAKEARGS MAKEARGS see _MakeArgs above MAKEARGS MAKEVER see _Version above PCTSTATUS see _PctStatus above status SYSTEM see _System above OS SYSMODE see _SysMode above SYSVER see _SysVer above
Opus Make supports the PM/CB v5.x transformation macros, with long or 1-letter names. Where there is an Opus Make equivalent it is listed in the right column.
Note that PM/CB macros work on text, while Opus Make modifiers work on a macro which is expanded into text, then modified. To use the Opus equivalent you need to define macro name with value text.
Trans. Macro Long name Result Opus Equiv. $[@,text] Include Include contents of file text. $(name,@) $[c,str,begin,end] Clip Clip string str between begin and end. $[d,text] Directory Directory part of text. $(name,D) $[e,text] Extension Extension part of text. $(name,E,.=) $[f,path,list,ext] Filename Build file name from path, list and ext. $[l,text] Lower Convert text to lower case. $(name,LC) $[m,spec,text] Match Elements in text that match file spec. $(name,M"spec") $[n,text] Normalize Normalize text as absolute filename. $(name,A) $[p,text] Path Path name of text. $(name,P) $[r,text] Base Base name of text. $(name,B) $[s,separator,text] Separators Replace text separators with separator. $(name,Wsep) $[t,t1,t2,list] Translate Translate list mapping letters t1 to t2. $[u,text] Upper Convert text to upper case. $(name,UC) $[v,text] Drive Drive label of text. $[w,text] FileList Wild-card expand file spec. text. $(name,*F) $[x,text] DirList Wild-card expand directory spec. text. $(name,*D) $[Root,text] Root name of text. $(name,R)
In conditional expressions Opus Make accepts the following:
The exit status of last shell line. It is the same as $(status) in Opus Make.
%exit [ status ]
This directive terminates the make process with exit status (0 if status isnt given). Before terminating, the .DEINIT and .EPILOG special targets are run if they are defined. .DEINIT is run only if .INIT was run.
Opus Make supports most PM/CB directives. For read-time interpretation the directive starts in the first column of the makefile. For run-time interpretation PM/CB emulation must be chosen and the directive must be indented.
The following is a short description of the supported directives:
Description .Archive files read This is handled by Make as a ".PVCS_STORAGE : files" directive. .ExtraLine read This causes an additional carriage return/linefeed to be output after each shell line is executed. The negation is .NoExtraLine. .Emulate [Builder | NMAKE] read This sets the emulation mode to either Builder (PM/CB) or NMAKE. .File [=] file ... read Each file in the source list is treated as "not special." The .File target is used to override special status for the .Library files which are discussed below. .Ignore read This causes non-zero shell-line statuses to be ignored. .Include [=] file ... read Reads each file. If PM/CB emulation is chosen, Make looks for relative file names in the current directory. If PM/CB emulation is not chosen, Make treats .INCLUDE file the same as the %include file directive. .KeepDir read & run The same as the Make .KEEPDIR directive. .KeepIntermediate read & run This prevents intermediate files from being deleted. .KeepWorking read & run The same as the Make .KEEPWORKING directive. .Keep_Lis read & run This prevents local input scripts (inline response files) from being deleted. The negative of this directive is .NoKeep_Lis. .Library [=] [CASE] [file | ext ...] read Each file in the source list is treated as a library file. For Make, this means this file has the .LIBRARY attribute. If ext is used, rather than a file name, the .LIBRARY attribute will apply to all files with extension ext. CASE controls whether case is important during the lookup of the object module name in the library. The default is that case is unimportant. .Lis_Comments read This causes "#" in local input scripts to be considered literally, rather than as a comment character. You can also use "\#" to mean a literal "#". .Lis_File [=] [filename] read & run Names the local input script file. Unlike PM/CB, Make allows a blank filename to re-enable automatic generation of the local input script name. .Logfile files read Handled by Make as a ".PVCS_STORAGE : files" directive. .MemSwap [=] [name ...] read The same as the Make .MEMSWAP directive. .Ms_Nmake read The same as the Make .MS_NMAKE directive. .NoEnvMacros read The same as the Make .NOENVMACROS directive. .NR_EXPAND read This directive causes macro-expansion of the right-hand side of each = and += macro definition. .Order read The same as the PM/CB ".Suffixes :" directive. .Override read The same as the PM/CB .File directive. .Path.ext [=] dir-1[;dir-2].. read The same as the Make ".PATH.ext = dir-1[;dir-2]..." macro definition. .PermitComments read The same as .Lis_Comments. .Poly_Make read & run The same as the Opus Make .POLY_MAKE directive. .Precious read The same as the PM/CB .KeepIntermediate directive. .RejectInitFile read The same as the Opus Make .REJECT_RULES directive. .Remake read Targets are fully made each time they are encountered as sources. .Shell [shell_program] read & run Similar to the Opus Make .SHELL directive, but without automatic detection of when to use the shell program. .Silent read Shell lines arent displayed to the screen before execution. .Source [=] dir_list file ... read The same as the Make ".SEARCH : dir_list file ..." directive. .Source[ .ext ] : [dir-1 dir-2 ...] read This PM/CB ".SOURCE dependency" is identical to a .PATH macro and is treated as an Opus Make ".PATH.ext = dir-1[;dir-2]..." macro definition. .Suffixes read The same as Makes .REJECT_RULES directive. .Suffixes : read The same as Makes .SUFFIXES directive. .VolatileTargs read The same as the PM/CB .Remake directive.
Opus Make supports PM/CB reserved targets, as listed here:
Name Value .DEINIT [ : ] If the .INIT special target was used, the shell lines of the .DEINIT target are executed just before the shell lines of .EPILOG are executed. .EPILOG [ : ] The same as Makes .AFTER special target. If emulating PM/CB, Make looks only for .EPILOG. Otherwise Make looks for .AFTER then .EPILOG. .INIT [ : ] This targets shell lines are executed just before any other shell lines. .PROLOG [ : ] The same as Makes .BEFORE special target. If emulating PM/CB, Make looks only for .PROLOG. Otherwise Make looks for .BEFORE then .PROLOG.
Opus Make accepts the PM/CB response file syntax:
command [ prolog ] <X<[ text ]
< [ epilog ]
where X is a single character, usually @. If text is given it is copied to the response file. Each shell line is then copied to the response file. The command is invoked with:
command prolog Xtempfile epilog
where tempfile is a temporary file with a name of the form makenum.rsp
If Opus Make is emulating PM/CB, any directives in the local input script are interpreted at read time. Without emulation they are interpreted at run time.
PM/CB operation-line modifier Opus Make shell-line prefix (Always) & (ExtraLine) > (Ignore)[ status ] [ status ] (Iterate) ! (MemSwap) * (":" if emulating PM/CB) (NoShell) : ("*" if emulating PM/CB) (Shell) + (Silent) @ (TrackErrors) ~
Opus Make is highly compatible with PM/CB but there are differences in how these two read makefiles and in how they run. Opus Makes PM/CB emulation mode causes Opus Make to operate like PM/CB.
If PM/CB emulation mode is selected at start-up time, Make emulates the PM/CB command line and selection of the built-ins file. Selection of PM/CB emulation at start-up time is done with:
- the "EP" 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 PM/CB. 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 PM/CB. 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 "EP", Make starts up emulating PM/CB.
The .POLY_MAKE directive turns on PM/CB emulation mode from the point it appears in the initialization file or any makefile.
First the OPUSMAKEOPTS environment variable is parsed for options. Then, if Make is emulating PM/CB at start up, the MAKEOPTS and BUILD environment variables are parsed for options. Then the command line is parsed. Parsing entails:
- Handling the case-insensitivity of the PM/CB command line.
- Mapping options into Opus Make equivalents. The help screen switches to the options available with our emulation of PolyMake v4.0 and Configuration Builder v5.x. The help screens contents are stored in the file help611.cb.
- Handling the long-named Configuration Builder v5.x options.
- Warning about unconvertible command-line options.
- Printing a banner, unless the "nologo" or "#4" command-line flags are used.
If Opus Make is emulating PM/CB at start up, Opus Make first reads its internal rules and macros, then looks for builtins.cb first in the directory of make.ini, then in the directory of make.exe, then along directories of the INIT environment variable. If builtins.cb is found it is read for macros and rules that give more complete PM/CB emulation.
PM/CB distinguishes between an initialization file and a builtins file. Both contain initialization information. The initialization file is almost always the file called tools.ini.
If Opus Make is emulating PM/CB at start up, Opus Make next reads the initialization file:
- named by the "Init" command-line flag, or
- 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 "[PVCS".
If Opus Make is emulating PM/CB at start up, Opus Make next reads the built-in file:
- named by the "b" command-line flag, or
- called builtins, in the current directory, or
- called builtins.mak, in the current directory, or
- named by the BUILTINS environment variable.
If Make is emulating PM/CB at start up, Make looks for the default makefile in the order: script.bld, script, makefile, or makefile.mak. The first file found is read. When trying to read a makefile file that doesnt have an extension, Make first tries file, then file.bld, then file.mak.
If Opus Make is emulating PM/CB:
- The line continuation character sequence "\enter" is removed from the input.
- The "^" character is used for quoting and produces the following affects:
Sequence Interpretation ^^ literal "^" ^enter literal newline ^$ literal "$" (same as Opus $$) ^\ literal "\" ^# literal "#" (same as Opus \#) ^other other (^ is dropped)
- The PM/CB-compatible directives listed in the previous section can be used at run time as well as read time.
- The %end directive is the same as %endif. Without emulation, %end terminates a %foreach or %while directive.
- .INCLUDE file searches only the current directory.
- Makefile macro names are case-sensitive.
- The "=+" macro (prepend) definition is supported.
- Environment variables override built-in macro definitions.
- The MFLAGS macro is the same as _FlagsMacros.
- The TMP, TEMP, and WORK environment variables are tried, in order, for the location of the directory where temporary files are created. Without emulation, Make uses the value of the MAKE_TMP macro.
- Duplicates entries in a targets dependencies are allowed. Without emulation, Opus Make removes duplicate dependencies.
- Empty directory entries in .PATH and .SOURCE are treated like ".". Without emulation, Opus Make ignores empty directory entries.
If Opus Make is emulating PM/CB:
- The shell program is used for executing every shell line. The "*" and (NoShell) prefixes suppress execution by the shell for this shell line.
- The shell lines "cd dir" and "chdir dir" both change to directory dir and stay there until explicitly changed back. Otherwise, Make starts each shell line from the directory that Make started in the $(MAKEDIR) directory.
- The ":" modifier means swap out of memory and "*" means suppress shell. Without emulation, "*" means swap out and ":" means suppress shell.
- The "" shell-line prefix does not print the "Error code ... (ignored)" message.
When running PM/CB makefiles with Opus Make you should be aware of Opus lack of support for some PM/CB features. Here is the list, with a work around where available:
Value .ArcFile Used for telling PM/CB about ARC compression files. .ExamineCmt
Used to specify that comments should be checked for line continuation. Although this directive is unsupported, Opus Make does handle line continuation inside of comments. .Error[.xxx] This reserved target supplies auxiliary instructions for building targets when a shell line returns a non-zero exit status. Use conditional directives instead. .FootPrint This directive controls foot printing targets with an internal comment record. .Ms_Make Selects Microsoft MAKE emulation. .NoEnvInherit Prevents the environment from being passed to child processes. .Rebuild This directive is used to rebuild previous versions of applications. .ZipFile This directive tells PM/CB about ZIP compression files
An iteration group does an implicit iteration over the $? macro. For example:
test.lib : test.obj chart.obj input.obj
lib contract.lib add $? make m2 noask
The %foreach directive can be used in its place:
test.lib : test.obj chart.obj input.obj
%foreach file in $?
lib contract.lib add $(file) make m2 noask
Suffix dependencies allow the specification of a set of suffixes to be tried when building a particular target. This is not supported by Opus Make.
The following PM/CB command-line flags are not supported: Batch, C, Compile,
NoEnvInherit, or Rebuild.
The "~" suffix on archive extensions to handle like-named files in different directories is not supported. Use a pattern-matching rule instead, such as:
%.c : c:/apps/archives/%.c
get q w $(_SourceRev) $(_Source)($(_Target))
The _DefaultSuffixes system macro is not supported.
Opus Make does not automatically parse the PVCS Version Manager configuration file.
For PM/CB the (Always) operation-line modifier overrides the Touch flag. This is not supported in Opus Make. You can use the .MAKE attribute instead. For example:
# Opus Make
recursive .MAKE :
The built-in operations that handle foot printing are not supported. These operations are: %EAStamp, %ExeStamp and %ObjStamp.
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:email@example.com