mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
disable debug putout and allow the cpp command line to be specified.
This commit is contained in:
parent
f2a8f8ff28
commit
cb0db8b8d1
2 changed files with 10 additions and 10 deletions
|
@ -573,7 +573,6 @@ int CopyString (const char *str);
|
|||
int ReuseString (const char *str);
|
||||
|
||||
typedef struct {
|
||||
qboolean cpp; // use the C pre-processor
|
||||
qboolean cow; // Turn constants into variables if written to
|
||||
qboolean debug; // Generate debug info for the engine
|
||||
int progsversion; // Progs version to generate code for
|
||||
|
|
|
@ -84,6 +84,7 @@ static struct option const long_options[] = {
|
|||
{"define", required_argument, 0, 'D'},
|
||||
{"include", required_argument, 0, 'I'},
|
||||
{"undefine", required_argument, 0, 'U'},
|
||||
{"cpp", required_argument, 0, 256},
|
||||
#endif
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
@ -786,9 +787,9 @@ build_cpp_args (const char *in_name, const char *out_name)
|
|||
}
|
||||
}
|
||||
*arg = 0;
|
||||
for (arg = cpp_argv; *arg; arg++)
|
||||
printf ("%s ", *arg);
|
||||
puts ("");
|
||||
//for (arg = cpp_argv; *arg; arg++)
|
||||
// printf ("%s ", *arg);
|
||||
//puts ("");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -804,7 +805,6 @@ DecodeArgs (int argc, char **argv)
|
|||
add_cpp_def ("-D__RAUMOKO__=1");
|
||||
#endif
|
||||
|
||||
options.code.cpp = true;
|
||||
options.code.progsversion = PROG_VERSION;
|
||||
options.warnings.uninited_variable = true;
|
||||
|
||||
|
@ -866,10 +866,8 @@ DecodeArgs (int argc, char **argv)
|
|||
options.code.cow = true;
|
||||
} else if (!(strcasecmp (temp, "no-cow"))) {
|
||||
options.code.cow = false;
|
||||
} else if (!(strcasecmp (temp, "cpp"))) {
|
||||
options.code.cpp = true;
|
||||
} else if (!(strcasecmp (temp, "no-cpp"))) {
|
||||
options.code.cpp = false;
|
||||
cpp_name = 0;
|
||||
} else if (!(strcasecmp (temp, "debug"))) {
|
||||
options.code.debug = true;
|
||||
} else if (!(strcasecmp (temp, "no-debug"))) {
|
||||
|
@ -935,6 +933,9 @@ DecodeArgs (int argc, char **argv)
|
|||
}
|
||||
break;
|
||||
#ifdef USE_CPP
|
||||
case 256: // --cpp=
|
||||
cpp_name = strdup (optarg);
|
||||
break;
|
||||
case 'S': // save temps
|
||||
options.save_temps = true;
|
||||
break;
|
||||
|
@ -1081,7 +1082,7 @@ main (int argc, char **argv)
|
|||
printf ("compiling %s\n", filename);
|
||||
|
||||
#ifdef USE_CPP
|
||||
if (options.code.cpp) {
|
||||
if (cpp_name) {
|
||||
if (options.save_temps) {
|
||||
char *basename = strdup (filename);
|
||||
char *temp;
|
||||
|
@ -1183,7 +1184,7 @@ main (int argc, char **argv)
|
|||
error = yyparse () || pr_error_count;
|
||||
fclose (yyin);
|
||||
#ifdef USE_CPP
|
||||
if (options.code.cpp && (!options.save_temps)) {
|
||||
if (cpp_name && (!options.save_temps)) {
|
||||
if (unlink (tempname)) {
|
||||
perror ("unlink");
|
||||
exit (1);
|
||||
|
|
Loading…
Reference in a new issue