This commit is contained in:
scc 1998-05-20 08:12:13 +00:00
Родитель 4b6c333afe
Коммит 260f28267f
3 изменённых файлов: 221 добавлений и 0 удалений

58
build/mac/BuildMozilla.pl Normal file
Просмотреть файл

@ -0,0 +1,58 @@
#!perl
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
use Moz;
chdir("::::"); # assuming this script is in "...:mozilla:build:mac:", change dir to just above "mozilla"
Moz::Configure(":Mozilla.Configuration");
Moz::OpenErrorLog("::Mozilla.BuildLog");
#
# Build the appropriate target of each project
#
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stub Library");
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stub Library");
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Stub Library");
Moz::BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp");
Moz::BuildProject(":mozilla:cmd:macfe:restext:NavStringLibPPC.mcp");
Moz::BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.prj");
Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPCDebug.mcp");
Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPCDebug.mcp");
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "PPC Shared Library");
Moz::BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPCDebug.mcp");
Moz::BuildProject(":mozilla:lib:mac:PowerPlant:PowerPlant.mcp");
Moz::BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:sun-java:stubs:macbuild:JavaStubs.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:js:jsj:macbuild:JSJ_PPCDebug.mcp");
Moz::BuildProject(":mozilla:js:macbuild:JavaScriptPPCDebug.mcp");
Moz::BuildProject(":mozilla:nav-java:stubs:macbuild:NavJavaStubs.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "PPC Shared Library +D -LDAP");
Moz::BuildProject(":mozilla:modules:xml:macbuild:XML.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:modules:libfont:macbuild:FontBroker.mcp", "PPC Library (Debug)");
Moz::BuildProject(":mozilla:modules:schedulr:macbuild:Schedulr.mcp", "PPC Shared Library (Debug)");
Moz::BuildProject(":mozilla:network:macbuild:network.mcp", "PPC Library (Debug Moz)");
Moz::BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "PPC Library (Debug)");
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Moz PPC App (Debug)");

Двоичные данные
build/mac/CodeWarriorLib Normal file

Двоичный файл не отображается.

163
build/mac/Moz.pm Normal file
Просмотреть файл

@ -0,0 +1,163 @@
#!perl
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
package Moz;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw();
@EXPORT_OK = qw(BuildProject,OpenErrorLog,CloseErrorLog,UseCodeWarriorLib,Configure);
use Cwd;
sub current_directory()
{
my $current_directory = cwd();
chop($current_directory) if ( $current_directory =~ m/:$/ );
return $current_directory;
}
sub full_path_to($)
{
my ($path) = @_;
if ( $path =~ m/^[^:]+$/ )
{
$path = ":" . $path;
}
if ( $path =~ m/^:/ )
{
$path = current_directory() . $path;
}
return $path;
}
sub UseCodeWarriorLib($)
{
($CodeWarriorLib) = @_;
$CodeWarriorLib = full_path_to($CodeWarriorLib);
}
sub activate_CodeWarrior()
{
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
END_OF_APPLESCRIPT
}
BEGIN
{
UseCodeWarriorLib(":CodeWarriorLib");
activate_CodeWarrior();
}
sub Configure($)
{
my ($config_file) = @_;
# read in the configuration file
}
$logging = 0;
$recent_errors_file = "";
sub CloseErrorLog()
{
if ( $logging )
{
close(ERROR_LOG);
$logging = 0;
}
}
sub OpenErrorLog($)
{
my ($log_file) = @_;
CloseErrorLog();
if ( $log_file )
{
$log_file = full_path_to($log_file);
open(ERROR_LOG, ">$log_file");
$log_file =~ m/.+:(.+)/;
$recent_errors_file = full_path_to("$1.part");
$logging = 1;
}
}
sub log_message($)
{
if ( $logging )
{
my ($message) = @_;
print ERROR_LOG $message;
}
}
sub log_message_with_time($)
{
if ( $logging )
{
my ($message) = @_;
my $time_stamp = localtime();
log_message("$message ($time_stamp)\n");
}
}
sub log_recent_errors()
{
if ( $logging )
{
open(RECENT_ERRORS, "<$recent_errors_file");
while( <RECENT_ERRORS> )
{
print ERROR_LOG $_;
}
close(RECENT_ERRORS);
unlink("$recent_errors_file");
}
}
sub BuildProject($;$)
{
my ($project_path, $target_name) = @_;
$project_path = full_path_to($project_path);
$project_path =~ m/.+:(.+)/;
my $project_name = $1;
log_message_with_time("### Building \"$project_path\"");
$had_errors =
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file")
END_OF_APPLESCRIPT
# Append any errors to the globally accumulated log file
if ( $had_errors )
{
log_recent_errors();
}
}
1;