Difference between revisions of "Auto-generated MMS"

From VSI OpenVMS Wiki
Jump to: navigation, search
m (Andrey.logachev moved page Auto-generating MMS to Auto-generated MMS)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
+
The default MMS file generated by <code>VMS-IDE: Create MMS</code> command includes the following operations:
The order of default MMS creation:
+
# Collect the list of header files
# Collect header files list
+
# Collect the list of source files
# Collect source files list
+
# Add header files list as '''INCLUDES'''
# Put header files list as '''INCLUDES''' into default MMS content
+
# Add source files list as '''SOURCES'''
# Put source files list as '''SOURCES''' into default MMS content
+
# Define the main target depending on the project type
# Define main target depending on type of project
 
 
# Define object dependencies
 
# Define object dependencies
  
'''Note''': For some languages the order of compilation is important. To do this just reorder object files in main target definition.
+
'''NOTE''': For some languages the compilation order is important. To change the order in which objects are compiled, reorder the object files in the main target definition.
  
Variables '''DEBUG''', '''OUTDIR''' and '''CONFIG''' will be defined by extension at the moment of compilation.
+
'''NOTE:''' Variables '''DEBUG''', '''OUTDIR''' and '''CONFIG''' will be defined by the VMS IDE extension during compilation.
  
 
==Example==
 
==Example==

Latest revision as of 10:30, 20 August 2019

The default MMS file generated by VMS-IDE: Create MMS command includes the following operations:

  1. Collect the list of header files
  2. Collect the list of source files
  3. Add header files list as INCLUDES
  4. Add source files list as SOURCES
  5. Define the main target depending on the project type
  6. Define object dependencies
NOTE: For some languages the compilation order is important. To change the order in which objects are compiled, reorder the object files in the main target definition.
NOTE: Variables DEBUG, OUTDIR and CONFIG will be defined by the VMS IDE extension during compilation.

Example

! header                                                                      !auto
! Do not modify this file. It may be overwritten automatically.               !auto
! includes                                                                    !auto
INCLUDES=                                                                     !auto
! sources                                                                     !auto
SOURCES= -                                                                    !auto
myprog.cob                                                                    !auto
! dependencies                                                                !auto
.FIRST                                                                        !auto
                                                                              !auto
! compiler/linker options                                                     !auto
.IF DEBUG                                                                     !auto
COMPILEFLAGS = /DEBUG/NOOP/LIST=$(MMS$TARGET_NAME)/OBJECT=$(MMS$TARGET)       !auto
LINKFLAGS = /DEBUG/MAP=$(MMS$TARGET_NAME)/EXECUTABLE=$(MMS$TARGET)            !auto
.ELSE                                                                         !auto
COMPILEFLAGS = /OBJECT=$(MMS$TARGET)                                          !auto
LINKFLAGS = /EXECUTABLE=$(MMS$TARGET)                                         !auto
.ENDIF                                                                        !auto
! directives                                                                  !auto
.SILENT                                                                       !auto
OUT_DIR = .$(OUTDIR).$(CONFIG)                                                !auto
OBJ_DIR = $(OUT_DIR).obj                                                      !auto
.SUFFIXES                                                                     !auto
.SUFFIXES .OBJ .CPP .C .CLD .MSG .BLI .COB .PAS .BAS .F77 .F90 .FOR .B32 .CBL !auto
.CPP.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    $(CXX) $(COMPILEFLAGS) $(MMS$SOURCE)                                      !auto
                                                                              !auto
.C.OBJ                                                                        !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    $(CC) $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.CLD.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    SET COMMAND/OBJECT=$(MMS$TARGET) $(MMS$SOURCE)                            !auto
                                                                              !auto
.MSG.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    MESSAGE /OBJECT=$(MMS$TARGET) $(MMS$SOURCE)                               !auto
                                                                              !auto
.BLI.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BLISS $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.B32.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BLISS $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.COB.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    COBOL $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.CBL.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    COBOL $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.PAS.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    PASCAL $(COMPILEFLAGS) $(MMS$SOURCE)                                      !auto
                                                                              !auto
.BAS.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BASIC $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.F77.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.F90.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.FOR.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.DEFAULT                                                                      !auto
    ! Source $(MMS$TARGET) not yet added                                      !auto
                                                                              !auto
! main target                                                                 !auto
[$(OUT_DIR)]$(NAME).EXE :  -                                                  !auto
[$(OBJ_DIR)]myprog.obj                                                        !auto
    CXXLINK $(LINKFLAGS) $(MMS$SOURCE_LIST)                                   !auto
                                                                              !auto
! objects                                                                     !auto
[$(OBJ_DIR)]myprog.obj : myprog.cob $(INCLUDES)                               !auto