]>
Commit | Line | Data |
---|---|---|
4b0dd31c KR |
1 | $! |
2 | $! This file sets things up to build gas on a VMS system to generate object | |
3 | $! files for a VMS system. We do not use the configure script, since we | |
4 | $! do not have /bin/sh to execute it. | |
5 | $! | |
6 | $! If you are running this file, then obviously the host is vax-dec-vms. | |
7 | $! | |
8 | $gas_host="vms" | |
9 | $! | |
10 | $cpu_type="vax" | |
11 | $emulation="generic" | |
12 | $obj_format="vms" | |
13 | $atof="vax" | |
14 | $! | |
15 | $! host specific information | |
16 | $call link host.h [.config]ho-'gas_host'.h | |
17 | $! | |
18 | $! Target specific information | |
19 | $call link targ-cpu.c [.config]tc-'cpu_type'.c | |
20 | $call link targ-cpu.h [.config]tc-'cpu_type'.h | |
21 | $call link targ-env.h [.config]te-'emulation'.h | |
22 | $! | |
23 | $! Code to handle the object file format. | |
24 | $call link obj-format.h [.config]obj-'obj_format'.h | |
25 | $call link obj-format.c [.config]obj-'obj_format'.c | |
26 | $! | |
27 | $! Code to handle floating point. | |
28 | $call link atof-targ.c [.config]atof-'atof'.c | |
29 | $! | |
30 | $! | |
31 | $! Create the file version.opt, which helps identify the executalbe. | |
32 | $! | |
33 | $search version.c version_string,"="/match=and/output=t.tmp | |
34 | $open ifile$ t.tmp | |
35 | $read ifile$ line | |
36 | $close ifile$ | |
37 | $delete/nolog t.tmp; | |
38 | $ijk=f$locate("""",line)+1 | |
39 | $line=f$extract(ijk,f$length(line)-ijk,line) | |
40 | $ijk=f$locate("""",line) | |
41 | $line=f$extract(0,ijk,line) | |
42 | $ijk=f$locate("\n",line) | |
43 | $line=f$extract(0,ijk,line) | |
44 | $! | |
45 | $i=0 | |
46 | $loop: | |
47 | $elm=f$element(i," ",line) | |
48 | $if elm.eqs."" then goto no_ident | |
49 | $if (elm.les."9").and.(elm.ges."0") then goto write_ident | |
50 | $i=i+1 | |
51 | $goto loop | |
52 | $! | |
53 | $no_ident: | |
54 | $elm="?.??" | |
55 | $! | |
56 | $! | |
57 | $write_ident: | |
58 | $open ifile$ version.opt/write | |
59 | $write ifile$ "ident="+""""+elm+"""" | |
60 | $close ifile$ | |
61 | $! | |
62 | $ ! | |
63 | $ if f$search("config.status") .nes. "" then delete config.status.* | |
64 | $ open/write file config.status | |
65 | $ write file "Links are now set up for use with a vax running VMS." | |
66 | $ close file | |
67 | $ type config.status | |
68 | $exit | |
69 | $! | |
70 | $! | |
71 | $link: | |
72 | $subroutine | |
73 | $if f$search(p1).nes."" then delete/nolog 'p1'; | |
74 | $copy 'p2' 'p1' | |
75 | $write sys$output "Linked ''p2' to ''p1'." | |
76 | $endsubroutine |