Home    Product Info    Orders    Downloads    About Us    Contact Us


Intersolv PolyMake & Configuration Builder
Compatibility and Emulation

The following section is from the Opus Make manual, Appendix D.1

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.

PM/CB Compatibility [Top]

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.

System Macros

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  

Transformation Macros

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)

Built-In Functions

In conditional expressions Opus Make accepts the following:


The exit status of last shell line. It is the same as $(status) in Opus Make.

Built-In Operations

%exit [ status ]

This directive terminates the make process with exit status (0 if status isn’t 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:

Directive Applicable
.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 aren’t 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 Make’s .REJECT_RULES directive.
.Suffixes : read The same as Make’s .SUFFIXES directive.
.VolatileTargs read The same as the PM/CB .Remake directive.


Reserved Targets

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 Make’s .AFTER special target. If emulating PM/CB, Make looks only for .EPILOG. Otherwise Make looks for .AFTER then .EPILOG.
.INIT [ : ] This target’s shell lines are executed just before any other shell lines.
.PROLOG [ : ] The same as Make’s .BEFORE special target. If emulating PM/CB, Make looks only for .PROLOG. Otherwise Make looks for .BEFORE then .PROLOG.


Local Input Scripts

Opus Make accepts the PM/CB response file syntax:

target :
command [ prolog ] <X<[ text ]
shell line

< [ 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.

Operation-Line Modifiers are Supported

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) ~

PM/CB Emulation [Top]

Opus Make is highly compatible with PM/CB but there are differences in how these two read makefiles and in how they run. Opus Make’s PM/CB emulation mode causes Opus Make to operate like PM/CB.

Emulation at Start-Up Time

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:

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.

Emulation After Start-Up Time

The .POLY_MAKE directive turns on PM/CB emulation mode from the point it appears in the initialization file or any makefile.

The Command Line

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:

The Emulation File (BUILTINS.CB)

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.

The Initialization File (TOOLS.INI)

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:

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:

The Makefile

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 doesn’t have an extension, Make first tries file, then file.bld, then file.mak.

Makefile Contents

If Opus Make is emulating PM/CB:

Sequence Interpretation
^^ literal "^"
^enter literal newline
^$ literal "$" (same as Opus’ $$)
^\ literal "\"
^# literal "#" (same as Opus’ \#)
^other other (^ is dropped)

Operation Lines (Shell Lines)

If Opus Make is emulating PM/CB:

Unsupported PM/CB Features [Top]

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:

Unimplemented Directives and Reserved Targets

Directive or
Reserved Target
.ArcFile Used for telling PM/CB about ARC compression files.
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

Iteration Groups

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

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.

Command-Line Flags

The following PM/CB command-line flags are not supported: –Batch, –C, –Compile,
–NoEnvInherit, or –Rebuild.

Makefile Contents

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.

Shared Definitions

Opus Make does not automatically parse the PVCS Version Manager configuration file.

Operation-Line Modifiers (Shell-Line Modifiers)

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:

recursive :
(Always)$(MAKE) $(MAKEFLAGS)

# Opus Make
recursive .MAKE :

Built-in Operations

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: