Debian Codegraph @

cmsmvs/mc.exec

raw
1 /* MAKECPIP EXEC Make program to build a C/370 module */
2 /* Author: George Petrov, 29 Sep 1994 */
3
4 arg fn . '(' cparms /* Filter name */
5 'pipe (end ?) < 'fn' makefile', /* get all source files from */
6 '| frlab GLOBALS:'||,
7 '| drop',
8 '| strip',
9 '| var globals'
10 cparms = cparms globals
11 say ''
12 say 'Compile options : 'cparms
13 say ''
14 if pos('REB',cparms) > 0 then do
15 parse var cparms cp1 'REB' . ' ' cp2 /* REBuild options specified ? */
16 cparms = cp1||cp2
17 pipe1=,
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 */
22 '| drop',
23 '| o: fanout',
24 '| chop before str /(/',
25 '| statew',
26 '| c: fanout', /* compiled */
27 '| specs /Compiling / 1 w1-3 n / .../ n',
28 '| cons'
29 end
30 else do
31 pipe1=,
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 */
36 '| drop',
37 '| o: fanout',
38 '| specs w1 1 /C/ nw w3 nw write w1 1 /TEXT A/ nw',
39 '| chop before str /(/',
40 '| statew',
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',
49 '| cons'
50 end
51 pipe2= '?',
52 'r:',
53 '| drop',
54 '| specs w1 1', /* save the module name in var */
55 '| var module',
56 '?',
57 'o:',
58 '| specs w1 1',
59 '| join * / /',
60 '| var texts', /* save all the text file names */
61 '?', /* for later include */
62 'c:',
63 '| specs /CC / 1 w1-3 n /(NOTERM 'cparms'/ nw', /* compile! */
64 '| err: cms | cons',
65 '?',
66 'err:',
67 '| strip both',
68 '| nfind 0'||,
69 '| var err',
70 '| specs /----> Errors found! RC=/ 1 1-* n',
71 '| cons'
72 /* '| g: gate'*/
73 pipe1 pipe2
74 say ''
75 if symbol('err') = 'VAR' & err ^= 0 then do
76 say 'Errors found in source files - link aborted! RC = 'err
77 exit err
78 end
79 say 'Generating module 'module
80 'pipe cms cmod' fn texts' DMSCSL | > 'fn' LINK A'
81 'set cmstype ht'
82 'state 'fn' LINK A'
83 rcc = rc
84 'set cmstype rt'
85 if rcc = 0 then do
86 say ''
87 say 'ERRORS discovered during linking!'
88 say 'See: 'fn' LINK A for more info'
89 end
90 exit rc
91 error:
92 say 'Error in REXX detected!'
93 Say 'Syntax error on line' Sigl':' Sourceline(Sigl)
94 Say 'Error was:' Errortext(RC)
95 return rc