                                       &           Guide to Matt's Make Utility                 July, 1994      <           This manual describes Matt's Make Utility (MMK), a)           "make" utility for VMS systems.         8           Revision/Update Information:  This is a DRAFT.  >           Operating System and Version: VAX/VMS V5.2 or later;A                                         OpenVMS AXP V1.0 or later   2           Software Version:             MMK V3.2-2                 Matthew Madison            MadGoat Software                                                 "           ________________________           22 August 1994  =           Permission is granted to copy and redistribute this *           document for no commercial gain.  ?           The information in this document is subject to change 9           without notice and should not be construed as a 9           commitment by the author. The author assumes no ?           responsibility for any errors that may appear in this            document.   =           DISCLAIMER: The author and MadGoat Software make no ;           representations or warranties with respect to the ?           contents hereof and specifically disclaim any implied :           warranties of merchantability or fitness for any           particular purpose.   ;           The following are trademarks of Digital Equipment            Corporation:  8           AXP                DEC                 OpenVMS            VAX                VMS  5           UNIX is a registered trademark of USL, Inc.              __________<           Copyright 1993, 1994 MadGoat Software. All Rights           Reserved.                        A           _______________________________________________________              Contents  A                 _________________________________________________ A                 PREFACE                                       vii   A           _______________________________________________________ A           CHAPTER 1  INTRODUCTION                             1-1   A                 _________________________________________________ A                 1.1   OVERVIEW                                1-1   A                 _________________________________________________ A                 1.2   INVOKING MMK                            1-2     A           _______________________________________________________ A           CHAPTER 2  DESCRIPTION FILES                        2-1   A                 _________________________________________________ A                 2.1   DESCRIPTION FILE COMPONENTS             2-1   A                 _________________________________________________ A                 2.2   USING INFERENCE RULES                   2-2   A                 _________________________________________________ A                 2.3   DEFINING INFERENCE RULES                2-3   A                 _________________________________________________ A                 2.4   MODIFYING THE SUFFIX LIST               2-5     A           _______________________________________________________ A           CHAPTER 3  USING DEC/CMS WITH MMK                   3-1   A                 _________________________________________________ A                 3.1   THE /CMS QUALIFIER                      3-1         A                                                               iii                     Contents          A                 _________________________________________________ A                 3.2   EXPLICIT CMS ELEMENT REFERENCES         3-1   0                 3.2.1     Specifying the ElementA                           Generation  ____________________    3-2   A                 _________________________________________________ A                 3.3   INFERENCE RULES FOR CMS FILES           3-2   4                 3.3.1     CMS and Prefixed InferenceA                           Rules  _________________________    3-3 :                 MMK                                    3-4  A           _______________________________________________________ A           APPENDIX A  DIFFERENCES BETWEEN MMK AND DEC/MMS     A-1   A                 _________________________________________________ 7                 A.1   DEC/MMS FEATURES NOT SUPPORTED IN A                       MMK                                     A-1   A                 _________________________________________________ A                 A.2   MMK EXTENDED FEATURES                   A-2   A                 _________________________________________________ A                 A.3   OTHER DIFFERENCES                       A-4   A           _______________________________________________________ A           APPENDIX B  BUILT-IN DEPENDENCY RULES               B-1     A           _______________________________________________________ A           APPENDIX C  USING THE CROSS_ALPHA RULES             C-1                            iv         A                                                          Contents           A           _______________________________________________________            FIGURES   8                 B-1       MMK default dependency rules -A                           VAX  ___________________________    B-1   8                 B-2       MMK default dependency rules -A                           AXP  ___________________________    B-8   A           _______________________________________________________            TABLES  A                 C-1       MMK default suffix macros  _____    C-1   A                 C-2       CROSS_ALPHA suffix macros  _____    C-1                                                   A                                                                 v                    A           _______________________________________________________              Preface   @           This guide explains how to install and use Matt's Make           (MMK).  L           __________________________________________________________________             Intended Audience   >           This manual is intended for all MMK users, primarily9           programmers who need to build software systems.   :           MMK is patterned after VAX DEC/Module Management>           System (DEC/MMS), which is in turn based on the UNIX>           make utility. The reader is assumed to have at least/           cursory knowledge of make or DEC/MMS.   <           Note: This is a DRAFT document, and is still under;           construction. New users are advised to learn more :           about description files (makefiles) by reviewing@           either DEC/MMS documentation or books on the UNIX make           utility.  L           __________________________________________________________________             Document Structure  
           tbs   L           __________________________________________________________________             Related Documents   
           tbs   L           __________________________________________________________________             Conventions   <           In this document, the following convention will be<           used for the names of the three similar utilities:  @           o  MMK refers to Matt's Make, the package described in              this document.   @           o  DEC/MMS refers to VAX DEC/Module Management System,8              a product of Digital Equipment Corporation.  A                                                               vii                     Preface           2           o  make refers to the UNIX make utility.                                                                                         viii                     A           _______________________________________________________       1      Introduction      ?           This chapter describes Matt's Make (MMK). It includes >           an overview of MMK and basic information on its use.  L           __________________________________________________________________      1.1    Overview  >           MMK is a tool for building a "software system;" that>           is, a collection of one or more executable images or?           other types of files that are related to a particular ;           project. Building a complex system by hand can be <           a difficult and time-consuming task; using command?           procedures can make the task easier, but it may still            be time-consuming.  >           With MMK, you create a file called a Makefile or MMS@           description file to describe your software system: the?           objects (i.e., source files, object files, etc.) that =           comprise the system, the dependencies between those =           objects, and the commands used to build the system. ?           When you invoke MMK, it performs the following steps:   7           1  MMK reads and parses the description file, 5              constructing a tree from the objects and -              dependencies listed in the file.   >           2  It then identifies the object to be built (called              the target).   @           3  The tree of dependencies is traced from the target,>              and the revision dates for the files in that path;              are compared. If an object doesn't exist or is A              older than the object it depends on, the commands to @              build the object are executed in a subprocess. This=              continues until all objects along the dependency ;              path have been checked and the target has been +              brought completely up-to-date.   A                                                               1-1                     Introduction          >           In this way, MMK can execute the commands to rebuild=           only those pieces of your software system that need =           rebuilding due to a change that you have made. This @           can drastically reduce development time for a project.  L           __________________________________________________________________      1.2    Invoking MMK  >           Provided that MMK has been installed using the steps9           laid out in the installation instructions (file @           AAAREADME.INSTALL in the kit), you can invoke MMK from#           DCL as a foreign command:                               $MMK   >           Full command syntax is given in MMK. By default, MMK<           looks for a description file called DESCRIP.MMS in=           the current directory; if that file does not exist, @           it then looks for a file called MAKEFILE. If it cannot?           find that file, an error is signaled. You can use the @           /DESCRIPTION qualifier to specify a different name for+           your description file, if needed.   8           MMK starts by reading the description file and<           constructing a tree from the objects listed in the>           description file (e.g., source files, include files,@           object files, etc.) and a tree of dependencies between=           those objects. It then identifies the target object ;           to be built, and traverses the dependency tree to >           identify those objects that need to be built (called=           intermediate targets) in order to build the target.   ?           MMK compares each target's revision date/time against :           the objects on which it depends and executes the>           actions for that building the target only if needed.>           You can force a complete rebuild by using the /FROM_/           SOURCES qualifier on the MMK command.     
           1-2                      A           _______________________________________________________       2      Description Files       ?           The key to successfully building your software system =           with MMK is the creation of a complete and accurate =           description file. This chapter describes the format 4           for a description file and its components.  L           __________________________________________________________________  %    2.1    Description File Components   =           A description file is a collection of the following            components:   @           o  Dependencies, which describe how one object depends*              on one or more other objects.  ?           o  Actions, which are commands to be executed when an &              object needs to be built.  @           o  Macro definitions, for defining symbols that may be&              used in rules or actions.  >           o  Inference rule definitions, which are rules basedA              on suffixes (and possibly directories as well), from A              which MMK can infer dependencies and actions without A              you having to list them explicitly in your makefile.   =           o  MMK directives, which provide a means for adding 8              commands to be executed before or after all>              other actions, provide a simple conditional-build@              mechanism, and other directives for modifying MMK's              behavior.      A                                                               2-1                     Description Files           :           Here is an example of a simple description file:  A                            PROGRAM.EXE : MAIN.OBJ,SUBROUTINES.OBJ M                                LINK/EXEC=PROGRAM.EXE MAIN.OBJ,SUBROUTINES.OBJ .                            MAIN.OBJ : MAIN.FOR+                                FORTRAN MAIN <                            SUBROUTINES.OBJ : SUBROUTINES.MAR0                                MACRO SUBROUTINES  9           This is a simple collection of dependencies and ;           actions for building an image called PROGRAM.EXE. 9           PROGRAM.EXE depends on two object files, called @           MAIN.OBJ and SUBROUTINES.OBJ; MAIN is a FORTRAN module,           and SUBROUTINES is a MACRO module.  >           MMK accepts either a colon or the DEC/MMS DEPENDS_ON?           keyword to separate a target object from its sources. =           In either case, the separator must be surrounded by ?           blanks-this differs from make, but is consistent with            DEC/MMS syntax.   L           __________________________________________________________________      2.2    Using Inference Rules   ?           MMK includes a collection of built-in inference rules =           and actions for most VMS programming languages. The >           rules are driven by the file type suffix attached to>           the object name; you must use the default file types4           in order to make use of the default rules.  ?           For example, the description file in the last section &           could be simplified to just:  A                            PROGRAM.EXE : MAIN.OBJ,SUBROUTINES.OBJ M                                LINK/EXEC=PROGRAM.EXE MAIN.OBJ,SUBROUTINES.OBJ .                            MAIN.OBJ : MAIN.FOR<                            SUBROUTINES.OBJ : SUBROUTINES.MAR  =           MMK's built-in inference rules automatically define :           the actions for building a .OBJ file from a .FOR=           (using the FORTRAN command) and for building a .OBJ :           file from a .MAR file (using the MACRO command).  
           2-2          A                                                 Description Files           @           The description file could even be simplified further,           to just:  A                            PROGRAM.EXE : MAIN.OBJ,SUBROUTINES.OBJ M                                LINK/EXEC=PROGRAM.EXE MAIN.OBJ,SUBROUTINES.OBJ   ;           MMK automatically searches the suffixes list when 6           constructing the dependency tree and locates;           inference rules for the .OBJ files automatically. >           This illustrates the second use for inference rules::           they are used not only for inferring actions for<           a dependency that omits them, but they may also be?           used for inferring dependencies themselves based on a @           combination of source and target suffixes. This second@           purpose can greatly simplify your makefiles, and makes+           the build process more automatic.   L           __________________________________________________________________  "    2.3    Defining Inference Rules  <           You can define your own inference rules, either to<           extend or replace the ones built into MMK. You may@           include these rule definitions in your makefile, or in>           a separate file called a rules file. Rules files can=           be included by the use of a logical name or throughs>           the /RULES qualifier on the MMK command; see the MMK"           for further information.  @           MMK supports two types of inference rules: generic and>           prefixed. Generic rules are based solely on suffixes           (file types), as in:  #                            .C.OBJ : D                                CC/OBJECT=$(MMS$TARGET) $(MMS$SOURCE)  =           which says, "to build filename.OBJ from an existing 9           file called filename.C, use the CC command." Int>           general, generic rules work best when the source and4           target files reside in the same directory.  A                                                               2-3  m  e               Description Filesm          =           Prefixed inference rules are based on both suffixes =           and "prefixes"-device and directory specifications.d=           This provides a way to have MMK automatically infer =           dependenices between files that reside in differenty=           directories. For example: For example, the prefixed            rule:y  1                            {SRC$:}.C{OBJ$:}.OBJ :lD                                CC/OBJECT=$(MMS$TARGET) $(MMS$SOURCE)  8           tells MMK, "to build OBJ$:filename.OBJ from an:           existing file called SRC$:filename.C, use the CC?           command." This works like the generic rule above, buto@           with the additional provision of having the source and/           target reside in different locations._  8           You can have more than one prefixed rule for a?           particular pair of suffixes; you may also mix generic_?           rules and prefixed rules for a pair of suffixes. When :           attempting to infer a dependency, MMK will first=           use the prefixed rules, then fall back to using the            generic rule.   ?           In prefixed rules, the curly braces ("{" and "}") are_<           required. One of the two prefixes may be null, but@           specifying two null prefixes is equivalent to defining           a generic rule.   ?           In order to match a prefixed rule, file specification 9           as it exists in the description file must match 9           the prefix in the rule; MMK performs no logical ;           name translation on prefixes, nor can it identify_?           equivalencies between two prefixes that reference theT0           same directory using different syntax.  :           The first inference rule for a pair of suffixes,<           whether it is generic or prefixed, must specify an<           action list; subsequent rules for the same pair of@           suffixes (with different prefixes) may have the action=           list omitted, in which case MMK will use the action @           list from the first rule. For example, MMK already has7           a built-in generic rule for .C.OBJ, which is:_  
           2-4          A                                                 Description Files           #                            .C.OBJ :_;                                $(CC)$(CFLAGS) $(MMS$SOURCE)   >           If you are simply adding a set of prefixed rules for?           the .C.OBJ suffix pair, you do not need to specify an =           action list on those rules; MMK will use the action_.           list from the built-in generic rule.  L           __________________________________________________________________  #    2.4    Modifying the Suffix List_  ;           MMK uses a suffix list to determine the inference_@           rules it should search for inferring a dependency. MMK=           has a built-in suffix list which goes with its list >           of built-in inference rules; see Appendix B for more<           information on the built-in rules and suffix list.  8           You can augment or replace the built-in suffix<           list with your own suffixes by using the .SUFFIXES2           directive in a rules file or a makefile.  =           For example, let's say you have a Modula-2 compiler =           on your system, whose source files have a file type 9           (suffix) of .MOD. MMK has no built-in inference >           rules for this file type; you could add one with the           following sequence:E  +                            .SUFFIXES : .MOD   %                            .MOD.OBJ :_I                                MODULA2/OBJECT=$(MMS$TARGET) $(MMS$SOURCE)   <           The .SUFFIXES directive above adds the .MOD suffix<           to the end of the suffix list. This is followed by?           the inference rule for creating an object file from a_           Modula-2 source file.   @           Specifying the .SUFFIXES directive with nothing to the@           right of the colon clears the current suffix list. You=           can do this to prevent MMK from using any inference_;           rules for the current build, or to follow it with ?           another .SUFFIXES directive that specifies only thoses;           suffixes for which you want inference rules to be_           enabled.  A                                                               2-5     X                A           ________________________________________________________       3      Using DEC/CMS with MMK      >           This chapter describes the use of Digital's DEC/Code/           Management System (DEC/CMS) with MMK.u  L           __________________________________________________________________      3.1    The /CMS Qualifier  :           The MMK command supports a /CMS qualifier, which:           activates the automatic use of the currently set<           DEC/CMS library for the current build. This causes?           source files to be fetched out of the DEC/CMS library_8           automatically, if needed. In addition, the MMK<           description file will automatically be fetched out6           of the DEC/CMS library if it does not exist.  :           The built-in suffix list and dependency rules in=           MMK include default rules for fetching source filesE>           out of DEC/CMS libraries. Suffixes ending in a tilde?           character ("~") signify DEC/CMS library elements. Thew>           built-in DEC/CMS element rules are used only if /CMS*           is specified on the MMK command.  L           __________________________________________________________________  )    3.2    Explicit CMS Element ReferencesC  ?           You can explicitly reference a CMS library element in @           your MMK description file by adding a tilde to the end1           of the file specification. For example:   1                            MAIN.FOR  :  MAIN.FOR~_  ;           You can also explicitly name the CMS library fromt>           which the element should be fetched, by specifying a'           device and/or directory name:   I                            MAIN.FOR  :  SOURCE_DISK:[CMS_SOURCE]MAIN.FOR~w  A                                                               3-1                      Using DEC/CMS with MMK          <           If you do not explicitly name the CMS library, the>           currently set CMS library (set with CMS SET LIBRARY)           will be used.n  %           ___________________________   +    3.2.1  Specifying the Element Generation   >           By default, MMK uses the qualifier /GENERATION=1+ on?           all CMS FETCH operations, to get the highest-numbered <           generation of a particular element. If you need to;           build a dependency on a specific generation of an_>           element, you may do so by specifying the /GENERATION%           qualifier on the file name:   ?                            MAIN.FOR  :  MAIN.FOR~/GENERATION=37   <           The above example would cause generation 37 of the=           MAIN.FOR file in the current CMS library to be used            for the build.  L           __________________________________________________________________  '    3.3    Inference Rules for CMS Files   >           MMK comes with built-in inference rules for fetching<           source files from a CMS library. Like DEC/MMS, MMK9           uses these rules only when you specify the /CMS ?           qualifier on the MMK command. This allows you to have (           a makefile like the following:  .                            TEST.EXE : TEST.OBJ@                                $(LINK)$(LINKFLAGS) $(MMS$SOURCE)  .                            TEST.OBJ : TEST.FOR  @           If you have a CMS library set and you specify the /CMS>           qualifier on the MMK command, MMK will automatically=           check to see if TEST.FOR resides in the CMS libraryM9           and will fetch it out of the library if needed.n  9           However, MMK also allows you to omit the secondc<           dependency in the makefile, and will automatically@           "double-infer" the existence the .FOR file, even if it:           has not yet been fetched out of the CMS library.  
           3-2t r  s    A                                            Using DEC/CMS with MMKo        %           ___________________________t  *    3.3.1  CMS and Prefixed Inference Rules  <           You can have MMK automatically search specific CMS@           libraries for source files by using prefixed inference=           rules. For example, if you were working on a cross- 9           platform development project which used two CMS 9           libraries - one for OS-specific source code and <           another for common source code - you might use the#           following prefixed rules:b  ?                            {CMSSRC:[VMS_SPECIFIC]}.FOR~{}.FOR : 9                            {CMSSRC:[COMMON]}.FOR~{}.FOR :T  ?           This sequence would cause MMK to automatically searchc=           the CMSSRC:[VMS_SPECIFIC] CMS library for a FORTRAN_?           source file, then search the CMSSRC:[COMMON] library.d9           If the file were not located in either library,d<           MMK would fall back to using the currently set CMS<           library. You must still have a CMS library set and>           you must specify the /CMS qualifier for prefixed CMS&           inference rules to be tried.                                    A                                                               3-3r    e    
           MMK           A           _______________________________________________________a  
           MMKi  =           Invokes the MMK utility to build a software system.D  A           _______________________________________________________d             FORMAT              MMK  [target-name ...]  A           _______________________________________________________t)           Command Qualifiers     Defaultst  (           /[NO]ACTION            /ACTION'           /[NO]CMS               /NOCMSe            /DESCRIPTION=file-spec           /DUMPI)           /[NO]FORCE             /NOFORCE 0           /[NO]FROM_SOURCES      /NOFROM_SOURCES           /IDENTIFICATIONo*           /[NO]IGNORE[=level]    /NOIGNORE-           /[NO]LOCAL_RULES       /LOCAL_RULES '           /[NO]LOG               /NOLOGc            /MACRO=[definition...]           /OUTPUT=file-specn.           /[NO]RULES_FILE=file-sp/NORULES_FILE(           /[NO]VERIFY            /VERIFY  A           _______________________________________________________O             PARAMETERS           target-namea>           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.  
           3-4h c  t    A                                                               MMKo        A           ________________________________________________________             DESCRIPTIONe;           The MMK utility builds a software system from the @           objects and dependencies listed in a description file.;           See the documentation for additional information.   A           _______________________________________________________              QUALIFIERS           /[NO]ACTION >           Determines whether action lines are executed or just?           displayed. Specifying /NOACTION causes MMK to displayc>           the action lines that would be executed to build the2           target, without actually executing them.             /[NO]CMS9           Determines whether a DEC/Code Management Systemn9           (CMS) library is automatically searched for the <           MMK description file and for any source files. The@           default is not to search the currently set CMS library           automatically.              /DESCRIPTION=file-spec?           Specifies an alternative name for the MMK descriptionr@           file. The default description file name is DESCRIP.MMS<           (in the current default directory), with MAKEFILE.3           being used if DESCRIP.MMS does not exist.e             /DUMP ;           Causes MMK to dump the suffix list, all currentlyM6           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.              /[NO]FORCE:           Specifying /FORCE causes MMK to execute only the?           action lines from the dependency rule for the target, 9           without performing any revision date checks andE4           without building any intermediate targets.  A                                                               3-5o e       
           MMKI                     /[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.              /IDENTIFICATIONw>           Specifying /IDENTIFICATION causes MMK to display its?           revision information and a copyright message, withoutn&           performing any other action.             /[NO]IGNORE[=level]e<           By default, MMK stops when an executed action line=           results in a warning, error, or fatal error status.f<           You can override this by specifying /IGNORE. Using:           /IGNORE or /IGNORE=FATAL causes all errors to be=           ignored; specifying /IGNORE=ERROR causes errors ande<           warnings to be ignored; specifying /IGNORE=WARNING-           causes only warnings to be ignored.U             /[NO]LOCAL_RULES7           Controls whether site-specific inference ruleE>           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 off0           its activity. By default, it does not.             /MACRO=definition...;           Defines one or more macros that can be referenced >           by the description file. Definitions are of the form=           symbol=value. Multiple definitions may be specifiedM9           if they are separated by commas and the list is :           surrounded by parentheses. If you specify just a=           symbol name for a definition, the symbol is defined "           as having the value "1".  
           3-6     n    A                                                               MMKr                     /OUTPUT=file-spec:9           Directs MMK output to a location other than ther           default, SYS$OUTPUT.  (           /[NO]RULES_FILE[=file-spec...]7           Specifies the name of one or more description :           files containing inference rules. If /RULES_FILE;           is specified with no file specification, the namem=           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).R  @           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 namen=           MMK_PERSONAL_RULES). /NORULES_FILE does not preventn;           the loading of local rules; you must also specifyg:           /NOLOCAL_RULES to prevent local rules from being           loaded.o             /[NO]VERIFY 5           Controls whether MMK echoes action lines ton)           SYS$OUTPUT. Enabled by default.                                   A                                                               3-7                      A           _______________________________________________________s  -    A      Differences between MMK and DEC/MMS       =           MMK is patterned after DEC/MMS, but contains only aa>           subset of DEC/MMS functionality and differs somewhat;           in its operation. This appendix lists some of the .           differences between MMK and DEC/MMS.  =           Besides the differences in features, there are somex;           differences in processing between MMK and DEC/MMS >           which may lead to different results or syntax errors=           in MMK for description files which operate properlye<           under DEC/MMS. If possible, please report any such>           differences to the author so that they can be fixed.  L           __________________________________________________________________  /    A.1    DEC/MMS Features Not Supported in MMK   >           MMK does not support the following DEC/MMS features:  6           o  MMK does not support FMS forms libraries.  8           o  MMK does not honor the "; action" syntax on<              dependency rule lines can be used with DEC/MMS.9              Make sure all actions are on separate lines.   9           o  MMK requires the leading dot on the .INCLUDE               directive.i  ;           o  MMK does not handle wildcard dependency rules.l  ?           o  MMK does not support all of the command qualifierse"              supported by DEC/MMS.  ?           o  MMK does not automatically load the MMS$RULES filee@              if that logical name is defined or that file exists>              in the current directory; you must specify /RULES?              on the MMK command to have it loaded. Use the MMK_t?              LOCAL_RULES or MMK_PERSONAL_RULES logical names toa4              have rules automatically loaded by MMK.  A                                                               A-1i h  u    -           Differences between MMK and DEC/MMSa        L           __________________________________________________________________      A.2    MMK Extended Featuresd  :           MMK includes the following features not found in           DEC/MMS:  >           o  MMK gives you more options for rules file, and is@              set up to allow multiple rules files to be present.8              Rule file processing follows this sequence:  =             1  The default rules compiled into MMK are loadedt>                automatically unless /NORULES_FILE is specified"                on the MMK command.  8             2  A site-defined local rules file is loaded@                automatically if the logical name MMK_LOCAL_RULES;                is defined (use /NOLOCAL_RULES to override).   =             3  If the /RULES_FILE qualifier is specified, any ;                rules files listed there are loaded; if none :                are listed, the default is to load the file;                MMS$RULES.MMS (or the file pointed to by the_'                logical name MMS$RULES).c  9                If the /RULES_FILE qualifier is omitted, a_;                personal rules file is loaded if the logicals?                name MMK_PERSONAL_RULES is defined. MMS$RULES is_'                not loaded in this case.f  ?                If /NORULES_FILE is specified, neither MMS$RULESh5                nor the personal rules file is loaded.u  >              These rules-processing features, coupled with the?              ability to redefine macros defined in rules files,t<              make it easier to customize MMK's behavior when              needed.  8           o  MMK trims blanks out of $(MMS$SOURCE_LIST).  A           o  MMK includes support for the following special localy              macros:  ;             o  $(MMS$SOURCE_LIST_SPACES) - source list with 6                spaces as separators instead of commas.  
           A-2     h    A                               Differences between MMK and DEC/MMSF          ;             o  $(MMS$CHANGED_LIST_SPACES) - list of changed <                sourcces with spaces as separators instead of                commas.  @             o  $(MMS$SOURCE_NAME) - like $(MMS$TARGET_NAME), but!                for $(MMS$SOURCE).   =             o  $(MMS$TARGET_FNAME) - like $(MMS$TARGET_NAME), 8                but does not include the device/directory0                specification, just the filename.  >             o  $(MMS$TARGET_MODULE) - name of the module being9                replaced in a text, help, macro, or object                 library.   >           o  MMK will display activity in the subprocess while;              action lines are being executed when you pressu              CTRL/T.  /           o  MMK allows you to redefine macros.   ?           o  MMK, in most cases, has more flexible syntax rules A              for its description files, allowing blanks where MMS_?              does not (e.g., in library module specifications).r  >           o  MMK pre-defines the macros __VAX__  for builds on@              VAX systems and __AXP__  for builds on AXP systems.  @           o  MMK supports prefixed inference rules (described in              Section 2.3).  >           o  When used with DEC/CMS, MMK will "double-infer" a>              dependency on a non-existent source file, if that5              file currently resides in a CMS library.   9           o  MMK includes a /DUMP qualifier for debuggingl%              problems with makefiles.   @           You may want to avoid using these extended features if:           you need to maintain compatibility with DEC/MMS.  A                                                               A-3  a       -           Differences between MMK and DEC/MMSD        L           __________________________________________________________________      A.3    Other Differences   ?           Besides the feature differences alrady mentioned, MMK ?           operates somewhat differently from DEC/MMS in some of_>           its processing. In most cases, these differences are@           not significant, but they are worth remembering if you@           need to port DEC/MMS description files to or from MMK.  >           o  MMK allows any rule, including built-in rules, toA              override the .DEFAULT actions. DEC/MMS lets .DEFAULTR-              actions override built-in rules.e  :           o  When a build action does not update a target,>              MMK will issue an information message, except for?              generic targets. DEC/MMS only issues such messages]              in certain cases.  @           o  MMK explicitly builds dependency rules for files on>              which library modules depend, even if those files<              are not mentioned in the description file. This?              may lead to MMK behaving differently from DEC/MMS, A              although if the description file is correct, the endE%              result will be the same.u  7           o  MMK parses comments and continuation lines :              differently, so that a hyphen at the end of a<              comment is not considered a continuation of the              comment.   :           As other differences are brought to the author's=           attention, they will either be fixed or noted here.                 
           A-4     I                A           _______________________________________________________a  #    B      Built-in Dependency Rules       @           The dependency rules built into MMK for VAX systems is>           given in Figure B-1. The dependency rules built into5           MMK for AXP systems is given in Figure B-2.   8           Figure B-1  MMK default dependency rules - VAXA           _______________________________________________________   !           ! MMK_DEFAULT_RULES.MMSu           !/M           !   COPYRIGHT  1993, 1994  MADGOAT SOFTWARE.  ALL RIGHTS RESERVED.            !lE           !  Default build rules for use with MMK.  (for VAX systems)            ! "           !  Modification history:           ! :           !   23-DEC-1992 V1.0 Madison     Initial coding.P           !   17-OCT-1993 V1.1 Madison     Elimination of intermediate libfiles.F           !   11-APR-1994 V1.2 Madison     Make rules more like MMS's.;           !   01-JUL-1994 V2.0 Madison     Add CMS support.u;           !   16-JUL-1994 V2.1 Madison     Update for V3.2.lL           !   22-AUG-1994 V2.1-1 Madisonn    Eliminate DELETE_SOURCE checks.           !              !lS           ! These symbols can be used to distinguish MMK from DEC's DEC/MMS producto$           ! using .IFDEF directives.           ! '           __MATTS_MMS__ = __MATTS_MMS__            __MMK__ = __MMK__            __MMK_V32__ = 1_  A           _______________________________________________________ (           Figure B-1 Cont'd on next page  A                                                               B-1d f  n    #           Built-in Dependency Rulesw        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________n             !nL           ! This symbol can be used to distinguish a VAX-based build from anE           ! AXP-based build. (or use .IFDEF __AXP__ .ELSE ... .ENDIF)O           !            __VAX__ = 1S             EXE = .EXE           OLB = .OLB           OBJ = .OBJ           OPT = .OPT           L32 = .L32  7           .SUFFIXES :     ! clear the suffix list firstoY           .SUFFIXES : $(EXE) $(OLB) $(OBJ) .TLB .HLB .MLB $(L32) .C .BAS .B32 .BLI .FOR -dU                    .COB .COR .DBL .RPG .SCN .PLI .PEN .PAS .MAC .MAR .MSG .CLD .R32 - O                    .REQ .TXT .H .MEM .HLP .RNH .RNO .MMS .DAT .OPT .SDML .COM -iN                    .C~ .BAS~ .B32~ .BLI~ .FOR~ .COB~ .COR~ .DBL~ .RPG~ .SCN~ -J                    .PLI~ .PAS~ .MAC~ .MAR~ .MSG~ .CLD~ .R32~ .REQ~ .TXT~ -G                    .H~ .HLP~ .RNH~ .RNO~ .MMS~ .DAT~ .OPT~ .SDML~ .COM~              LINK     = LINK_+           LINKFLAGS   = /EXEC=$(MMS$TARGET)i             $(OBJ)$(OLB) :U               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE $(MMS$TARGET)_=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)g             .TXT.TLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/TEXT $(MMS$TARGET)Y               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)/MODULE=$(MMS$TARGET_MODULE)O             .HLP.HLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/HELP $(MMS$TARGET)=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)   A           _______________________________________________________S(           Figure B-1 Cont'd on next page  
           B-2O         A                                         Built-in Dependency Rules[        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           ________________________________________________________             .MAC.MLB :[               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/MACRO $(MMS$TARGET) =               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)            LIBR     = LIBRARY            LIBRFLAGS   = /REPLACE             .BAS$(OBJ) :/               $(BASIC)$(BASFLAGS) $(MMS$SOURCE)e           BASIC     = BASIC ?           BASFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)              .BLI$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)_           .B32$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)h>           BFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .C$(OBJ) :*               $(CC)$(CFLAGS) $(MMS$SOURCE)           CC       = CCi>           CFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .COB$(OBJ) :/               $(COBOL)$(COBFLAGS) $(MMS$SOURCE)            COBOL     = COBOLt?           COBFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)N             .COR$(OBJ) :/               $(CORAL)$(CORFLAGS) $(MMS$SOURCE)e           CORAL     = CORAL ?           CORFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)   A           _______________________________________________________C(           Figure B-1 Cont'd on next page        A                                                               B-3  e  l    #           Built-in Dependency Rulesl        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________              .DBL$(OBJ) :/               $(DIBOL)$(DBLFLAGS) $(MMS$SOURCE)h           DIBOL     = DIBOL ?           DBLFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)t             .CLD$(OBJ) :3               $(SETCMD)$(SETCMDFLAGS) $(MMS$SOURCE)n"           SETCMD     = SET COMMAND?           SETCMDFLAGS = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)u             .FOR$(OBJ) :,               $(FORT)$(FFLAGS) $(MMS$SOURCE)           FORT        = FORTRANr?           FFLAGS      = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)c             .MAR$(OBJ) :-               $(MACRO)$(MFLAGS) $(MMS$SOURCE)            MACRO     = MACROa>           MFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .MSG$(OBJ) :1               $(MESSAGE)$(MSGFLAGS) $(MMS$SOURCE)            MESSAGE     = MESSAGE ?           MSGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)[             .PAS$(OBJ) :.               $(PASCAL)$(PFLAGS) $(MMS$SOURCE)           .PAS.PEN   :1               $(PASCAL)$(PENVFLAGS) $(MMS$SOURCE)            PASCAL     = PASCALt>           PFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)B           PENVFLAGS   = /ENVIRONMENT=$(MMS$TARGET_NAME).PEN/NOLIST  A           _______________________________________________________u(           Figure B-1 Cont'd on next page      
           B-4N [  v    A                                         Built-in Dependency Rules         @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________r             .PLI$(OBJ) :-               $(PLI)$(PLIFLAGS) $(MMS$SOURCE)N           PLI      = PLI?           PLIFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)              .REQ$(L32) :N               $(BLISS)/LIBR=$(MMS$TARGET_NAME)$(L32)$(BLIBFLAGS) $(MMS$SOURCE)           .R32$(L32) :N               $(BLISS)/LIBR=$(MMS$TARGET_NAME)$(L32)$(BLIBFLAGS) $(MMS$SOURCE)           BLISS     = BLISSi           BLIBFLAGS   = /NOLIST              .RPG$(OBJ) :-               $(RPG)$(RPGFLAGS) $(MMS$SOURCE)n           RPG      = RPG?           RPGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)l             .RNH.HLP :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           .RNO.MEM :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           RUNOFF     = RUNOFF ,           RFLAGS     = /OUTPUT=$(MMS$TARGET)             .SCN$(OBJ) :/               $(SCAN)$(SCANFLAGS) $(MMS$SOURCE)            SCAN     = SCANe?           SCANFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ).             CMS      = CMS           CMSCOMMENT  = ""2           CMSFLAGS    = /GENERATION=$(MMS$CMS_GEN)             .B32~.B32 : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).B32 $(CMSFLAGS) $(CMSCOMMENT)   A           _______________________________________________________](           Figure B-1 Cont'd on next page  A                                                               B-5E I       #           Built-in Dependency Rulesf        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________M             .BAS~.BAS :nW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).BAS $(CMSFLAGS) $(CMSCOMMENT)y             .BLI~.BLI : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)rc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).BLI $(CMSFLAGS) $(CMSCOMMENT)o             .C~.C :[W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) a            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).C $(CMSFLAGS) $(CMSCOMMENT)              .CLD~.CLD : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).CLD $(CMSFLAGS) $(CMSCOMMENT)              .COB~.COB : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)ac            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COB $(CMSFLAGS) $(CMSCOMMENT)i             .COR~.COR :eW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)cc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COR $(CMSFLAGS) $(CMSCOMMENT)e             .COM~.COM :eW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)ac            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COM $(CMSFLAGS) $(CMSCOMMENT)              .DAT~.DAT :rW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY):c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).DAT $(CMSFLAGS) $(CMSCOMMENT)a             .DBL~.DBL : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)ac            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).DBL $(CMSFLAGS) $(CMSCOMMENT)r             .FOR~.FOR :MW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)fc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).FOR $(CMSFLAGS) $(CMSCOMMENT)l  A           _______________________________________________________n(           Figure B-1 Cont'd on next page  
           B-6r y  m    A                                         Built-in Dependency RulesU        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________              .H~.H : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) a            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).H $(CMSFLAGS) $(CMSCOMMENT)              .HLP~.HLP :uW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).HLP $(CMSFLAGS) $(CMSCOMMENT)              .MAC~.MAC :.W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)rc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MAC $(CMSFLAGS) $(CMSCOMMENT)              .MAR~.MAR :oW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)tc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MAR $(CMSFLAGS) $(CMSCOMMENT))             .MMS~.MMS :hW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)oc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MMS $(CMSFLAGS) $(CMSCOMMENT)M             .MSG~.MSG :oW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)uc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MSG $(CMSFLAGS) $(CMSCOMMENT)n             .OPT~.OPT : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Rc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).OPT $(CMSFLAGS) $(CMSCOMMENT)              .PAS~.PAS :pW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)rc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).PAS $(CMSFLAGS) $(CMSCOMMENT)              .PLI~.PLI :kW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)ac            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).PLI $(CMSFLAGS) $(CMSCOMMENT)              .R32~.R32 :tW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)rc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).R32 $(CMSFLAGS) $(CMSCOMMENT)   A           _______________________________________________________ (           Figure B-1 Cont'd on next page  A                                                               B-7S C       #           Built-in Dependency Rulesl        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________              .REQ~.REQ :UW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).REQ $(CMSFLAGS) $(CMSCOMMENT)              .RNH~.RNH :nW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)nc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).RNH $(CMSFLAGS) $(CMSCOMMENT)d             .RNO~.RNO :gW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).RNO $(CMSFLAGS) $(CMSCOMMENT)o             .SCN~.SCN : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)2c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).SCN $(CMSFLAGS) $(CMSCOMMENT)n             .SDML~.SDML : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) d            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).SDML $(CMSFLAGS) $(CMSCOMMENT)             .TXT~.TXT :dW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).TXT $(CMSFLAGS) $(CMSCOMMENT)n  A           ________________________________________________________  8           Figure B-2  MMK default dependency rules - AXPA           _______________________________________________________   A           _______________________________________________________ (           Figure B-2 Cont'd on next page              
           B-8o i  f    A                                         Built-in Dependency RulesC        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________a  !           ! MMK_DEFAULT_RULES.MMS            !sG           !   COPYRIGHT  1993, MADGOAT SOFTWARE.  ALL RIGHTS RESERVED.p           !,E           !  Default build rules for use with MMK.  (for OpenVMS AXP)            !c"           !  Modification history:           ! :           !   23-DEC-1992 V1.0 Madison     Initial coding.H           !   17-OCT-1993 V1.1 Madison     Delete intermediate libfiles.F           !   11-APR-1994 V1.2 Madison     Make rules more like MMS's.;           !   05-JUL-1994 V2.0 Madison     Add CMS support.n;           !   16-JUL-1994 V2.1 Madison     Update for V3.2.fM           !   22-AUG-1994 V2.1-1 Madison     Eliminate DELETE_SOURCE checks.s            !o             !iQ           ! This symbol can be used to distinguish MMK from DEC's DEC/MMS product $           ! using .IFDEF directives.           !e'           __MATTS_MMS__ = __MATTS_MMS__o           __MMK__ = __MMK__t           __MMK_V32__ = 1t           ! N           ! These symbols can be used to distinguish an AXP-based build from a           ! VAX-based build.           !_           __ALPHA__ = 1_           __AXP__   = 1u             EXE = .EXE           OLB = .OLB           OBJ = .OBJ           OPT = .OPT           L32 = .L32  A           _______________________________________________________X(           Figure B-2 Cont'd on next page  A                                                               B-9_ _  _    #           Built-in Dependency Rules         @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________   7           .SUFFIXES :     ! clear the suffix list firstfY           .SUFFIXES : $(EXE) $(OLB) $(OBJ) .TLB .HLB .MLB $(L32) .C .BAS .B32 .BLI .FOR - U                    .COB .COR .DBL .RPG .SCN .PLI .PEN .PAS .MAC .MAR .M64 .MSG .CLD -nT                    .R32 .REQ .TXT .H .MEM .HLP .RNH .RNO .MMS .DAT .OPT .SDML .COM -N                    .C~ .BAS~ .B32~ .BLI~ .FOR~ .COB~ .COR~ .DBL~ .RPG~ .SCN~ -P                    .PLI~ .PAS~ .MAC~ .MAR~ .M64~ .MSG~ .CLD~ .R32~ .REQ~ .TXT~ -G                    .H~ .HLP~ .RNH~ .RNO~ .MMS~ .DAT~ .OPT~ .SDML~ .COM~              LINK     = LINK +           LINKFLAGS   = /EXEC=$(MMS$TARGET)i             $(OBJ)$(OLB) :U               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE $(MMS$TARGET)_=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)_             .TXT.TLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/TEXT $(MMS$TARGET)Y               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)/MODULE=$(MMS$TARGET_MODULE)              .HLP.HLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/HELP $(MMS$TARGET)=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)              .MAC.MLB :[               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/MACRO $(MMS$TARGET)(=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)              LIBR     = LIBRARY            LIBRFLAGS   = /REPLACE             .BAS$(OBJ) :/               $(BASIC)$(BASFLAGS) $(MMS$SOURCE)S           BASIC     = BASICf?           BASFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)H  A           _______________________________________________________R(           Figure B-2 Cont'd on next page             B-10         A                                         Built-in Dependency Rulesi        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________~             .BLI$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)~           .B32$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)E>           BFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .C$(OBJ) :*               $(CC)$(CFLAGS) $(MMS$SOURCE)           CC       = CC$>           CFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .COB$(OBJ) :/               $(COBOL)$(COBFLAGS) $(MMS$SOURCE)E           COBOL     = COBOL ?           COBFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)R             .COR$(OBJ) :/               $(CORAL)$(CORFLAGS) $(MMS$SOURCE)E           CORAL     = CORALE?           CORFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)A             .DBL$(OBJ) :/               $(DIBOL)$(DBLFLAGS) $(MMS$SOURCE)_           DIBOL     = DIBOLu?           DBLFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)              .CLD$(OBJ) :3               $(SETCMD)$(SETCMDFLAGS) $(MMS$SOURCE)i"           SETCMD     = SET COMMAND?           SETCMDFLAGS = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)_             .FOR$(OBJ) :,               $(FORT)$(FFLAGS) $(MMS$SOURCE)           FORT        = FORTRANB?           FFLAGS      = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)   A           _______________________________________________________ (           Figure B-2 Cont'd on next page  A                                                              B-11A         #           Built-in Dependency Rules/        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________              .MAR$(OBJ) :-               $(MACRO)$(MFLAGS) $(MMS$SOURCE)C%           MACRO     = MACRO/MIGRATION >           MFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)             .M64$(OBJ) :/               $(TASM)$(TASMFLAGS) $(MMS$SOURCE)(           TASM     = MACRO?           TASMFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)O             .MSG$(OBJ) :1               $(MESSAGE)$(MSGFLAGS) $(MMS$SOURCE)O           MESSAGE     = MESSAGE ?           MSGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)              .PAS$(OBJ) :.               $(PASCAL)$(PFLAGS) $(MMS$SOURCE)           .PAS.PEN   :1               $(PASCAL)$(PENVFLAGS) $(MMS$SOURCE)            PASCAL     = PASCALx>           PFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)B           PENVFLAGS   = /ENVIRONMENT=$(MMS$TARGET_NAME).ENV/NOLIST             .PLI$(OBJ) :-               $(PLI)$(PLIFLAGS) $(MMS$SOURCE)X           PLI      = PLI?           PLIFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ))             .REQ$(L32) :N               $(BLISS)/LIBR=$(MMS$TARGET_NAME)$(L32)$(BLIBFLAGS) $(MMS$SOURCE)           .R32$(L32) :N               $(BLISS)/LIBR=$(MMS$TARGET_NAME)$(L32)$(BLIBFLAGS) $(MMS$SOURCE)           BLISS     = BLISS            BLIBFLAGS   = /NOLIST   A           _______________________________________________________ (           Figure B-2 Cont'd on next page             B-12         A                                         Built-in Dependency RulesT        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________              .RPG$(OBJ) :-               $(RPG)$(RPGFLAGS) $(MMS$SOURCE)            RPG      = RPG?           RPGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)              .RNH.HLP :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           .RNO.MEM :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           RUNOFF     = RUNOFFA,           RFLAGS     = /OUTPUT=$(MMS$TARGET)             .SCN$(OBJ) :/               $(SCAN)$(SCANFLAGS) $(MMS$SOURCE))           SCAN     = SCAN ?           SCANFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET_NAME)$(OBJ)_             CMS      = CMS           CMSCOMMENT  = ""2           CMSFLAGS    = /GENERATION=$(MMS$CMS_GEN)             .B32~.B32 : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)1c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).B32 $(CMSFLAGS) $(CMSCOMMENT)_             .BAS~.BAS :PW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).BAS $(CMSFLAGS) $(CMSCOMMENT)              .BLI~.BLI :TW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Bc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).BLI $(CMSFLAGS) $(CMSCOMMENT)G             .C~.C : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Ra            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).C $(CMSFLAGS) $(CMSCOMMENT)   A           _______________________________________________________ (           Figure B-2 Cont'd on next page  A                                                              B-13T E       #           Built-in Dependency Rules(        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________M             .CLD~.CLD :MW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).CLD $(CMSFLAGS) $(CMSCOMMENT)              .COB~.COB :_W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)_c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COB $(CMSFLAGS) $(CMSCOMMENT)              .COR~.COR : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COR $(CMSFLAGS) $(CMSCOMMENT)_             .COM~.COM :_W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).COM $(CMSFLAGS) $(CMSCOMMENT).             .DAT~.DAT :EW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).DAT $(CMSFLAGS) $(CMSCOMMENT).             .DBL~.DBL :EW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Cc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).DBL $(CMSFLAGS) $(CMSCOMMENT)(             .FOR~.FOR : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).FOR $(CMSFLAGS) $(CMSCOMMENT)(             .H~.H :TW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Ra            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).H $(CMSFLAGS) $(CMSCOMMENT).             .HLP~.HLP :EW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).HLP $(CMSFLAGS) $(CMSCOMMENT).             .MAC~.MAC :EW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MAC $(CMSFLAGS) $(CMSCOMMENT).  A           _______________________________________________________I(           Figure B-2 Cont'd on next page             B-14 C  L    A                                         Built-in Dependency RulesE        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________C             .MAR~.MAR :$W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MAR $(CMSFLAGS) $(CMSCOMMENT)C             .M64~.M64 :$W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).M64 $(CMSFLAGS) $(CMSCOMMENT)n             .MMS~.MMS :rW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MMS $(CMSFLAGS) $(CMSCOMMENT)_             .MSG~.MSG :_W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Cc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).MSG $(CMSFLAGS) $(CMSCOMMENT)(             .OPT~.OPT : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).OPT $(CMSFLAGS) $(CMSCOMMENT)(             .PAS~.PAS : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).PAS $(CMSFLAGS) $(CMSCOMMENT)(             .PLI~.PLI : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).PLI $(CMSFLAGS) $(CMSCOMMENT)(             .R32~.R32 : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).R32 $(CMSFLAGS) $(CMSCOMMENT)(             .REQ~.REQ : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).REQ $(CMSFLAGS) $(CMSCOMMENT)(             .RNH~.RNH : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Sc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).RNH $(CMSFLAGS) $(CMSCOMMENT)(  A           _______________________________________________________M(           Figure B-2 Cont'd on next page  A                                                              B-15N /  P    #           Built-in Dependency RulesM        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________C             .RNO~.RNO :NW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).RNO $(CMSFLAGS) $(CMSCOMMENT)C             .SCN~.SCN :NW            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)_c            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).SCN $(CMSFLAGS) $(CMSCOMMENT)              .SDML~.SDML : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY) d            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).SDML $(CMSFLAGS) $(CMSCOMMENT)             .TXT~.TXT : W            IF "$(MMS$CMS_LIBRARY)" .NES. "" THEN DEFINE/USER CMS$LIB $(MMS$CMS_LIBRARY)Lc            $(CMS) FETCH $(MMS$CMS_ELEMENT) /OUTPUT=$(MMS$TARGET_NAME).TXT $(CMSFLAGS) $(CMSCOMMENT)M  A           _______________________________________________________S                                                     B-16 B  Y                A           _______________________________________________________F  %    C      Using the CROSS_ALPHA RulesN      =           The CROSS_ALPHA.MMS rules file is included with MMKS:           as an aid to developers working on programs that>           will be run on both VAX and AXP systems. The default:           dependency rules built into MMK are based on the<           macros show in Table C-1. They are used by default&           on both VAX and AXP systems.  A           Table_C-1__MMK_default_suffix_macros___________________   A           Macro______Suffix____Meaning___________________________F  /           $(EXE)     .EXE      Executable imageC  1           $(L32)     .L32      BLISS Library fileE  *           $(OBJ)     .OBJ      Object file  -           $(OLB)     .OLB      Object library.  A           $(OPT)_____.OPT______Linker_options_file_______________S  9           Since the files mentioned in the table are of aM=           different format on OpenVMS AXP systems, developers_;           wishing to do both AXP and VAX builds in the samea@           directory need a way of preventing the differing files?           from interfering with each other. The CROSS_ALPHA.MMS_:           rules redefine the macros as shown in Table C-2,(           eliminating the name conflict.  A           Table_C-2__CROSS_ALPHA_suffix_macros___________________n  A           Macro______Suffix____Meaning___________________________d  /           $(EXE)     .ALPHA_   Executable image_                      EXE  A                                                               C-1     Y    %           Using the CROSS_ALPHA Rules           A           Table_C-2_(Cont.)__CROSS_ALPHA_suffix_macros___________   A           Macro______Suffix____Meaning___________________________   1           $(L32)     .L32E     BLISS Library file   *           $(OBJ)     .ALPHA_   Object file                      OBJ  -           $(OLB)     .ALPHA_   Object library1                      OLB  2           $(OPT)     .ALPHA_   Linker options fileA           ___________OPT_________________________________________   @           To make all this work, you must use the macros in your?           description file instead of making literal references 1           to the file type suffixes. For example:f  X                            PROGRAM$(EXE) : PROGRAM$(OBJ),SUBROUTINES$(OBJ),PROGRAM$(OPT)G                                $(LINK)$(LINKFLAGS) PROGRAM$(OPT)/OPTIONM4                            PROGRAM$(OBJ) : PROGRAM.C>                            SUBROUTINES$(OBJ) : SUBROUTINES.FOR  =           It also helps to use the macros for the commands to @           compile and link programs, especially if you are using@           DEC's AXP Migration Tools and cross-compiling your AXP           objects on a VAX._  9           In addition to using the CROSS_ALPHA rules, MMKC=           provides the special macros __AXP__  and __ALPHA__, =           which are predefined only when MMK is running on ane:           OpenVMS AXP system (it also provides the __VAX__=           predefined macro for VAX-based builds). This allows_>           you to conditionalize your description file with the@           .IFDEF directive to handle AXP- or VAX-specific cases.        
           C-2)