1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
$! VMSBUILD.COM Build the Funnelweb program under VMS
$!
$! J Begg VSM Software Services 11-Feb-1992 jeremy@vsm.com.au
$!
$! set verify
$ set noon
$ say = "write sys$output"
$ sts = 1
$
$!
$! Make sure we are in the sources directory -- Assumes this procedure is in
$! the same directory as the sources.
$!
$ cur_def = f$env("DEFAULT")
$ proc = f$env("PROCEDURE")
$ procnam = proc - f$parse(proc,,,"VERSION")
$ procdir = proc - f$parse(proc,,,"NAME") -
- f$parse(proc,,,"TYPE") -
- f$parse(proc,,,"VERSION")
$ sourcedir = procdir - "ADMIN]" + "SOURCES]"
$ if f$search(sourcedir+"WEAVE.C").eqs.""
$ then
$ say "It would appear that the FunnelWeb sources have not been"
$ say "loaded into the correct directory. Please move them into"
$ say " ", procdir
$ say "then re-execute this procedure."
$ goto Exit
$ endif
$
$ set default 'sourcedir'
$ show default
$
$!
$! Check for VAX C, use GNU C if VAX C is not found
$!
$ if f$search("SYS$SYSTEM:VAXC.EXE").nes.""
$ then
$ say " Using VAX C. If you prefer to use GNU C, edit the file"
$ say " ",procnam
$ say " as instructed therein."
$ use_VAXC = "true"
$ else
$ say " VAX C not found -- using GNU C."
$ use_VAXC = "false"
$ endif
$
$!*************************************************************************
$! UNCOMMENT the following line to force use of VAX C !*
$! use_VAXC = "true" !*
$! UNCOMMENT the following line to force use of GNU C !*
$! use_VAXC = "false" !*
$!*************************************************************************
$!
$! Set up the appropriate symbols
$!
$ if use_VAXC
$ then
$ cc = "CC"
$ cflags = "/DEBUG/WARN/NOOPT/LIST"
$ else
$ cc = "GCC"
$ cflags = " -g -Wall"
$ endif
$
$ link = "link"
$
$!
$! An object library is used to hold .OBJ files along the way.
$!
$ if f$search("FUNNELWEB.OLB").eqs."" then $ lib/cre/obj funnelweb.olb
$
$ if "''p1'" .eqs. "LINK" then $ goto Done_Compile
$!
$! Search for .C files, compiling same.
$!
$ old_src = ""
$ filecount = 0
$ skiptofile = ""
$ if "''p1'" .nes. ""
$ then
$ skiptofile = "$USERS:[ROSS.FWDIR.SOURCES]''p1'"
$ endif
$Compile:
$ src = f$search("*.C")
$ if src.eqs."" then $ goto Done_Compile
$ if src.eqs.old_src then $ goto Done_Compile
$ srcnam = src - f$parse(src,,,"TYPE") - f$parse(src,,,"VERSION")
$ if srcnam .lts. skiptofile
$ then
$ write sys$output "Skipping ''srcnam'"
$ goto Compile
$ endif
$ say "Compiling ",srcnam
$ 'cc 'cflags 'srcnam
$ if .not.$status then $ goto Compile_Failed
$ lib/repl funnelweb 'srcnam
$ deletx 'srcnam'.obj;
$ goto Compile
$
$Compile_Failed:
$ sts = $status
$ say "Build of FunnelWeb aborted because compile failed for file:"
$ say src
$ goto Exit
$
$Done_Compile:
$ say "Linking..."
$ cur_exe = f$search("FUNNELWEB.EXE")
$ !Jeremy's link: link/debug/map/full funnelweb/opt
$ link funnelweb/library/include=main,sys$input:/opt/exe='procdir'fw.exe
sys$share:vaxcrtl/share
$ if $status then $ goto Exit
$ sts = $status
$ say "Build of FunnelWeb aborted in Link phase"
$ if f$search("FUNNELWEB.EXE").nes.cur_exe then $ delete funnelweb.exe;
$
$Exit:
$ set default 'cur_def'
$ exit sts
|