if ( /^--$/ ) {
$Dashdashes_seen++;
- } elsif ( /^-D(.*)/ ) { # recognized wherever they occur
- push(@Defines, $_);
- } elsif ( /^-I/ ) {
- $Include_dirs .= " $_";
+ } elsif ( /^(-optc)?(-D.*)/ ) { # recognized wherever they occur
+ push(@Defines, $2);
+ } elsif ( /^(-optc)?(-I.*)/ ) {
+ $Include_dirs .= " $2";
} elsif ($Dashdashes_seen != 1) { # not between -- ... --
if ( /^-v$/ ) {
# ${CPP} better be 'gcc -E', or the -x option will fail...
# ..and the -MM & -MMD.
- $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname");
+ $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname >/dev/null");
if ($result != 0) {
unlink($tempfile);
exit($result);