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 functionality

make functionality is designed to facilitate the integration of program systems and intended for use in small to medium-scale software projects where integration is to be handled without extensive administrative.

A program system consists of components such as macros, “includes”, source programs, object modules, main modules, phases, etc. A component is referred to as being dependent if it is generated from other components.

If changes are made in the program system, only the dependent components need to be regenerated to ensure that the program system is up to date. Frequently, changes affect two or more levels.

Example

An object module is generated from a source program and the macros used, and a main module from a series of object modules.

  1. If a source program is changed, it is necessary to generate (compile) the corresponding object module again.

  2. The main module containing that object module must then also be regenerated.

  3. Then the phase containing that object module must be regenerated.

The make functionality can be used to integrate a program system in such as way that, when changes are made in the source programs, only the program-system components affected by the modifications have to be regenerated.

For the make run, it is necessary to consider the following questions:

  • Which component is dependent on which other component?

  • What are the rules according to which the dependent components are generated?

This information is stored in the make substatements (see the next page), where the rules (referred to as “actions” in the following sections) are also defined (see "Actions").

The components which can be processed with the make functionality are library members and files. A dependent component must be generated again if it is older than any of the components on which it is dependent. Depending on the component involved, the time of the most recent modification is considered to be:

  • the MODIFICATION-DATE/TIME in the case of library members

  • the LAST-CHANGE-DATE in the case of files.

The time of the modification is indicated in local time.

Starting make

To start the make functionality, you use the BEGIN-MAKE statement, in which you specify the target component (TARGET) and generate a procedure that regulates continuation processing. The system expects the BEGIN-MAKE statement to be followed by make substatements.

make substatements: describing dependencies and defining actions

The substatements specify the dependencies existing among the components and define actions. The actions describe how a target component is to be generated from the source components and are stored in the procedure specified in the BEGIN-MAKE statement.

The following substatements are available for make:

MODIFY-MAKE-DEFAULTS

SET-STD-ACTION

Modifies make-internal presettings.

Specifies dependencies between individual objects by
defining standard actions which use components of one
member type to generate components of a different
member type.

SET-DEPENDENCY

Specifies the dependencies which exist between the
individual components. Can also be used to define
nonstandard actions which are to be executed at a later
point in time if the target component is not current. Large
numbers of objects can be read in in SET-DEPEN-
DENCY via S variables.

SET-PREPROCESSING

Defines the actions that are to be included at the
beginning of the generated procedure.

SET-POSTPROCESSING

Defines the actions that are to be included at the end of
the generated procedure.

Terminating make

The make substatement END-MAKE concludes the sequence of make substatements and initiates continuation processing. Generally, the continuation processing generates and executes a procedure.

Schematic diagram of make processing

There are two ways to “update” a program system:

  • by generating the updated versions of the outmoded components

  • by “touch”, i.e. by updating only the modification time of the outmoded components (see "TOUCH").

figure 9 shows a schematic diagram of make processing.

The diagram depicts a program system and its components, in which the source components S1 and S2 are used to generate the target component T1.

If the source component S1 is modified, the component dependent on it (target component T1) must be generated again. This means that the make run must be called with the target component T1. The make run describes two things: first, which components are dependent on source component S1, and second, the actions which are required to generate the dependent component.

After the make run has concluded, the procedure which was generated during the run and which contains those actions will be executed. Since the dependent component T1 has a modification time which is earlier than that of the component S1, the T1 component is updated according to the actions contained in the procedure.

In figure 9, the numbers in parentheses have the following meanings:

(1)

Component T1 is dependent on components S1 and S2. Component S1 is then modified. The make run is called with the target component T1 in LMS.

(2)

In the make substatements composing the make run (BEGIN-MAKE through END-MAKE), it is specified that component T1 is dependent on component S1. The statements also define the actions required to generate T1 from S1.
The actions required to update the program system are collected in the procedure specified in the BEGIN-MAKE statement.

(3)

After the make run has concluded (after input of the END-MAKE statement), the procedure is executed.

(4)

“Touch” updates the components’ modification times to the latest status without modifying their contents.

(5)

The updated program system with the newly generated T1 component.

Figure 9: Overview of make processing