pike.git
/
NT
/
tools
/
rntecl
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/NT/tools/rntecl:1:
#!/usr/local/bin/pike // -*- Pike -*-
-
// $Id: rntecl,v 1.
7
2000/08/20 12:
37
:
56
grubba Exp $
+
// $Id: rntecl,v 1.
8
2000/08/20 12:
49
:
16
grubba Exp $
// RNTECL, a front-end to Intel ECL with options similar to GCC // Written by Fredrik Hubinette & Henrik Grubbström. inherit "lib.pike"; // Verbose is default for now, this can be turned off one this // frontend has been refined to where it does not require more // debugging.
pike.git/NT/tools/rntecl:194:
} } // More options should be recognized, options which are not // recognized should generate warning/error messages. switch(option[1]) { case "all": case "4": cflags+=({"-W4"}); break; // Not supported, but in the manual...
-
//
case "X": cflags+=({"-WX"}); break;
+
case "X": cflags+=({"-WX"}); break;
default: cflags+=({"-W3"}); break; } break; case "define": cflags+=({"-D"+option[1]}); break; case "undefine": cflags+=({"-U"+option[1]}); break; case "output": output=option[1]; break; }
pike.git/NT/tools/rntecl:291:
"-DEBUGTYPE:BOTH", "-DEBUG", }) +ldopts; } } int ret; int first_line=1;
-
int
prototype
_error=0;
+
int
forced
_error=0;
string trailer = ""; // ecl.exe echoes the file name of the file we are compiling // first, we need to get rid of that to make configure behave.
-
// We also convert warning 147 into an error.
+
// We also convert warning 147 into an error
, and command line
+
// remark "option not supported" into an error
.
ret = silent_do_cmd(cmd, lambda(string output) { trailer += output; array(string) lines = trailer/"\n"; if (sizeof(lines) < 2) return; if(first_line) { if (verbose && (target != "-")) { write(lines[0]+"\n");
pike.git/NT/tools/rntecl:317:
lines = lines[1..]; first_line = 0; } trailer = lines[-1]; lines = lines[..sizeof(lines)-2]; for(int i; i < sizeof(lines); i++) { // Warning 147 is prototype mismatch. // for some reason this isn't an error. // We make it an error... if (search(lines[i], "warning #147:") != -1) {
-
prototype
_error = 1;
+
forced
_error = 1;
lines[i] = replace(lines[i], "warning #147:", "error #147:");
-
+
} else {
+
// Make it possible to test if flags are supported.
+
if (search(lines[i],
+
"Command line remark: option '") != -1){
+
if (search(lines[i], "' not supported") != -1) {
+
forced_error = 1;
} }
-
+
}
+
}
write(lines*"\n" + "\n"); }, 1); if (sizeof(trailer)) { // Shouldn't happen, but... write(trailer); }
-
ret = ret ||
prototype
_error;
+
ret = ret ||
forced
_error;
if(ret) { werror("ECL returned error code %d.\n",ret); exit(ret); } if(wantfile) { if (target == "obj") {