write.c changes, Makefile.in version update
[deliverable/binutils-gdb.git] / gas / config-gas.com
CommitLineData
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.
fd4b1131 7$! [That's no longer obvious, but there's not much we can do about alpha yet.]
4b0dd31c
KR
8$!
9$gas_host="vms"
10$!
11$cpu_type="vax"
12$emulation="generic"
13$obj_format="vms"
14$atof="vax"
15$!
fd4b1131
KR
16$ DELETE = "delete/noConfirm"
17$ ECHO = "write sys$output"
4b0dd31c
KR
18$!
19$! Target specific information
20$call link targ-cpu.c [.config]tc-'cpu_type'.c
21$call link targ-cpu.h [.config]tc-'cpu_type'.h
22$call link targ-env.h [.config]te-'emulation'.h
23$!
24$! Code to handle the object file format.
25$call link obj-format.h [.config]obj-'obj_format'.h
26$call link obj-format.c [.config]obj-'obj_format'.c
27$!
28$! Code to handle floating point.
29$call link atof-targ.c [.config]atof-'atof'.c
30$!
31$!
fd4b1131 32$! Create the file version.opt, which helps identify the executable.
4b0dd31c 33$!
fd4b1131
KR
34$if f$trnlnm("IFILE$").nes."" then close/noLog ifile$
35$search Makefile.in "VERSION="/Exact/Output=config-gas-tmp.tmp
36$open ifile$ config-gas-tmp.tmp
4b0dd31c
KR
37$read ifile$ line
38$close ifile$
fd4b1131 39$DELETE config-gas-tmp.tmp;*
c3b0ae93
KR
40$! Discard "VERSION=" and "\n" parts.
41$ijk=f$locate("=",line)+1
4b0dd31c 42$line=f$extract(ijk,f$length(line)-ijk,line)
fd4b1131 43$! [what "\n" part?? this seems to be useless, but is benign]
4b0dd31c
KR
44$ijk=f$locate("\n",line)
45$line=f$extract(0,ijk,line)
46$!
fd4b1131
KR
47$ if f$search("version.opt").nes."" then DELETE version.opt;*
48$copy _NL: version.opt
49$open/Append ifile$ version.opt
50$write ifile$ "identification="+""""+line+""""
c3b0ae93
KR
51$close ifile$
52$! Now write config.h.
fd4b1131
KR
53$ if f$search("config.h").nes."" then DELETE config.h;*
54$copy _NL: config.h
55$open/Append ifile$ config.h
56$write ifile$ "/* config.h. Generated by config-gas.com. */
57$write ifile$ "#ifndef GAS_VERSION"
c3b0ae93 58$write ifile$ "#define GAS_VERSION """,line,""""
fd4b1131
KR
59$write ifile$ "#endif"
60$write ifile$ "/*--*/"
61$append [.config]vms-conf.h ifile$:
4b0dd31c 62$close ifile$
fd4b1131 63$ECHO "Created config.h."
4b0dd31c 64$!
fd4b1131
KR
65$ if f$search("config.status") .nes. "" then DELETE config.status;*
66$ copy _NL: config.status
67$ open/Append file config.status
4b0dd31c
KR
68$ write file "Links are now set up for use with a vax running VMS."
69$ close file
70$ type config.status
71$exit
72$!
73$!
74$link:
75$subroutine
fd4b1131
KR
76$ if f$search(p1).nes."" then DELETE 'p1';*
77$ copy 'p2' 'p1'
78$ ECHO "Copied ''f$edit(p2,"LOWERCASE")' to ''f$edit(p1,"LOWERCASE")'."
4b0dd31c 79$endsubroutine
This page took 0.083746 seconds and 4 git commands to generate.