Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

make operation

In order to determine where dependencies exist, a graph describing the entire program system is constructed, taking as its starting point the component specified as the target component in the BEGIN-MAKE statement. The graph is then elaborated by evaluating the existing dependencies (make substatement SET-DEPENDENCY).

Dependencies have the following structure:

(target-object1, target-object 2),(from-object1, from-object2,...),

(action1,...)

where this notation signifies:

  • that the target objects are dependent on the source components (from-objects) and

  • that the actions describe how a target component is to be generated.

A target object is not current if any of the associated source components (from-objects) have a more recent modification time, or the target component is not available.

The dependency represented above is equivalent to the following:

target-object1, (from-object1, from-object2,...), (action1,...)

target-object2, (from-object1, from-object2,...), (action1,...)

At first, the graph consists solely of the target of the make run, but is then gradually elaborated with the aid of the dependencies. If a component in the graph is a target component and has as yet no successor, the associated source components are appended to that node.

The graph is finished when make has applied all of the existing dependencies. The components of the graph which have no source components (from-objects) are the sources of the program system. They must exist in full form in order to generate the target of the make run. All the sources for a target component must exist (not just the modified components), or the make run will be aborted and an error message issued.

For each target component, only one uniquely specified action may exist. Otherwise, the make run will be aborted and an error message issued.

Taking the sources as starting points, make evaluates the relations between the target components and the source components in regard to their modification times. If it determines that a target component is not current, make initiates the action required to update it.

Example

This example shows how the make functionality works when wildcards are used. The library where the components are located is the preset library.

The phase member PROG (member type C) is generated from the object modules PART1 and PART2 (both of member type R). These objects are compiled from sources of type S with the suffix “.COB”. The actions are merely mentioned.

The dependencies (library members in the format (,NAME,TYPE)):


(1) TARGET-OBJECT1 = *LIB-ELEM(,PROG,C), -
   (FROM-OBJECT1=*LIB-ELEM(,PART1,R), FROM-OBJECT2=*LIB-ELEM(,PART2,R)), -
   ACTION1 = 'LINK PROG' 
(2) TARGET-OBJECT2 = *LIB-ELEM(,*,R) , -
   FROM-OBJECT = *LIB-ELEM(,**.COB,S), -
   ACTION2 = 'COMPILE' 


If it is to be generated in the make run, the component *LIB-ELEM (,PROG,C) is the start node of the graph.

The graph can be elaborated only with dependency (1). The result:

As a make selection specification, the target component of dependency (2) corresponds to *LIB-ELEM(,PART1,R), which supplies the associated source components as the result of the construction *LIB-ELEM(,PART1.COB,S). In the graph, the latter is appended to *LIB-ELEM(,PART,R).

In the same way, (,PART2.COB,S) is appended to (,PART2,R).

*LIB-ELEM(,PART1.COB,S) and *LIB-ELEM(,PART2.COB,S) are the sources required for the generation of *LIB-ELEM(,PROG,C) and must be available in full form.