From 9dfad4c34c989b71ad40bb3f58d64cd4d0825f50 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Thu, 25 Mar 2004 22:22:00 +0000 Subject: [PATCH] Various changes to improve release build automation for firefox. In particular, add ExtraFiles which allows firefox to pull browser/config/mozconfig, change the clobber target to distclean, and make the clobber and build targets be run separately. Bug 238698, r=leaf --- tools/tinderbox/build-firefox.pl | 37 +++++++++++++++++++++++++ tools/tinderbox/build-seamonkey-util.pl | 21 ++++++++------ tools/tinderbox/build-seamonkey.pl | 4 +-- 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100755 tools/tinderbox/build-firefox.pl diff --git a/tools/tinderbox/build-firefox.pl b/tools/tinderbox/build-firefox.pl new file mode 100755 index 000000000000..8fe9f6051a9e --- /dev/null +++ b/tools/tinderbox/build-firefox.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +require 5.003; + +# This script has split some functions off into a util +# script so they can be re-used by other scripts. +require "build-seamonkey-util.pl"; + +use strict; + +# "use strict" complains if we do not define these. +# They are not initialized here. The default values are after "__END__". +$TreeSpecific::name = $TreeSpecific::checkout_target = $TreeSpecific::checkout_clobber_target = $::Version = undef; + +$::Version = '$Revision: 1.1 $ '; + +{ + TinderUtils::Setup(); + tree_specific_overides(); + TinderUtils::Build(); +} + +# End of main +#====================================================================== + + + +sub tree_specific_overides { + + $TreeSpecific::name = 'mozilla'; + $TreeSpecific::build_target = 'build_all_depend'; + $TreeSpecific::checkout_target = 'checkout'; + $TreeSpecific::clobber_target = 'distclean'; + $TreeSpecific::extrafiles = 'mozilla/browser/config'; +} + + diff --git a/tools/tinderbox/build-seamonkey-util.pl b/tools/tinderbox/build-seamonkey-util.pl index fba20e553b13..ad4afc9f7b0e 100644 --- a/tools/tinderbox/build-seamonkey-util.pl +++ b/tools/tinderbox/build-seamonkey-util.pl @@ -23,7 +23,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num} use File::Find (); use File::Copy; -$::UtilsVersion = '$Revision: 1.253 $ '; +$::UtilsVersion = '$Revision: 1.254 $ '; package TinderUtils; @@ -895,7 +895,7 @@ sub BuildIt { # more than one cvs tree so set CVSROOT here to avoid confusion. $ENV{CVSROOT} = $Settings::moz_cvsroot; - run_shell_command("$Settings::CVS $cvsco $TreeSpecific::name/$Settings::moz_client_mk"); + run_shell_command("$Settings::CVS $cvsco $TreeSpecific::name/$Settings::moz_client_mk $TreeSpecific::extrafiles"); } # Create toplevel source directory. @@ -964,17 +964,20 @@ sub BuildIt { $make = "$Settings::Make -f $Settings::moz_client_mk fast-update && $Settings::Make -f $Settings::moz_client_mk $Settings::MakeOverrides CONFIGURE_ENV_ARGS='$Settings::ConfigureEnvArgs' build"; } - # Build up target string. - my $targets; - $targets = $TreeSpecific::clobber_target unless $Settings::BuildDepend; - $targets .= " $TreeSpecific::build_target"; - # Make sure we have an ObjDir if we need one. mkdir $Settings::ObjDir, 0777 if ($Settings::ObjDir && ! -e $Settings::ObjDir); - # Run the make command. + # Run the clobber target. + if (!$Settings::BuildDepend && $build_status ne 'busted') { + $status = run_shell_command "$make $TreeSpecific::clobber_target"; + if ($status != 0) { + $build_status = 'busted'; + } + } + + # Run the build target. if ($build_status ne 'busted') { - $status = run_shell_command "$make $targets"; + $status = run_shell_command "$make $TreeSpecific::build_target"; if ($status != 0) { $build_status = 'busted'; } elsif (not BinaryExists($full_binary_name)) { diff --git a/tools/tinderbox/build-seamonkey.pl b/tools/tinderbox/build-seamonkey.pl index 80b79d8fb2e3..eb5998817393 100755 --- a/tools/tinderbox/build-seamonkey.pl +++ b/tools/tinderbox/build-seamonkey.pl @@ -12,7 +12,7 @@ use strict; # They are not initialized here. The default values are after "__END__". $TreeSpecific::name = $TreeSpecific::build_target = $TreeSpecific::checkout_target = $TreeSpecific::clobber_target = $::Version = undef; -$::Version = '$Revision: 1.101 $ '; +$::Version = '$Revision: 1.102 $ '; { TinderUtils::Setup(); @@ -30,7 +30,7 @@ sub tree_specific_overides { $TreeSpecific::name = 'mozilla'; $TreeSpecific::build_target = 'build_all_depend'; $TreeSpecific::checkout_target = 'checkout'; - $TreeSpecific::clobber_target = 'clean'; + $TreeSpecific::clobber_target = 'distclean'; }