[go: up one dir, main page]

File: make.com

package info (click to toggle)
archie 1.4.1-8.1
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 500 kB
  • ctags: 1,025
  • sloc: ansic: 5,898; lisp: 454; makefile: 99
file content (540 lines) | stat: -rw-r--r-- 17,686 bytes parent folder | download | duplicates (3)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
$! --- MAKE.COM ---						!x=f$verify(0)
$! Description:
$!  build the Archie client for VAX/VMS
$!
$! Written by Luke Brennan  <brennan@cchs.su.oz.AU>
$!
$! Modifications:
$!    Date	Programmer	Reason for modification.
$! 26-Oct-92	   bpk		1.11 Remove ALLOCA.
$! 26-Oct-92       ldcb         1.10 HMMM... alloca.c required by VAXC!!!!
$!                                   (this is a built-in for GNU_CC)
$!                                   add support for NON_GNU_CC (p3 arg) on
$!                                   source entries.
$! 26-Oct-92       ldcb         1.09 Add NOGNU command-line switch so that I
$!                                   can force it to use VAXC rather than GNU.
$! 26-Oct-92       ldcb         1.08 Add GETOPT sources for Archie 1.4
$! 13-Oct-92	   bpk		1.07 Add Japan and Taiwan servers.
$! 10-Oct-92	   ldcb		1.06 Add (Israel) archie server.
$! 25-Sep-92	   ldcb		1.05 Add (USA [NE]) archie server.
$! 23-Sep-92	   ldcb   	1.04 Details... details..
$!                                   cope with SUPPORT files being used...
$!                                   You will need to enter your OWN stuff
$!                                   into the CREATE_SUPPORT_OPTIONS gosub,
$!                                   as I don't know what you're using!
$! 22-Sep-92       ldcb         1.03 Oops! GCC now works correctly...
$! 22-Sep-92	   ldcb		1.02 Clean up a few tiny details.
$! 22-Jan-92       ldcb		1.01 Fix some bugs (so I rushed..)
$! 20-Jan-92	   ldcb		1.00 Initial coding.
$!
$ make_version := 1.10
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$ Archie_EXECUTABLE := "archie.exe"
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! add a new call here with the appropriate new Archie server host(s)
$!
$ arg == 1
$ Call AddHost "archie.au"		"(Australia)"
$ Call AddHost "archie.mcgill.ca"	"(Canada)"
$ Call AddHost "archie.doc.ic.ac.uk"	"(Great Britain/Ireland)"
$ Call AddHost "archie.funet.fi"	"(Finland/Mainland Europe)"
$ Call AddHost "archie.cs.huji.ac.il"	"(Israel)
$ Call AddHost "archie.wide.ad.jp"	"(Japan)"
$ Call AddHost "archie.ncu.edu.tw"	"(Taiwan)"
$ Call AddHost "archie.unl.edu"		"(USA [NE])"
$ Call AddHost "archie.ans.net"		"(USA [NY])"
$ Call AddHost "archie.rutgers.edu"	"(USA [NJ])"
$ Call AddHost "archie.sura.net"	"(USA [MD])"
$ MAXHOSTS = arg - 1
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! add a new call here with any new source file(s)
$! (P2 should be "SUPPORT" if intended for supporting an unknown TCPIP)
$! (P3 should be "NON_GNU_CC" if a GNU_CC supported function isn't yet in VAXC,
$!                            which means WE have to provide it to VAXC)
$!
$ arg == 1
$ Call AddSource "AQUERY"
$ Call AddSource "ARCHIE"
$ Call AddSource "ATALLOC"
$ Call AddSource "DIRSEND"
$ Call AddSource "GETOPT"
$ Call AddSource "GETOPT1"
$ Call AddSource "GET_PAUTH"
$ Call AddSource "GET_VDIR"
$ Call AddSource "PERRMESG"
$ Call AddSource "PROCQUERY"
$ Call AddSource "PTALLOC"
$ Call AddSource "REGEX"
$ Call AddSource "STCOPY"
$ Call AddSource "SUPPORT"
$ Call AddSource "VLALLOC"
$ Call AddSource "VL_COMP"
$ Call AddSource "VMS_SUPPORT"	"SUPPORT"
$ MAXSOURCEFILES = arg - 1
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! add a call here with any supported TCP/IP implementations
$!  P1 = name of TCP/IP product, P2 = cc/define to set,
$!  P3 = logical to look for,    P4 = location of link/OPT,
$!  P5 = MINIMUM VERSION of TCP/IP to support
$!
$!  Multinet should be last, as it can 'fake' a UCX if you want it to, so
$!  UCX would come up as the 'real' net even though Multinet is used.
$!
$ arg == 1
$ Call AddTCPIP "UCX"        "UCX"         "UCX$DEVICE" "[.vms]ucx.opt"
$ Call AddTCPIP "WOLLONGONG" "WOLLONGONG"  "TWG$TCP"    "[.vms]woll.opt"
$ Call AddTCPIP "MULTINET"   "MULTINET_30" "MULTINET"   "[.vms]multi.opt" "V3.0"
$ MAXTCPIPTYPES = arg - 1
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$ YES = (1.eq.1)
$ NO  = (1.eq.0)
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$ GoSub get_command_line_args
$ GoSub check_for_GNU_cc		! use GNU if it's available..
$ GoSub check_which_TCPIP
$ GoSub ask_nearest_ARCHIE_HOST
$ GoSub check_for_strings_H
$ GoSub set_cc_defines
$ GoSub do_compiles
$ If (LINKAGE_REQUIRED)
$ Then GoSub do_link
$ Else Write Sys$OutPut "ARCHIE is up to date."
$ EndIF
$ Exit
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$get_command_line_args:
$ cmdline = P1 + P2 + P3 + P4 + P5 + P6 + P7 + P8
$ If ((f$locate("DEBUG",cmdline) .ne. f$length(cmdline)) -
 .or. (f$locate("DBG",cmdline)   .ne. f$length(cmdline)))
$ Then debug := "/DeBug"
$ Else debug := "/NOdebug"
$ EndIF
$ If (f$locate("FORCE",cmdline) .ne. f$length(cmdline))
$ Then FORCEBUILD = YES
$ Else FORCEBUILD = NO
$ EndIF
$ If (f$locate("LINK",cmdline) .ne. f$length(cmdline))
$ Then FORCELINK = YES
$ Else FORCELINK = NO
$ EndIF
$ If (f$locate("NOGNU",cmdline) .ne. f$length(cmdline))
$ Then FORCEVAXCC = YES
$ Else FORCEVAXCC = NO
$ EndIF
$ If ((f$locate("?",cmdline) .ne. f$length(cmdline)) -
 .or. (f$locate("H",cmdline) .ne. f$length(cmdline)))
$ Then
$   Write Sys$Output "Usage:"
$   Write Sys$OutPut "     @MAKE [<debug>|<force>|<link>|<nognu>|<help>]
$   EXIT
$ EndIF
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$CHECK_FOR_GNU_CC:
$ If (f$trnlnm("GNU_CC") .nes. "")
$ Then
$   If (.NOT. FORCEVAXCC)
$   Then
$     cc := "GCC/Optimize/Include=([])"
$     gnu_cc = YES
$   Else		! I'm forcing it to use VAXC
$     cc := "CC/Optimize=NOinline/Include=([])"
$     gnu_cc = NO
$   EndIF
$ Else			! I can only use VAXC..
$   cc := "CC/Optimize=NOinline/Include=([])"
$   gnu_cc = NO
$ EndIF
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! for product P1, cc/define=P2 if logical P3 present on system.
$! Libs/option = P4 if present. ALL get disregarded if less than version P5
$!
$CHECK_WHICH_TCPIP:
$ tcpip_flag :=
$ tcpip_libs :=
$ NO_TCPIP_SUPPORT = YES
$ i = 1
$tcp_loop:
$ If (i .gt. MAXTCPIPTYPES) Then GoTo tcp_check_done
$ If (f$type(tcpip_P2_'i') .eqs. "") Then GoTo tcp_check_done
$ If (f$type(tcpip_P3_'i') .nes. "")
$ Then
$   tcpip_logical = tcpip_P3_'i'
$   If (tcpip_logical .nes. "")
$   Then					! logical to look for
$     If (f$logical(tcpip_logical) .nes. "")
$     Then
$       tcpip_flag = tcpip_P2_'i'
$       tcpip_flag = f$fao(",!AS=1",tcpip_flag)
$       NO_TCPIP_SUPPORT = NO
$       If (f$type(tcpip_P4_'i') .nes. "")
$       Then					! link/OPT file location
$  	  tcpip_linkOPTs = tcpip_P4_'i'
$         If (tcpip_linkOPTs .nes. "")
$         Then
$           If (f$search(tcpip_linkOPTs) .nes. "")
$           Then
$             tcpip_libs = tcpip_P4_'i'
$             tcpip_libs = f$fao("!AS/Option",tcpip_libs)
$           EndIF
$         EndIF
$       EndIF
$       If (f$type(tcpip_P5_'i') .nes. "")
$       Then					! minimum version specified
$         If (tcpip_P5_'i' .nes. "")
$         Then
$           GoSub CheckIfVersionOK
$           If VERSION_TOO_EARLY
$           Then				! too early.. use SUPPORT files
$             tcpip_flag :=
$             tcpip_libs :=
$             NO_TCPIP_SUPPORT = YES
$	      tcp_ver = tcpip_P5_'i'
$             tcp_name = tcpip_P1_'i'
$             Write Sys$OutPut f$fao( -
		   "Your version of !AS is earlier than !AS.",tcp_name,tcp_ver)
	      Write Sys$OutPut "MAKE will use STD support files instead."
$	      If (f$mode() .eqs. "INTERACTIVE")
$	      Then
$	        Read/Prompt="enter <CR> to continue" SYS$COMMAND dummy
$	      EndIF
$           EndIF
$         EndIF
$       EndIF
$     EndIF
$   EndIF
$ EndIF
$ i = i + 1
$ Goto tcp_loop
$tcp_check_done:
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$ASK_NEAREST_ARCHIE_HOST:
$GoSub CLRSCN
$ Write Sys$OutPut f$fao("archie make V!AS!/!/!AS!/!/", -
	make_version, -
	"           Enter the number of the ARCHIE HOST nearest you.")
$!
$ i = 1
$_display_loop:
$ If (i .gt. MAXHOSTS) Then GoTo _display_done
$  Write Sys$OutPut f$fao("!2SL) !25AS  !AS",i,host_P1_'i',host_P2_'i')
$  i = i + 1
$ GoTo _display_loop
$_display_done:
$!
$ If (f$mode() .eqs. "INTERACTIVE")
$ Then
$   Assign/User_Mode/NOlog Sys$Command Sys$InPut
$_select_loop:				! get their selection
$   selection = 99
$   Read	 Sys$Command selection	-
		/End=_selection_made	-
		/Prompt="Enter number of your selection: "
$_selection_made:
$   If (selection .gt. MAXHOSTS)
$   Then
$     Write Sys$Error f$fao("!AS !2SL", "error: Options only go to", MAXHOSTS)
$     GoTo _select_loop
$   EndIF
$   ascii_string = f$edit(selection,"COLLAPSE,UPCASE")
$   ascii_char = f$extract(0,1,ascii_string)
$   If (ascii_char .eqs. "Q") Then EXIT
$   If (f$length(ascii_string) .eq. 1) Then ascii_string = "0" + ascii_string
$   If .NOT. (("00".lts.ascii_string) .and. (ascii_string.les."''MAXHOSTS'"))
$   Then
$     Write Sys$Error -
	    f$fao("error: Enter option NUMBER (up to !2SL)", MAXHOSTS)
$     Goto _select_loop
$   EndIF
$ Else			! BATCH can't be queried - assume selection 1
$   selection = 1
$ EndIF
$!
$ local_archie = host_P1_'selection'
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! If we're using VAXC then we need to grab STRINGS.H from SYS$LIBRARY.
$CHECK_FOR_STRINGS_H:
$ delete := delete
$ copy   := copy
$ If (f$search("strings.h") .nes. "") Then delete/nolog/noconfirm []strings.h;*
$ If ((.NOT. (GNU_CC)) -
  .or. (FORCEVAXCC)) Then copy/noconfirm sys$library:string.h []strings.h
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! **NOTE** use of global symbol!!!
$! **NOTE** this is the only way I could pass it to the compile subroutine
$! **NOTE** without DCL and/or CC stripping off too many layers of quotes..
$! **NOTE** yeah.. I know.. It's ugly...  you work it out!! :-)
$SET_CC_DEFINES:
$ archie_host = " """"""ARCHIE_HOST=""""""""''local_archie'"""""""" """""" "
$ cflags :== /define=(debug=1,funcs=1,noregex=1'tcpip_flag','archie_host')
$!
$RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$DO_COMPILES:
$ GoSub CLRSCN
$ LINKAGE_REQUIRED == NO
$ If ("''f$type(Archie_EXECUTABLE)'" .nes. "")
$ Then
$   If (Archie_EXECUTABLE .nes. "")
$   Then If (f$search(Archie_EXECUTABLE) .eqs. "") Then LINKAGE_REQUIRED == YES
$   Else If (f$search("Archie.exe") .eqs. "") Then LINKAGE_REQUIRED == YES
$   EndIF
$ Else
$   If (f$search("Archie.exe") .nes. "") Then LINKAGE_REQUIRED == YES
$ EndIF
$ i = 1
$cc_loop:
$ If (i .gt. MAXSOURCEFILES) Then GoTo cc_done
$ source_file = source_P1_'i'
$ If ((.NOT. GNU_CC) -
  .or.((GNU_CC).and.((f$type(source_P3_'i').eqs."").or.(source_P3_'i'.eqs.""))))
$ Then
$   If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
$   Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
$   Else
$     If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
$     Then Call Compile "''cc'" "''source_file'" "''debug'" 'FORCEBUILD'
$     EndIF
$   EndIF
$ EndIF
$ i = i + 1
$ GoTo cc_loop
$cc_done:
$ If (FORCELINK) Then LINKAGE_REQUIRED == YES
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$DO_LINK:
$ If (f$type(Archie_EXECUTABLE) .nes. "")
$ Then
$   If (Archie_EXECUTABLE .nes. "")
$   Then executable := /Exec='Archie_EXECUTABLE'
$   Else executable := /Exec=Archie.exe
$   EndIF
$ Else
$   executable := /Exec=Archie.exe
$ EndIF
$ i = 1
$ object_files :=
$object_files_loop:
$ If (i .gt. MAXSOURCEFILES) Then GoTo object_files_done
$ object_file = source_P1_'i'
$ If ((.NOT. GNU_CC) -
  .or.((GNU_CC).and.((f$type(source_P3_'i').eqs."").or.(source_P3_'i'.eqs.""))))
$ Then
$   If ((f$type(source_P2_'i') .eqs. "") .or. (source_P2_'i' .eqs. ""))
$   Then object_files := 'object_files'+'object_file'
$   Else
$     If ((NO_TCPIP_SUPPORT) .and. (source_P2_'i' .eqs. "SUPPORT"))
$     Then object_files := 'object_files'+'object_file'
$     EndIF
$   EndIF
$ EndIF
$ i = i + 1
$ GoTo object_files_loop
$object_files_done:
$ If (f$extract(0,1,object_files) .eqs. "+")
$ Then object_files = f$extract(1,f$length(object_files),object_files)
$ EndIF
$!
$ If (gnu_cc)
$ Then
$   If (tcpip_libs .nes. "")
$   Then tcpip_libs = tcpip_libs + ",GNU_CC:[000000]GCCLIB/Library"
$   Else tcpip_libs = "GNU_CC:[000000]GCCLIB/Library"
$   EndIF
$ EndIF
$!
$ If (NO_TCPIP_SUPPORT)
$ Then
$   dev=f$TrnLnm("SYS$DISK")
$   If (f$search("NO_SUPPORT.OPT") .eqs. "") Then GoSub Create_Support_Options
$   If (tcpip_libs .nes. "")
$   Then tcpip_libs = tcpip_libs + ",'dev'[]No_Support.opt/OPTION"
$   Else tcpip_libs = "'dev'[]No_Support.opt/OPTION"
$   EndIF
$ EndIF
$!
$ If (tcpip_libs .nes. "")
$ Then object_files = object_files + ","
$ EndIF
$!
$ Set Verify
$ Link'debug''executable' 'object_files''tcpip_libs'
$ x='f$verify(0)'
$!
$ here =f$environment("procedure") ! assume .EXE is in same directory as MAKE.
$ here = f$parse(here,,,"DEVICE") + f$parse(here,,,"DIRECTORY")
$!
$ Write Sys$OutPut " "
$ Write Sys$OutPut " "
$ Write Sys$OutPut "Done! Define the symbol ARCHIE & fire away."
$ Write Sys$OutPut "e.g."
$ Write Sys$OutPut f$fao("  $ archie :== $!AS!AS",here,archie_executable)
$ Write Sys$OutPut "  $ archie GOPHER"
$!
$ RETURN
$!
$! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$CLRSCN:
$If (f$GetDVI("TT:","TT_ANSICRT"))			! ANSI compatible?
$Then
$  CSI = "x["
$  CSI[0,8] = 27
$  CLS = CSI + "H" + CSI +"2J"
$  Write Sys$OutPut CLS
$Else					! otherwise pump out some <CR>s..
$  lines=f$GetDVI("TT:","TT_PAGE")
$  Write Sys$Output f$fao("!''lines'(/)")
$EndIF
$Return
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$AddHOST: SUBROUTINE
$ host_P1_'arg' :== "''P1'"
$ host_P2_'arg' :== "''P2'"
$ arg == arg + 1	! *NOTE* global symbols used...
$ENDSUBROUTINE
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$AddSOURCE: SUBROUTINE
$ source_P1_'arg' :== "''P1'"
$ source_P2_'arg' :== "''P2'"
$ source_P3_'arg' :== "''P3'"
$ arg == arg + 1	! *NOTE* global symbols used...
$ENDSUBROUTINE
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$AddTCPIP: SUBROUTINE
$ tcpip_P1_'arg' :== "''P1'"
$ tcpip_P2_'arg' :== "''P2'"
$ tcpip_P3_'arg' :== "''P3'"
$ tcpip_P4_'arg' :== "''P4'"
$ tcpip_P5_'arg' :== "''P5'"
$ arg == arg + 1	! *NOTE* global symbols used...
$ENDSUBROUTINE
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$! **NOTE** cflags is a GLOBAL symbol due to problems with quoted /Defines
$! **NOTE** not passing down correctly.. (I gave up!)
$Compile: SUBROUTINE
$ YES = (1.eq.1)
$! --- do a Make of only that source which has been modified since its
$!     object code was generated or that is missing its object code.
$ cc       = "''P1'"
$ source   = "''P2'"
$ dbg      = "''P3'"
$ FORCED   = P4
$!
$source = source - ".C" + ".C"
$ t1 = f$search("''source'")				! source exists?
$  If (t1 .eqs. "") Then GoTo _error_source_missing	! YIPE!
$   source = source - ".C"
$    if (FORCED) Then GoTo _compile_the_source		! forced to compile
$     t1 = f$search("''source'.OBJ")			! object exist?
$     If (t1 .eqs. "") Then GoTo _compile_the_source	! object missing
$     t1 = f$file_attributes("''source'.OBJ","RDT")	! when was the OBJECT
$    t1 = f$cvtime(t1)					! produced? (rev date)
$   t2 = f$file_attributes("''source'.C","RDT")		! when was source last
$  t2 = f$cvtime(t2)					! modified?
$ If (t1 .ges. t2) Then GoTo _bypass_compile		! object still current
$_compile_the_source:
$ set verify
$ 'cc -
  'cflags -
  'dbg 'source
$ x='f$verify(0)'
$ LINKAGE_REQUIRED == YES
$  GoTo _cc_done
$_bypass_compile:					! didn't need to
$  GoTo _cc_done					! generate new OBJ file
$_error_source_missing:
$ Write Sys$Error "ERROR: unable to locate source file ''source'"
$_cc_done:
$ENDSUBROUTINE
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$CHECKIFVERSIONOK:
$ required_version = tcpip_P5_'i'
$ tcpip_type = tcpip_P1_'i'
$ If ("MULTINET" .eqs. tcpip_type)
$ Then						! I know how to check MULTINET
$   If (f$search("MULTINET:MULTINET_VERSION.;") .nes. "")
$   Then
$     Open/share=READ fd MULTINET:MULTINET_VERSION.;
$     Read fd buffer
$     Close fd
$     v = buffer - "VERSION"
$     v = f$edit(v,"TRIM,COMPRESS")
$     If (v .ges. required_version)
$     Then VERSION_TOO_EARLY = NO
$     Else VERSION_TOO_EARLY = YES
$     EndIF
$   Else
$     VERSION_TOO_EARLY = YES
$   EndIF
$ Else						! don't know, so assume current
$   VERSION_TOO_EARLY = NO
$ EndIF
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$CREATE_SUPPORT_OPTIONS:
$ Open/Write fd No_Support.OPT
$ Write fd "! --- No_Support.OPT ---"
$ Write fd "!"
$ Write fd "! provides the VaxCrtl linkage for the client that has no"
$ Write fd "! known supported TCP/IP implementation."
$ Write fd "!"
$ Write fd "Sys$Share:VaxCrtl.exe/Share"
$ Write fd "!"
$ Write fd "! You will have to add in your specific TCP/IP libraries here."
$!
$! Early MULTINETs would look something like this... (I don't remember!)
$! I assume CMUTEK would need something along these lines too...
$!
$! If (F$TrnLnm("MULTINET") .nes. "")
$! Then
$!   Write fd "Multinet:Multinet_Socket_Library.exe/Share
$! EndIF
$!
$ Write fd "!"
$ Close fd
$!
$ RETURN
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!