pike.git / NT / tools / rntcc

version» Context lines:

pike.git/NT/tools/rntcc:66:    werror("Don't know how to compile %s\n",sources[0]);    exit(1);    }       if(verbose)    return do_cmd(cmd);    else    return silent_do_cmd(cmd);   }    - string check_errorfile(string errorfile) + void check_errorfile(string errorfile)   {    object f=Stdio.File(); -  if(f->open(errorfile,"r")) -  { +  if(!f->open(errorfile,"r")) return; +     string data;    werror(data=f->read());    f->close();    data=replace(data,"\r","");    rm(errorfile);    foreach(data/"\n", string line)    {    if(!strlen(line)) continue;    if(search(line,"Warning")!=-1) continue;    werror("Error in compilation detected. "+line+"\n");    exit(1);    }   } - } +       int main(int argc, string *argv)   {    string target;    string operation="link";    string *cflags=({"-d__WIN32__","-d_WIN32"});    string *ldopts=({"OPTION","STACK=8m"});    string *libraries=({});    string *objects=({});    string *sources=({});
pike.git/NT/tools/rntcc:137:       case "share":    share=1;    ldopts=({"SYSTEM","nt_dll","initinstance","terminstance"})+ldopts;    cflags+=({"-bd"});    break;       case "oper_pre": operation="preprocess"; break;    case "oper_comp": operation="compile"; break;    case "debug": -  cflags+=({"-d2"}); -  ldopts+=({"DEBUG","WATCOM","ALL"}); + // cflags+=({"-d2i","-hw"}); + // ldopts+=({"DEBUG","WATCOM","ALL"});    - // cflags+=({"-d2","-hd"}); - // ldopts+=({"DEBUG","DWARF"}); +  cflags+=({"-d2","-hd"}); +  ldopts+=({"DEBUG","DWARF"});      // cflags+=({"-d2","-hc"});   // ldopts+=({"DEBUG","CODEVIEW","OPTION","CVPACK"});    debug=1;    break;       case "optimize":    if(!option[1]) option[1]=1;    switch(optimize=(int)option[1])    {
pike.git/NT/tools/rntcc:245:    objects+=({tmp});    break;       default:    sources+=({tmp});    }    }       if(output) rm(output);    -  string errorfile="tmp"+getpid()+".err"; +  string errorfile="TMP"+getpid()+".ERR";    rm(errorfile);    tmpfiles+=({errorfile});       // Flags required to make the compiler behave well    cflags+=({"-bm","-zq","-sg","-5","-fpi87","-fp3"});       switch(operation)    {    default:    werror("Unknown operation "+operation+".\n");
pike.git/NT/tools/rntcc:343:       if(operation == "link" && !share)    {    rm(output);    Stdio.write_file(output,    "#!/usr/local/bin/pike\n"    "inherit \""+find_lib_location()+"\";\n"    "int main(int argc, string *argv) {\n"    "argv[0]+=\".exe\";\n"    "argv[0]=getenv(\"NTDRIVE\")+fixpath(combine_path(getcwd(),argv[0]));\n" -  " exit(silent_do_cmd(argv));\n" +  " int ret=silent_do_cmd(argv);\n" +  " exit(ret);\n"    "}\n");    chmod(output,0755);    }    exit(0);   }