2002-06-18 Dave Brolley <brolley@redhat.com>
[deliverable/binutils-gdb.git] / gas / config-gas.com
index bba91568a35658f7ec7189cd399ff6a268965a65..cf5248af5da95d5e20346d3571d03b064d80c4e7 100644 (file)
@@ -1,55 +1,50 @@
-$!
+$!config-gas.com
 $! This file sets things up to build gas on a VMS system to generate object
 $! files for a VMS system.  We do not use the configure script, since we
 $! do not have /bin/sh to execute it.
 $!
 $!
-$gas_host="vms"
-$!
-$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)      ! vax==1, alpha==2
-$arch = f$element(arch_indx,"|","|VAX|Alpha|")
-$if arch .eqs. "VAX"
-$then
-$cpu_type="vax"
-$obj_format="vms"
-$atof="vax"
-$else
-$ cpu_type="alpha"
-$ obj_format="evax"
-$ atof="ieee"
-$endif
-$
-$emulation="generic"
+$ gas_host="vms"
+$ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1)     ! vax==1, alpha==2
+$ arch = f$element(arch_indx,"|","|VAX|Alpha|")
+$ if arch.eqs."VAX"
+$ then
+$  cpu_type="vax"
+$  obj_format="vms"
+$  atof="vax"
+$ else
+$  cpu_type="alpha"
+$  obj_format="evax"
+$  atof="ieee"
+$ endif
+$ emulation="generic"
 $!
 $      DELETE  = "delete/noConfirm"
 $      ECHO    = "write sys$output"
 $!
 $! Target specific information
-$call link targ-cpu.c  [.config]tc-'cpu_type'.c
-$call link targ-cpu.h  [.config]tc-'cpu_type'.h
-$call link targ-env.h  [.config]te-'emulation'.h
+$ call make "targ-cpu.h" "[.config]tc-''cpu_type'.h"
+$ call make "targ-env.h" "[.config]te-''emulation'.h"
 $!
 $! Code to handle the object file format.
-$call link obj-format.h        [.config]obj-'obj_format'.h
-$call link obj-format.c        [.config]obj-'obj_format'.c
+$ call make "obj-format.h" "[.config]obj-''obj_format'.h"
 $!
-$! Code to handle floating point.
-$call link atof-targ.c [.config]atof-'atof'.c
+$! (not currently used for vax or alpha)
+$ call make "itbl-cpu.h" "[.config]itbl-''cpu_type'.h"
 $!
 $!
 $! Create the file version.opt, which helps identify the executable.
 $!
 $if f$trnlnm("IFILE$").nes."" then  close/noLog ifile$
-$search Makefile.in "VERSION="/Exact/Output=config-gas-tmp.tmp
+$search CONFIGURE.IN "AM_INIT_AUTOMAKE"/Exact/Output=config-gas-tmp.tmp
 $open ifile$ config-gas-tmp.tmp
 $read ifile$ line
 $close ifile$
 $DELETE config-gas-tmp.tmp;*
-$! Discard "VERSION=" and "\n" parts.
-$ijk=f$locate("=",line)+1
+$! Discard "AM_INIT_AUTOMAKE(gas, " and ")" parts.
+$ijk=f$locate(",",line)+2
 $line=f$extract(ijk,f$length(line)-ijk,line)
-$! [what "\n" part??  this seems to be useless, but is benign]
-$ijk=f$locate("\n",line)
+$ijk=f$locate(")",line)
 $line=f$extract(0,ijk,line)
 $!
 $ if f$search("version.opt").nes."" then DELETE version.opt;*
@@ -64,8 +59,8 @@ $ if f$search("config.h").nes."" then DELETE config.h;*
 $copy _NL: config.h
 $open/Append ifile$ config.h
 $write ifile$ "/* config.h.  Generated by config-gas.com. */
-$write ifile$ "#ifndef GAS_VERSION"
-$write ifile$ "#define GAS_VERSION      """,line,""""
+$write ifile$ "#ifndef VERSION"
+$write ifile$ "#define VERSION      """,line,""""
 $write ifile$ "#endif"
 $write ifile$ "/*--*/"
 $if arch .eqs. "VAX"
@@ -180,9 +175,12 @@ $ type []config.status
 $exit
 $!
 $!
-$link:
-$subroutine
+$make: subroutine
 $  if f$search(p1).nes."" then DELETE 'p1';*
-$  copy 'p2' 'p1'
-$  ECHO "Copied ''f$edit(p2,"LOWERCASE")' to ''f$edit(p1,"LOWERCASE")'."
-$endsubroutine
+$  create 'p1'
+$  if f$trnlnm("IFILE$").nes."" then  close/noLog ifile$
+$  open/Append ifile$ 'p1'
+$  write ifile$ "#include ""''f$string(p2 - "[.config]")'"""
+$  close ifile$
+$  ECHO "Created ''p1' for ''p2'."
+$endsubroutine !make
This page took 0.143983 seconds and 4 git commands to generate.