DocumentationMMK Make UtilityUser's Guide  ·  ESS-MMKUG-001

Chapter 4

Command Description

4.1. MMK

Overview

Invokes the MMK utility to build a software system.

Format

MMK  [target-name ...]
Command QualifiersDefaults
/[NO]ACTION /ACTION
/[NO]CHECK_STATUS /NOCHECK_STATUS
/[NO]CMS /NOCMS
/CMS_LIBRARY=(dir-spec...)  
/DESCRIPTION=file-spec  
/DUMP  
/EXTENDED_SYNTAX  
/[NO]FORCE /NOFORCE
/[NO]FROM_SOURCES /NOFROM_SOURCES
/GENERATION=string /GENERATION="1+"
/IDENTIFICATION  
/[NO]IGNORE[=level] /NOIGNORE
/[NO]LOCAL_RULES /LOCAL_RULES
/[NO]LOG /NOLOG
/MACRO=file-spec | definition...  
/OUTPUT=file-spec  
/[NO]OVERRIDE /NOOVERRIDE
/[NO]RULES_FILE=file-spec...  
/[NO]SKIP_INTERMEDIATES /NOSKIP_INTERMEDIATES
/[NO]VERIFY /VERIFY[=ALL]
/WORKING_DIRECTORY=dir-spec  
target-name

Name of the target to be built. The target name must be listed in the description file. If no target name is specified, MMK builds the first target it finds in the description file. Multiple targets may be specified as a comma-separated list.

Description

The MMK utility builds a software system from the objects and dependencies listed in a description file. See the documentation for additional information.

/[NO]ACTION

Determines whether action lines are executed or just displayed. Specifying /NOACTION causes MMK to display the action lines that would be executed to build the target, without actually executing them.

/[NO]CHECK_STATUS

Directs MMK to determine whether a target is up-to-date, without executing any action lines to do so. MMK sets the global symbol MMS$STATUS to 0 if the target requires updating, or 1 if the target is up-to-date. This qualifier overrides the /ACTION qualifier.

/[NO]CMS

Determines whether a DEC/Code Management System (CMS) library is automatically searched for the MMK description file and for any source files. The default is /NOCMS, which omits any CMS checks.

/CMS_LIBRARY=(dir-spec...)

Specifies one or more DEC/Code Management System (CMS) libraries to be searched for the MMK description file and for any source files that do not have explicit CMS library specifications. Effective only when /CMS is also specified. If omitted, the default CMS library or libraries (from the logical name CMS$LIB or the CMS SET LIBRARY command) are used.

/DESCRIPTION=file-spec

Specifies an alternative name for the MMK description file. The default description file name is DESCRIP.MMS (in the current default directory), with MAKEFILE. being used if DESCRIP.MMS does not exist.

/DUMP

Causes MMK to dump the suffix list, all currently defined macros, all inference rules, and all dependencies to the current output before starting the build. This qualifier is useful in debugging problems in rules files and makefiles.

/EXTENDED_SYNTAX

...describe what this does, largely for MMS compatibility...

/[NO]FORCE

Specifying /FORCE causes MMK to execute only the action lines from the dependency rule for the target, without performing any revision date checks and without building any intermediate targets.

/[NO]FROM_SOURCES

Specifying /FROM_SOURCES causes MMK to perform a complete build of the target, ignoring revision dates. All actions to build all intermediate targets are executed.

/GENERATION=string

Specifies the default generation to be used when MMK fetches elements out of a CMS library. If omitted, the default generation is “1+”, which fetches the highest-numbered generation of an element. You can use this qualifier in combination with CMS classes to have MMK build a specific version of your software system, provided that all source code for the system is fetched from CMS during the build.

/IDENTIFICATION

Specifying /IDENTIFICATION causes MMK to display its revision information and a copyright message, without performing any other action.

/[NO]IGNORE[=level]

By default, MMK stops when an executed action line results in a warning, error, or fatal error status. You can override this by specifying /IGNORE. Using /IGNORE or /IGNORE=FATAL causes all errors to be ignored; specifying /IGNORE=ERROR causes errors and warnings to be ignored; specifying /IGNORE=WARNING causes only warnings to be ignored.

/[NO]LOCAL_RULES

Controls whether site-specific inference rule definitions are read in. By default, they are if the logical name MMK_LOCAL_RULES is defined and points to a readable description file. Specifying /NOLOCAL_RULES prevents this from occurring.

/[NO]LOG

Controls whether MMK logs a detailed description of its activity. By default, it does not.

/MACRO=file-spec | definintion...

Defines one or more macros that can be referenced by the description file. If a name is specified with no equals sign (“=”), it is first assumed to be a file specification; if the file exists, macro definitions are read from the file. A file type of .MMS is assumed if no file type is specified. If the file cannot be found, the name is treated as macro definition, and a value of 1 is assigned to the macro by default.

If an equals sign is present, the macro definition is taken directly from the command line.

Macro definitions contained in a file should have the same syntax as macro definitions in description files, with the added restrictions that comments and line continuations are not allowed.

/OUTPUT=file-spec

Directs MMK output to a location other than the default, SYS$OUTPUT.

/[NO]OVERRIDE

Determines the order in which macro references are resolved. The default order is to resolve macros from command-line definitions, followed by definitions in the description file and any rules files, followed by MMK built-ins. If a macro cannot be resolved from any of these sources, a check is made for a DCL symbol with the same name as the macro, and if present, the symbol's value is used.

When /OVERRIDE is specified, DCL symbols are checked before the macro definitions in the description and rules files, and before the MMK built-in macros.

/[NO]RULES_FILE[=file-spec...]

Specifies the name of one or more description files containing inference rules. If /RULES_FILE is specified with no file specification, the name MMS$RULES is used by default (this can be a logical name or can reference a file called MMS$RULES.MMS in the current directory).

If /NORULES_FILE is specified, the compiled-in default rules are not loaded when MMK is started, nor is any personal rules file (pointed to by the logical name MMK_PERSONAL_RULES). /NORULES_FILE does not prevent the loading of local rules; you must also specify /NOLOCAL_RULES to prevent local rules from being loaded.

/[NO]SKIP_INTERMEDIATES

By default, MMK attempts to build missing source files if they can be built through the application of dependency or inference rules. Specifying /SKIP_INTERMEDIATES causes MMK to treat these missing sources as if they exist and have the same revision date/time stamp as the target that depends on them.

For example, if the target is a .EXE file which depends on a .OBJ file, and that .OBJ file in turn depends on a .C file, by default MMK will build the .OBJ file if it is missing, and then in turn build the .EXE. If /SKIP_INTERMEDIATES is specified, the missing .OBJ file will not trigger a build; the build will only occur if the .C file is newer than the .EXE file.

/[NO]VERIFY[=ALL]

Controls whether MMK echoes action lines to SYS$OUTPUT. Enabled by default. By specifying the keyword ALL it is possible to force MMK to echo all command output, including that which is prefixed with @. For debugging purposes it is possible to specify the keyword ALL which will cause MMK to verify all action lines, even those prefixed with @ (silent) action line prefix. This also overrides the .SILENT directive.

/WORKING_DIRECTORY=dir-spec

Causes MMK to SET DEFAULT to the specified directory before processing the description file. This can be useful when using the /NOACTION qualifier for a build in a directory containing subdirectories with their own description files, since only actions invoking $(MMS) get executed when /NOACTION is used. By replacing the actions:

  SET DEFAULT [.subdirectory]
  $(MMS) $(MMSQUALIFIERS)

with the action

  $(MMS) $(MMSQUALIFIERS)/WORKING_DIRECTORY=[.subdirectory]

the entire multi-directory build can be tested with /NOACTION successfully.