1$ write sys$output "MinEd VMS make script"
2
3$ sys = f$getsyi("node_swtype")
4$ ver = f$getsyi("version")
5$ arch = f$getsyi("arch_name")
6$ hwname = f$getsyi("hw_name")
7$ nodename = f$getsyi("nodename")
8$ write sys$output "@ ''nodename':	''sys' ''ver' running on ''hwname' (''arch')"
9
10$! Check whether CC calls this warning PTRMISMATCH or PTRMISMATCH1
11$ ptrmismatch := "PTRMISMATCH"
12$ on error then ptrmismatch := "PTRMISMATCH1"
13$ comptest := CC/DECC/WARN=(ERRORS=PTRMISMATCH1)
14$ define/user sys$error nl:	! suppress test error message
15$ define/user sys$output nl:	! and compiler summary
16$ comptest sys$input
17unsigned char * s1 = "";
18$! Set the compile command with appropriate parameters
19$ compile := "cc/decc/warn=(disable=(''ptrmismatch',promotmatchw)) /obj=[.''arch']"
20
21$ made :== "false"
22$ noerr :== "true"
23$ cre/dir [.'arch']
24$ execre = ""
25$ execre = f$cvtime(f$file_attributes ("[.''arch']mined.exe", "cdt"))
26
27$! Alternatives:
28$! call make keymaps /define=NOSTRINGTABLES/include_dir=[.keymaps0]
29$! call make keymaps /define=use_concatenated_keymaps/include_dir=[.keymaps]
30$! call make keymaps /include_dir=[.keymaps1]
31$! BEGIN sources
32$ call make io
33$ call make keyboard
34$ call make minedaux
35$ call make legacy
36$ call make mined1
37$ call make textfile
38$ call make mousemen
39$ call make edit
40$ call make pastebuf
41$ call make textbuf
42$ call make justify
43$ call make search
44$ call make charprop
45$ call make output
46$ call make prompt
47$ call make compose
48$ call make charcode
49$ call make keymaps
50$ call make keydefs
51$ call make dispatch
52$ call make termprop
53$ call make width
54$ call make encoding
55$ call make handescr
56$ call make timestmp
57$! END sources
58
59$ libcre = ""
60$ libcre = f$cvtime(f$file_attributes ("[.''arch']charmaps.olb", "cdt"))
61$ if libcre .eqs. "" then @vms-complib CHARMAPS
62
63$ if made .eqs. "true" .and. noerr .eqs. "true" then goto link
64$ exit
65$ link:
66$  write sys$output "linking MINED"
67$  set default [.'arch']
68$  on error then goto back
69$  link [-]vms-link/opt,[]charmaps/libr /exe=mined
70$ back:
71$  set default [-]
72$  exit
73
74$ make: subroutine
75$!  write sys$output "checking ''p1'"
76$  srcmod = f$cvtime(f$file_attributes ("''p1'.c", "cdt"))
77$  objcre = ""
78$  objcre = f$cvtime(f$file_attributes ("[.''arch']''p1'.obj", "cdt"))
79$!  write sys$output "''srcmod' ''p1'.c"
80$!  write sys$output "''objcre' [.''arch']''p1'.obj"
81$  if objcre .gts. execre then made :== "true"	! link pending
82$  if srcmod .gts. objcre then goto compile
83$  goto endsub
84$ compile:
85$  write sys$output "compiling ''p1'"
86$  on error then noerr :== "false"
87$  compile 'p2 'p1
88$  made :== "true"
89$ endsub:
90$  endsub
91
92