Commit f955b9b0 authored by sof's avatar sof
Browse files

[project @ 2003-01-17 16:05:09 by sof]

for mingw builds, redirect to NUL
parent 4bb9980e
...@@ -13,7 +13,7 @@ SCRIPT_OBJS=mkdependC.prl ...@@ -13,7 +13,7 @@ SCRIPT_OBJS=mkdependC.prl
# Prepend (perl) bindings for these Makefile variables # Prepend (perl) bindings for these Makefile variables
# when creating `mkdependC' (a more flexible way of doing msub). # when creating `mkdependC' (a more flexible way of doing msub).
# #
SCRIPT_SUBST_VARS=DEFAULT_TMPDIR CPP SCRIPT_SUBST_VARS=DEFAULT_TMPDIR CPP BUILDPLATFORM
CLEAN_FILES += $(SCRIPT_PROG) CLEAN_FILES += $(SCRIPT_PROG)
INTERP=perl INTERP=perl
......
# #
# This stub of perl assumes that the following two # This perl script template assumes that definitions for
# variables are prepended: # the following variables are prepended:
# #
# DEFAULT_TMPDIR CPP # DEFAULT_TMPDIR CPP BUILDPLATFORM
# #
# ToDo: strip out all the .h junk # ToDo: strip out all the .h junk
# #
...@@ -22,6 +22,12 @@ $Makefile = ''; ...@@ -22,6 +22,12 @@ $Makefile = '';
@Src_files = (); @Src_files = ();
@File_suffix = (); @File_suffix = ();
$baseName=''; $baseName='';
$ignore_output='> /dev/null';
if ( ${BUILDPLATFORM} == "i386-unknown-mingw32" ) {
# Assuming the underlying perl uses cmd to exec system() calls.
$ignore_output = ">nul";
}
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$Tmp_prefix = $ENV{'TMPDIR'} . "/mkdependC$$"; $Tmp_prefix = $ENV{'TMPDIR'} . "/mkdependC$$";
...@@ -166,13 +172,11 @@ sub slurp_file { # follows an example in the `open' item in perl man page ...@@ -166,13 +172,11 @@ sub slurp_file { # follows an example in the `open' item in perl man page
# ${CPP} better be 'gcc -E', or the -x option will fail... # ${CPP} better be 'gcc -E', or the -x option will fail...
# ..and the -MM & -MMD. # ..and the -MM & -MMD.
$result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname > /dev/null"); $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname $ignore_output");
if ($result != 0) { if ($result != 0) {
# On the cheesy side..we do want to know what went wrong, so # On the cheesy side..we do want to know what went wrong, so
# re-run the command. (This also has the beneficial effect # re-run the command.
# of fixing a redirection problem with gcc-2.95 builds used with
# mingw32.)
$result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname "); $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname ");
if ($result != 0) { if ($result != 0) {
unlink($tempfile); unlink($tempfile);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment