~ubuntu-branches/ubuntu/precise/unzip/precise-proposed

« back to all changes in this revision

Viewing changes to cmsmvs/mc.exec

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-06-06 17:57:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040606175746-nl7p2dgp3aobyc2c
Tags: upstream-5.51
ImportĀ upstreamĀ versionĀ 5.51

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
    '| nfind 0'||,
 
68
    '| var err',
 
69
    '| specs /----> Errors found! RC=/ 1 1-* n',
 
70
    '| cons'
 
71
/*  '| g: gate'*/
 
72
pipe1 pipe2
 
73
say ''
 
74
if symbol('err') = 'VAR' & err ^= 0 then do
 
75
      say 'Errors found in source files - link aborted! RC = 'err
 
76
      exit err
 
77
end
 
78
say 'Generating module 'module
 
79
'pipe cms cmod' fn texts' | > 'fn' LINK A'
 
80
exit rc
 
81
error:
 
82
say 'Error in REXX detected!'
 
83
Say 'Syntax error on line' Sigl':' Sourceline(Sigl)
 
84
Say 'Error was:' Errortext(RC)
 
85
return rc