mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +00:00
kill -t for --traditional, add --advanced, default to --traditional for
progs.src mode and --advanced otherwise
This commit is contained in:
parent
651fa8ca12
commit
9027648721
3 changed files with 32 additions and 9 deletions
|
@ -42,6 +42,14 @@ understand.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
\fBqfcc\fP takes the following arguments:
|
\fBqfcc\fP takes the following arguments:
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-traditional
|
||||||
|
Use traditional QuakeC syntax, semantics and "bugs". Also implies v6only. This
|
||||||
|
is the default when using progs.src.
|
||||||
|
.TP
|
||||||
|
.B \-\-advanced
|
||||||
|
Use advanced Raumoko features. This is the default when using separate
|
||||||
|
compilation.
|
||||||
|
.TP
|
||||||
.B \-C, \-\-code OPTION,...
|
.B \-C, \-\-code OPTION,...
|
||||||
Set code generation options. See \fBCODE GENERATION OPTIONS\fP for details.
|
Set code generation options. See \fBCODE GENERATION OPTIONS\fP for details.
|
||||||
.TP
|
.TP
|
||||||
|
@ -101,9 +109,6 @@ Do not delete temporary files.
|
||||||
.B \-s, \-\-source DIR
|
.B \-s, \-\-source DIR
|
||||||
look for progs.src in DIR instead of the current directory.
|
look for progs.src in DIR instead of the current directory.
|
||||||
.TP
|
.TP
|
||||||
.B \-t, \-\-traditional
|
|
||||||
Use traditional QuakeC syntax, semantics and "bugs". Also implies v6only.
|
|
||||||
.TP
|
|
||||||
.B \-U, \-\-undefine SYMBOL,...
|
.B \-U, \-\-undefine SYMBOL,...
|
||||||
Undefine preprocessor symbols, if the preprocessor is in use.
|
Undefine preprocessor symbols, if the preprocessor is in use.
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -64,6 +64,7 @@ typedef struct {
|
||||||
qboolean save_temps; // save temporary files
|
qboolean save_temps; // save temporary files
|
||||||
qboolean files_dat; // generate files.dat
|
qboolean files_dat; // generate files.dat
|
||||||
qboolean traditional; // behave more like qcc
|
qboolean traditional; // behave more like qcc
|
||||||
|
qboolean advanced; // behold the power of Raumoko
|
||||||
qboolean compile; // serparate compilation mode
|
qboolean compile; // serparate compilation mode
|
||||||
qboolean partial_link; // partial linking
|
qboolean partial_link; // partial linking
|
||||||
qboolean preprocess_only;// only run cpp, don't ocmpile
|
qboolean preprocess_only;// only run cpp, don't ocmpile
|
||||||
|
|
|
@ -70,7 +70,8 @@ static struct option const long_options[] = {
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
{"version", no_argument, 0, 'V'},
|
{"version", no_argument, 0, 'V'},
|
||||||
{"files", no_argument, 0, 'F'},
|
{"files", no_argument, 0, 'F'},
|
||||||
{"traditional", no_argument, 0, 't'},
|
{"traditional", no_argument, 0, 257},
|
||||||
|
{"advanced", no_argument, 0, 258},
|
||||||
{"strip-path", required_argument, 0, 'p'},
|
{"strip-path", required_argument, 0, 'p'},
|
||||||
{"define", required_argument, 0, 'D'},
|
{"define", required_argument, 0, 'D'},
|
||||||
{"include", required_argument, 0, 'I'},
|
{"include", required_argument, 0, 'I'},
|
||||||
|
@ -89,7 +90,6 @@ static const char *short_options =
|
||||||
"r" // partial linking
|
"r" // partial linking
|
||||||
"s:" // source dir
|
"s:" // source dir
|
||||||
"P:" // progs.src name
|
"P:" // progs.src name
|
||||||
"t" // traditional
|
|
||||||
"F" // generate files.dat
|
"F" // generate files.dat
|
||||||
"q" // quiet
|
"q" // quiet
|
||||||
"v" // verbose
|
"v" // verbose
|
||||||
|
@ -115,6 +115,10 @@ usage (int status)
|
||||||
printf ("Usage: %s [options] [files]\n", this_program);
|
printf ("Usage: %s [options] [files]\n", this_program);
|
||||||
printf (
|
printf (
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
|
" --traditional Traditional QuakeC mode: implies v6only\n"
|
||||||
|
" default when using progs.src\n"
|
||||||
|
" --advanced Advanced Ruamoko mode\n"
|
||||||
|
" default for separate compilation mode\n"
|
||||||
" -s, --source DIR Look for progs.src in DIR instead of \".\"\n"
|
" -s, --source DIR Look for progs.src in DIR instead of \".\"\n"
|
||||||
" -q, --quiet Inhibit usual output\n"
|
" -q, --quiet Inhibit usual output\n"
|
||||||
" -v, --verbose Display more output than usual\n"
|
" -v, --verbose Display more output than usual\n"
|
||||||
|
@ -122,7 +126,6 @@ usage (int status)
|
||||||
" -o, --output-file FILE Specify output file name\n"
|
" -o, --output-file FILE Specify output file name\n"
|
||||||
" -P, --progs-src FILE File to use instead of progs.src\n"
|
" -P, --progs-src FILE File to use instead of progs.src\n"
|
||||||
" -F, --files Generate files.dat\n"
|
" -F, --files Generate files.dat\n"
|
||||||
" -t, --traditional Traditional QuakeC mode: implies v6only\n"
|
|
||||||
" -p, --strip-path NUM Strip NUM leading path elements from file\n"
|
" -p, --strip-path NUM Strip NUM leading path elements from file\n"
|
||||||
" names\n"
|
" names\n"
|
||||||
" -C, --code OPTION,... Set code generation options\n"
|
" -C, --code OPTION,... Set code generation options\n"
|
||||||
|
@ -165,8 +168,6 @@ DecodeArgs (int argc, char **argv)
|
||||||
|
|
||||||
add_cpp_def ("-D__QFCC__=1");
|
add_cpp_def ("-D__QFCC__=1");
|
||||||
add_cpp_def ("-D__QUAKEC__=1");
|
add_cpp_def ("-D__QUAKEC__=1");
|
||||||
add_cpp_def ("-D__RUAMOKO__=1");
|
|
||||||
add_cpp_def ("-D__RAUMOKO__=1");
|
|
||||||
|
|
||||||
options.code.progsversion = PROG_VERSION;
|
options.code.progsversion = PROG_VERSION;
|
||||||
options.warnings.uninited_variable = true;
|
options.warnings.uninited_variable = true;
|
||||||
|
@ -227,10 +228,16 @@ DecodeArgs (int argc, char **argv)
|
||||||
case 'g': // debug
|
case 'g': // debug
|
||||||
options.code.debug = true;
|
options.code.debug = true;
|
||||||
break;
|
break;
|
||||||
case 't': // traditional
|
case 257: // traditional
|
||||||
options.traditional = true;
|
options.traditional = true;
|
||||||
|
options.advanced = false;
|
||||||
options.code.progsversion = PROG_ID_VERSION;
|
options.code.progsversion = PROG_ID_VERSION;
|
||||||
break;
|
break;
|
||||||
|
case 258: // advanced
|
||||||
|
options.traditional = false;
|
||||||
|
options.advanced = true;
|
||||||
|
options.code.progsversion = PROG_VERSION;
|
||||||
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
options.compile = true;
|
options.compile = true;
|
||||||
break;
|
break;
|
||||||
|
@ -386,6 +393,16 @@ DecodeArgs (int argc, char **argv)
|
||||||
usage (1);
|
usage (1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!source_files && !options.advanced) {
|
||||||
|
// progs.src mode without --advanced implies --traditional
|
||||||
|
options.traditional = true;
|
||||||
|
options.advanced = false;
|
||||||
|
options.code.progsversion = PROG_ID_VERSION;
|
||||||
|
}
|
||||||
|
if (!options.traditional) {
|
||||||
|
add_cpp_def ("-D__RUAMOKO__=1");
|
||||||
|
add_cpp_def ("-D__RAUMOKO__=1");
|
||||||
|
}
|
||||||
if (options.code.progsversion == PROG_ID_VERSION)
|
if (options.code.progsversion == PROG_ID_VERSION)
|
||||||
add_cpp_def ("-D__VERSION6__=1");
|
add_cpp_def ("-D__VERSION6__=1");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue