Branch: Tag:

2000-08-14

2000-08-14 16:11:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Object files are now named *.obj and *.o to avoid warnings.

Rev: NT/tools/rntecl:1.4

1:   #!/usr/local/bin/pike   // -*- Pike -*-    - // $Id: rntecl,v 1.3 2000/08/01 15:53:31 grubba Exp $ + // $Id: rntecl,v 1.4 2000/08/14 16:11:46 grubba Exp $      // RNTECL, a front-end to Intel ECL with options similar to GCC   // Written by Fredrik Hubinette & Henrik Grubbström.
40:    return reverse(file);   }    + string o_to_obj(string fname) + { +  if (fname[sizeof(fname)-3..] == ".o") { +  return fname + "bj"; +  } +  return fname; + }      int main(int argc, string *argv)   {
197:       // Scan through the remaining arguments    argv=Getopt.get_args(argv); -  cflags+=Array.map(argv[1..],fixpath); +  cflags+=Array.map(Array.map(argv[1..],fixpath), o_to_obj);       foreach(argv[1..], string tmp)    {
220:    case "obj":    if(!output)    output=remove_ext(argv[1])+".o"; -  cflags+=({"-Fo"+fixpath(output)}); +  cflags+=({"-Fo"+fixpath(output+"bj")});    wantfile=output;    break;   
310:       if(wantfile)    { +  if (target == "obj") { +  if(!file_stat(wantfile+"bj")) +  { +  werror("RNTECL: output file not generated (%s).\n", +  wantfile+"bj"); +  exit(1); +  } +  rm(wantfile); +  hardlink(wantfile+"bj", wantfile); +  }    if(!file_stat(wantfile))    {    werror("RNTECL: output file not generated (%s).\n",wantfile);