1
/* MAKECPIP EXEC Make program to build a C/370 module */
2
/* Author: George Petrov, 29 Sep 1994 */
4
arg fn . '(' cparms /* Filter name */
5
'pipe (end ?) < 'fn' makefile', /* get all source files from */
10
cparms = cparms globals
12
say 'Compile options : 'cparms
14
if pos('REB',cparms) > 0 then do
15
parse var cparms cp1 'REB' . ' ' cp2 /* REBuild options specified ? */
18
'pipe (end ?) < 'fn' makefile', /* get all source files from */
19
'| nfind *'||, /* the makefile and compile */
20
'| frlab TEXT:'||, /* only the those who are */
21
'| r: tolab MODULE:'||, /* changed or never compiled */
24
'| chop before str /(/',
26
'| c: fanout', /* compiled */
27
'| specs /Compiling / 1 w1-3 n / .../ n',
32
'pipe (end ?) < 'fn' makefile', /* get all source files from */
33
'| nfind *'||, /* the makefile and compile */
34
'| frlab TEXT:'||, /* only the those who are */
35
'| r: tolab MODULE:'||, /* changed or never compiled */
38
'| specs w1 1 /C/ nw w3 nw write w1 1 /TEXT A/ nw',
39
'| chop before str /(/',
41
'| change (57 66) / /0/',
42
'| sort 1.8 d', /* sort the date and time */
43
'| uniq 1-17 singles', /* if the first is a source */
44
'| sort 1.8 d 64.2 d 57.2 d 60.2 d 66.8 d', /* sort the date */
45
'| uniq 1-8 first', /* if the first is a source */
46
'| locate 9.8 /C /', /* program then it has to be */
47
'| c: fanout', /* compiled */
48
'| specs /Compiling / 1 w1-3 n / .../ n',
54
'| specs w1 1', /* save the module name in var */
60
'| var texts', /* save all the text file names */
61
'?', /* for later include */
63
'| specs /CC / 1 w1-3 n /(NOTERM 'cparms'/ nw', /* compile! */
69
'| specs /----> Errors found! RC=/ 1 1-* n',
74
if symbol('err') = 'VAR' & err ^= 0 then do
75
say 'Errors found in source files - link aborted! RC = 'err
78
say 'Generating module 'module
79
'pipe cms cmod' fn texts' | > 'fn' LINK A'
82
say 'Error in REXX detected!'
83
Say 'Syntax error on line' Sigl':' Sourceline(Sigl)
84
Say 'Error was:' Errortext(RC)