add more direct/unpack code
[deliverable/binutils-gdb.git] / gas / config-gas.com
index bba91568a35658f7ec7189cd399ff6a268965a65..0533d12e49c187dac6bde886089b178a235d34d9 100644 (file)
@@ -40,16 +40,15 @@ $!
 $! 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 +63,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"
This page took 0.023499 seconds and 4 git commands to generate.