print the cpp command line if verbosity is high enough

This commit is contained in:
Bill Currie 2002-07-20 05:20:40 +00:00
parent 3a14891266
commit f1423cb0b3
2 changed files with 12 additions and 4 deletions

View file

@ -222,10 +222,12 @@ preprocess_file (const char *filename)
}
if (!pid) {
// we're a child, check for abuse
//const char **a;
//for (a = cpp_argv; *a; a++)
// printf ("%s ", *a);
//puts("");
if (options.verbosity > 1) {
const char **a;
for (a = cpp_argv; *a; a++)
printf ("%s ", *a);
puts("");
}
execvp (cpp_argv[0], (char **)cpp_argv);
perror (cpp_argv[0]);
exit (1);

View file

@ -100,6 +100,7 @@ static const char *short_options =
"I:" // set includes
"U:" // undefine
"N:" // notice options
"M::"
;
static void
@ -342,6 +343,11 @@ DecodeArgs (int argc, char **argv)
free (opts);
}
break;
case 'M':
add_cpp_def (nva ("-M%s", optarg));
if (strchr ("FQT", optarg[0]))
add_cpp_def (argv[optind++]);
break;
default:
usage (1);
}