                                       &           Guide to Matt's Make Utility                 October, 1993       <           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   0           Software Version:             MMK V2.4                 Matthew Madison            MadGoat Software                                                   "           ________________________           12 December 1993  =           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 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 DEFAULT DEPENDENCY RULES          2-2 :                 MMK                                    2-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-1           A                                                               iii                     Contents          A           _______________________________________________________ A           APPENDIX B  BUILT-IN DEPENDENCY RULES               B-1     A           _______________________________________________________ A           APPENDIX C  USING THE CROSS_ALPHA RULES             C-1     A           _______________________________________________________            FIGURES   8                 B-1       MMK default dependency rules -A                           VAX  ___________________________    B-1   8                 B-2       MMK default dependency rules -A                           AXP  ___________________________    B-5   A           _______________________________________________________            TABLES  A                 C-1       MMK default suffix macros  _____    C-1   A                 C-2       CROSS_ALPHA suffix macros  _____    C-1                                              iv                   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  Dependency rules, which describe how one object2              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.  7           o  Default rule definitions, for adding to or @              overriding the built-in default rules provided with              MMK.   =           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  =           This is a simple collection of dependency rules 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 Default Dependency Rules  7           MMK includes a collection of built-in default ?           dependency 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 types 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 will use its default 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  
           2-2          A                                                 Description Files           @           command). In fact, the description could be simplified           even further to just:   A                            PROGRAM.EXE : MAIN.OBJ,SUBROUTINES.OBJ M                                LINK/EXEC=PROGRAM.EXE MAIN.OBJ,SUBROUTINES.OBJ   >           MMK will automatically search the suffixes list when>           constructing the dependency tree and fill in default@           dependency rules for the .OBJ files automatically. See@           Appendix B for further information on suffix lists and#           default dependency rules.                                                           A                                                               2-3          
           MMK           A           _______________________________________________________   
           MMK   =           Invokes the MMK utility to build a software system.   A           _______________________________________________________              FORMAT             MMK  [target-name]  A           _______________________________________________________ )           Command Qualifiers     Defaults   (           /[NO]ACTION            /ACTION            /DESCRIPTION=file-spec)           /[NO]FORCE             /NOFORCE 0           /[NO]FROM_SOURCES      /NOFROM_SOURCES           /IDENTIFICATION *           /[NO]IGNORE[=level]    /NOIGNORE5           /[NO]KEEP_INTERMEDIATE/NOKEEP_INTERMEDIATES -           /[NO]LOCAL_RULES       /LOCAL_RULES '           /[NO]LOG               /NOLOG             /MACRO=[definition...]           /OUTPUT=file-spec .           /[NO]RULES_FILE=file-sp/NORULES_FILE(           /[NO]VERIFY            /VERIFY  A           _______________________________________________________              PARAMETERS           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.       
           2-4          A                                                               MMK         A           _______________________________________________________              DESCRIPTION ;           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 display >           the action lines that would be executed to build the2           target, without actually executing them.              /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.3           being used if DESCRIP.MMS does not exist.0             /[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 and_4           without building any intermediate targets.             /[NO]FROM_SOURCESt:           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.              /IDENTIFICATIONs>           Specifying /IDENTIFICATION causes MMK to display its?           revision information and a copyright message, withouta&           performing any other action.      A                                                               2-5r         
           MMKi                     /[NO]IGNORE[=level]e<           By default, MMK stops when an executed action line=           results in a warning, error, or fatal error status.n<           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]KEEP_INTERMEDIATES_>           This qualifier has no effect in the current release.             /[NO]LOCAL_RULES@           Controls whether site-specific default dependency rule>           definitions are read in. By default, they are if the?           logical name MMK_LOCAL_RULES is defined and points toT@           a readable description file. Specifying /NOLOCAL_RULES'           prevents this from occurring.              /[NO]LOG=           Controls whether MMK logs a detailed description of 0           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 specified 9           if they are separated by commas and the list is $           surrounded by parentheses.             /OUTPUT=file-spec 9           Directs MMK output to a location other than the_           default, SYS$OUTPUT.  (           /[NO]RULES_FILE[=file-spec...]=           Specifies the name of one or more description files =           containing default dependency 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).   
           2-6          A                                                               MMK_                     /[NO]VERIFYM5           Controls whether MMK echoes action lines to )           SYS$OUTPUT. Enabled by default.                                                                           A                                                               2-7  E  X                A           ________________________________________________________  -    A      Differences between MMK and DEC/MMSP      =           MMK is patterned after DEC/MMS, but contains only a >           subset of DEC/MMS functionality and differs somewhat;           in its operation. This appendix lists some of then.           differences between MMK and DEC/MMS.  =           Besides the differences in features, there are somee;           differences in processing between MMK and DEC/MMS_>           which may lead to different results or syntax errors=           in MMK for description files which operate properly <           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:  A           o  MMK does not support DEC/CMS libraries, or FMS forms_              libraries._  @           o  MMK does not support double-colon dependency rules.  ?           o  MMK does not support all of the command qualifiers "              supported by DEC/MMS.  L           __________________________________________________________________      A.2    MMK Extended Featuresh  :           MMK includes the following features not found in           DEC/MMSo  @           o  MMK adds support for a site-installed "local" rules              file.  8           o  MMK trims blanks out of $(MMS$SOURCE_LIST).  A                                                               A-1o i       -           Differences between MMK and DEC/MMSd          ?           o  MMK includes support for the special local symbols_A              $(MMS$SOURCE_LIST_SPACES) (a source list with spaces ?              as separators, rather than commas), $(MMS$CHANGED__@              LIST_SPACES), $(MMS$SOURCE_NAME), and $(MMS$TARGET_<              MODULE) (for targets that are library modules).  >           o  MMK will display activity in the subprocess while;              action lines are being executed when you pressw              CTRL/T.                                                              
           A-2  K  f                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.MMS            !_G           !   COPYRIGHT  1993, MADGOAT SOFTWARE.  ALL RIGHTS RESERVED.d           ! E           !  Default build rules for use with MMK.  (for VAX systems)            !e"           !  Modification history:           ! :           !   23-DEC-1992 V1.0 Madison     Initial coding.P           !   17-OCT-1993 V1.1 Madison     Elimination of intermediate libfiles.           !              ! S           ! These symbols can be used to distinguish MMK from DEC's DEC/MMS productt$           ! using .IFDEF directives.           !.'           __MATTS_MMS__ = __MATTS_MMS__            __MMK___ = __MMK__             EXE = .EXE           OLB = .OLB           OBJ = .OBJ           OPT = .OPT           L32 = .L32  A           _______________________________________________________k(           Figure B-1 Cont'd on next page  A                                                               B-1  e  o    #           Built-in Dependency Rulesi        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________,  7           .SUFFIXES :     ! clear the suffix list firstsY           .SUFFIXES : $(EXE) $(OLB) $(OBJ) .TLB .HLB .MLB $(L32) .C .BAS .B32 .BLI .FOR - U                    .COB .COR .DBL .RPG .SCN .PLI .PEN .PAS .MAC .MAR .MSG .CLD .R32 -b3                    .REQ .TXT .H .MEM .HLP .RNH .RNO              LINK     = LINKp+           LINKFLAGS   = /EXEC=$(MMS$TARGET)              LIBR     = LIBRARY            LIBRFLAGS   = /REPLACE             $(OBJ)$(OLB) :U               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE $(MMS$TARGET)t=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE) K               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE/NOLOG $(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) K               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE/NOLOG $(MMS$SOURCE);*              .HLP.HLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/HELP $(MMS$TARGET)=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)rK               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE/NOLOG $(MMS$SOURCE);*_             .MAC.MLB :[               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/MACRO $(MMS$TARGET)o=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE).K               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE/NOLOG $(MMS$SOURCE);*a             BASIC     = BASIC 4           BASFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .BAS$(OBJ) :/               $(BASIC)$(BASFLAGS) $(MMS$SOURCE)I  A           _______________________________________________________t(           Figure B-1 Cont'd on next page  
           B-2i a  t    A                                         Built-in Dependency Rules         @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________              BLISS     = BLISS 3           BFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)e           .BLI$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)            .B32$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)h             CC       = CCf3           CFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)a           .C$(OBJ) :*               $(CC)$(CFLAGS) $(MMS$SOURCE)             COBOL     = COBOL 4           COBFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .COB$(OBJ) :/               $(COBOL)$(COBFLAGS) $(MMS$SOURCE)              CORAL     = CORALh4           CORFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .COR$(OBJ) :/               $(CORAL)$(CORFLAGS) $(MMS$SOURCE)e             DIBOL     = DIBOL 4           DBLFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .DBL$(OBJ) :/               $(DIBOL)$(DBLFLAGS) $(MMS$SOURCE)_  "           SETCMD     = SET COMMAND4           SETCMDFLAGS = /NOLIST/OBJECT=$(MMS$TARGET)           .CLD$(OBJ) :3               $(SETCMD)$(SETCMDFLAGS) $(MMS$SOURCE)n  A           _______________________________________________________r(           Figure B-1 Cont'd on next page        A                                                               B-3_ _  _    #           Built-in Dependency Rules         @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________n             FORT        = FORTRAN 4           FFLAGS      = /NOLIST/OBJECT=$(MMS$TARGET)           .FOR$(OBJ) :,               $(FORT)$(FFLAGS) $(MMS$SOURCE)             MACRO     = MACROo3           MFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)i           .MAR$(OBJ) :-               $(MACRO)$(MFLAGS) $(MMS$SOURCE)              MESSAGE     = MESSAGEf4           MSGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .MSG$(OBJ) :1               $(MESSAGE)$(MSGFLAGS) $(MMS$SOURCE)i             PASCAL     = PASCALd3           PFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)a9           PENVFLAGS   = /ENVIRONMENT=$(MMS$TARGET)/NOLISTi           .PAS$(OBJ) :.               $(PASCAL)$(PFLAGS) $(MMS$SOURCE)           .PAS.PEN   :1               $(PASCAL)$(PENVFLAGS) $(MMS$SOURCE)              PLI      = PLI4           PLIFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .PLI$(OBJ) :-               $(PLI)$(PLIFLAGS) $(MMS$SOURCE)              BLIBFLAGS   = /NOLISTI           .REQ$(L32) :C               $(BLISS)/LIBR=$(MMS$TARGET)$(BLIBFLAGS) $(MMS$SOURCE)I           .R32$(L32) :C               $(BLISS)/LIBR=$(MMS$TARGET)$(BLIBFLAGS) $(MMS$SOURCE)R  A           _______________________________________________________R(           Figure B-1 Cont'd on next page    
           B-4  h  i    A                                         Built-in Dependency Rulesu        @           Figure B-1 (Cont.)  MMK default dependency rules - VAXA           _______________________________________________________N             RPG      = RPG4           RPGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .RPG$(OBJ) :-               $(RPG)$(RPGFLAGS) $(MMS$SOURCE)o             RUNOFF     = RUNOFFs,           RFLAGS     = /OUTPUT=$(MMS$TARGET)           .RNH.HLP :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           .RNO.MEM :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)             SCAN     = SCAN_4           SCANFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET)           .SCN$(OBJ) :/               $(SCAN)$(SCANFLAGS) $(MMS$SOURCE)   A           _______________________________________________________m  8           Figure B-2  MMK default dependency rules - AXPA           _______________________________________________________e  !           ! MMK_DEFAULT_RULES.MMSe           ! G           !   COPYRIGHT  1993, MADGOAT SOFTWARE.  ALL RIGHTS RESERVED.n           !lE           !  Default build rules for use with MMK.  (for OpenVMS AXP)            !O"           !  Modification history:           ! :           !   23-DEC-1992 V1.0 Madison     Initial coding.H           !   17-OCT-1993 V1.1 Madison     Delete intermediate libfiles.           !O  A           _______________________________________________________t(           Figure B-2 Cont'd on next page    A                                                               B-5B i  f    #           Built-in Dependency Rules         @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________i             !pQ           ! This symbol can be used to distinguish MMK from DEC's DEC/MMS product:$           ! using .IFDEF directives.           ! '           __MATTS_MMS__ = __MATTS_MMS__R           __MMK__ = __MMK__            __ALPHA__ = 1            __AXP__   = 1              EXE = .EXE           OLB = .OLB           OBJ = .OBJ           OPT = .OPT           L32 = .L32  7           .SUFFIXES :     ! clear the suffix list firstnY           .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 - 8                    .R32 .REQ .TXT .H .MEM .HLP .RNH .RNO             LINK     = LINK_+           LINKFLAGS   = /EXEC=$(MMS$TARGET)              LIBR     = LIBRARY            LIBRFLAGS   = /REPLACE             $(OBJ)$(OLB) :U               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE $(MMS$TARGET)]=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)_E               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE $(MMS$SOURCE);*T             .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)lE               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE $(MMS$SOURCE);*   A           _______________________________________________________ (           Figure B-2 Cont'd on next page  
           B-6     T    A                                         Built-in Dependency Rules         @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________g             .HLP.HLB :Z               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/HELP $(MMS$TARGET)=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)rE               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE $(MMS$SOURCE);*              .MAC.MLB :[               IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN $(LIBR)/CREATE/MACRO $(MMS$TARGET)_=               $(LIBR)$(LIBRFLAGS) $(MMS$TARGET) $(MMS$SOURCE)IE               @ IF "$(MMK_DELETE_SOURCE)" THEN DELETE $(MMS$SOURCE);*              BASIC     = BASICs4           BASFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .BAS$(OBJ) :/               $(BASIC)$(BASFLAGS) $(MMS$SOURCE)_             BLISS     = BLISS_3           BFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)            .BLI$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)            .B32$(OBJ) :-               $(BLISS)$(BFLAGS) $(MMS$SOURCE)c             CC       = CCe3           CFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)y           .C$(OBJ) :*               $(CC)$(CFLAGS) $(MMS$SOURCE)             COBOL     = COBOL 4           COBFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .COB$(OBJ) :/               $(COBOL)$(COBFLAGS) $(MMS$SOURCE)t             CORAL     = CORAL 4           CORFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .COR$(OBJ) :/               $(CORAL)$(CORFLAGS) $(MMS$SOURCE)   A           _______________________________________________________ (           Figure B-2 Cont'd on next page  A                                                               B-7          #           Built-in Dependency Rulesg        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________i             DIBOL     = DIBOL 4           DBLFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .DBL$(OBJ) :/               $(DIBOL)$(DBLFLAGS) $(MMS$SOURCE)n  "           SETCMD     = SET COMMAND4           SETCMDFLAGS = /NOLIST/OBJECT=$(MMS$TARGET)           .CLD$(OBJ) :3               $(SETCMD)$(SETCMDFLAGS) $(MMS$SOURCE)              FORT        = FORTRAN 4           FFLAGS      = /NOLIST/OBJECT=$(MMS$TARGET)           .FOR$(OBJ) :,               $(FORT)$(FFLAGS) $(MMS$SOURCE)  %           MACRO     = MACRO/MIGRATION 3           MFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)            .MAR$(OBJ) :-               $(MACRO)$(MFLAGS) $(MMS$SOURCE);             TASM     = MACRO4           TASMFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET)           .M64$(OBJ) :/               $(TASM)$(TASMFLAGS) $(MMS$SOURCE)              MESSAGE     = MESSAGE 4           MSGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .MSG$(OBJ) :1               $(MESSAGE)$(MSGFLAGS) $(MMS$SOURCE)c  A           _______________________________________________________e(           Figure B-2 Cont'd on next page            
           B-8i         A                                         Built-in Dependency RulesR        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________              PASCAL     = PASCALe3           PFLAGS     = /NOLIST/OBJECT=$(MMS$TARGET)e9           PENVFLAGS   = /ENVIRONMENT=$(MMS$TARGET)/NOLIST            .PAS$(OBJ) :.               $(PASCAL)$(PFLAGS) $(MMS$SOURCE)           .PAS.PEN   :1               $(PASCAL)$(PENVFLAGS) $(MMS$SOURCE)e             PLI      = PLI4           PLIFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .PLI$(OBJ) :-               $(PLI)$(PLIFLAGS) $(MMS$SOURCE)              BLIBFLAGS   = /NOLIST.           .REQ$(L32) :C               $(BLISS)/LIBR=$(MMS$TARGET)$(BLIBFLAGS) $(MMS$SOURCE)c           .R32$(L32) :C               $(BLISS)/LIBR=$(MMS$TARGET)$(BLIBFLAGS) $(MMS$SOURCE)s             RPG      = RPG4           RPGFLAGS    = /NOLIST/OBJECT=$(MMS$TARGET)           .RPG$(OBJ) :-               $(RPG)$(RPGFLAGS) $(MMS$SOURCE)l             RUNOFF     = RUNOFFh,           RFLAGS     = /OUTPUT=$(MMS$TARGET)           .RNH.HLP :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)           .RNO.MEM :.               $(RUNOFF)$(RFLAGS) $(MMS$SOURCE)             SCAN     = SCAN 4           SCANFLAGS   = /NOLIST/OBJECT=$(MMS$TARGET)           .SCN$(OBJ) :/               $(SCAN)$(SCANFLAGS) $(MMS$SOURCE)   A           _______________________________________________________ (           Figure B-2 Cont'd on next page  A                                                               B-9     /    #           Built-in Dependency Rulest        @           Figure B-2 (Cont.)  MMK default dependency rules - AXPA           _______________________________________________________iA           _______________________________________________________                                                                                        B-10 s                   A           _______________________________________________________r  %    C      Using the CROSS_ALPHA Rulesl      =           The CROSS_ALPHA.MMS rules file is included with MMKa:           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___________________________n  /           $(EXE)     .EXE      Executable imagep  1           $(L32)     .L32      BLISS Library fileo  *           $(OBJ)     .OBJ      Object file  -           $(OLB)     .OLB      Object library_  A           $(OPT)_____.OPT______Linker_options_file_______________l  9           Since the files mentioned in the table are of a =           different format on OpenVMS AXP systems, developers ;           wishing to do both AXP and VAX builds in the sameC@           directory need a way of preventing the differing files?           from interfering with each other. The CROSS_ALPHA.MMSE:           rules redefine the macros as shown in Table C-2,(           eliminating the name conflict.  A           Table_C-2__CROSS_ALPHA_suffix_macros___________________a  A           Macro______Suffix____Meaning___________________________S  /           $(EXE)     .ALPHA_   Executable image                       EXE  A                                                               C-1     p    %           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 library                       OLB  2           $(OPT)     .ALPHA_   Linker options fileA           ___________OPT_________________________________________u  @           To make all this work, you must use the macros in your?           description file instead of making literal referencesA1           to the file type suffixes. For example:H  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, MMK==           provides the special macros __AXP__  and __ALPHA__, 9           which are, by default, defined only when MMK is >           running on an OpenVMS AXP system. This allows you to>           conditionalize your description file with the .IFDEF9           directive to handle AXP- or VAX-specific cases.           
           C-2p