зеркало из https://github.com/mozilla/pjs.git
Script changes to support writing MacPerl output to a file. NOT PART OF THE BUILD.
This commit is contained in:
Родитель
16f4fdae81
Коммит
db45255519
|
@ -60,7 +60,8 @@ $CARBON = 0; # turn on to build with TARGET_CARBON
|
|||
$PROFILE = 0;
|
||||
$RUNTIME = 0; # turn on to just build runtime support and NSPR projects
|
||||
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
|
||||
$MOZILLA_OFFICIAL = 1; # generate build number
|
||||
$MOZILLA_OFFICIAL = 0; # generate build number
|
||||
$LOG_TO_FILE = 0; # write perl output to a file
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# configuration variables that affect the manner of building,
|
||||
|
|
|
@ -30,6 +30,7 @@ use Cwd;
|
|||
use Moz;
|
||||
use MozillaBuildList;
|
||||
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# Where have the build options gone?
|
||||
#
|
||||
|
@ -61,6 +62,7 @@ $PROFILE = 0;
|
|||
$RUNTIME = 0; # turn on to just build runtime support and NSPR projects
|
||||
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
|
||||
$MOZILLA_OFFICIAL = 0; # generate build number
|
||||
$LOG_TO_FILE = 0; # write perl output to a file
|
||||
|
||||
#-------------------------------------------------------------
|
||||
# configuration variables that affect the manner of building,
|
||||
|
@ -90,6 +92,8 @@ $USE_TIMESTAMPED_LOGS = 0;
|
|||
# END OF CONFIG SWITCHES
|
||||
#-------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
my($cur_dir) = cwd();
|
||||
$cur_dir =~ s/:mozilla:build:mac:build_scripts$//;
|
||||
chdir($cur_dir);
|
||||
|
|
|
@ -60,6 +60,7 @@ use CodeWarriorLib;
|
|||
DontStopForErrors
|
||||
InstallFromManifest
|
||||
InstallResources
|
||||
RedirectOutputToFile
|
||||
Delay
|
||||
ActivateApplication
|
||||
IsProcessRunning);
|
||||
|
@ -465,6 +466,23 @@ sub LaunchCodeWarrior()
|
|||
chdir($cur_dir);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// RedirectOutputToFile
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
sub RedirectOutputToFile($)
|
||||
{
|
||||
my($log_file) = @_;
|
||||
|
||||
print "Output is now being redirected to the file '$log_file'\n";
|
||||
|
||||
open(STDOUT, "> $log_file") || die "Can't redirect stdout";
|
||||
open(STDERR, ">&STDOUT") || die "Can't dup stdout";
|
||||
select(STDERR); $| = 1; # make unbuffered
|
||||
select(STDOUT); $| = 1; # make unbuffered
|
||||
|
||||
MacPerl::SetFileInfo("CWIE", "TEXT", $log_file);
|
||||
}
|
||||
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
#// ActivateApplication
|
||||
#//--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -265,17 +265,15 @@ sub SetupBuildLog($)
|
|||
my $now = localtime();
|
||||
while ($now =~ s@:@.@) {} # replace all colons by periods
|
||||
my $logdir = ":Build Logs:";
|
||||
if (!stat($logdir))
|
||||
if (! -d $logdir)
|
||||
{
|
||||
print "Creating directory $logdir\n";
|
||||
mkdir $logdir, 0777 || die "Couldn't create directory $logdir";
|
||||
}
|
||||
OpenErrorLog("$logdir$now");
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenErrorLog("NGLayoutBuildLog"); # Release build
|
||||
#OpenErrorLog("Mozilla.BuildLog"); # Tinderbox requires that name
|
||||
OpenErrorLog("Mozilla build log");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,6 +315,5 @@ sub SetTimeBomb($$)
|
|||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
@ -203,11 +203,6 @@ sub ReadPrefsFile($$$$)
|
|||
my($var_setting) = $2;
|
||||
|
||||
print "Setting \$main::$build_var to $var_setting\n";
|
||||
|
||||
if ($var_setting =~ /\d+/) {
|
||||
$var_setting += 0; # convert to numeric
|
||||
}
|
||||
|
||||
eval "\$main::$build_var = $var_setting";
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2034,6 +2034,10 @@ sub RunBuild($$$)
|
|||
}
|
||||
|
||||
SetupBuildParams(\%main::pull, \%main::build, \%main::options, \%main::optiondefines, $build_prefs);
|
||||
|
||||
if ($main::LOG_TO_FILE) {
|
||||
RedirectOutputToFile("Mozilla script log");
|
||||
}
|
||||
|
||||
ConfigureBuildSystem();
|
||||
|
||||
|
@ -2049,6 +2053,7 @@ sub RunBuild($$$)
|
|||
);
|
||||
SetBuildNumber(":mozilla:config:build_number", \@gen_files);
|
||||
|
||||
die;
|
||||
chdir($main::MOZ_SRC);
|
||||
BuildDist();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче