2000-02-26 03:37:54 +03:00
|
|
|
#!/usr/bin/perl -w
|
1999-04-28 01:32:19 +04:00
|
|
|
|
2000-07-30 23:54:16 +04:00
|
|
|
require 5.003;
|
2000-03-17 01:34:56 +03:00
|
|
|
|
2000-02-07 05:34:30 +03:00
|
|
|
# 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";
|
|
|
|
|
2000-02-26 00:40:56 +03:00
|
|
|
use strict;
|
2000-03-16 04:43:53 +03:00
|
|
|
|
2000-03-17 01:31:48 +03:00
|
|
|
# "use strict" complains if we do not define these.
|
|
|
|
# They are not initialized here. The default values are after "__END__".
|
2004-02-01 00:31:54 +03:00
|
|
|
$TreeSpecific::name = $TreeSpecific::build_target = $TreeSpecific::checkout_target = $TreeSpecific::clobber_target = $::Version = undef;
|
1999-04-28 01:32:19 +04:00
|
|
|
|
2006-11-03 06:27:31 +03:00
|
|
|
$::Version = '$Revision: 1.104 $ ';
|
2000-03-22 03:43:43 +03:00
|
|
|
|
2001-08-14 10:36:41 +04:00
|
|
|
{
|
2000-03-22 03:18:06 +03:00
|
|
|
TinderUtils::Setup();
|
|
|
|
tree_specific_overides();
|
2006-11-03 06:27:31 +03:00
|
|
|
|
|
|
|
# This code assumes that the build process will alter the mtime of the
|
|
|
|
# "build directory" (i.e. WINNT_5.2_Dep, Darwin_8.1.0_Clbr, etc.) by
|
|
|
|
# dumping a log file or some such in the directory. If that's not the
|
|
|
|
# case, then this "feature" won't work.
|
|
|
|
if (defined($Settings::BuildInterval) && $Settings::BuildInterval > 0) {
|
|
|
|
print STDERR "Build interval of $Settings::BuildInterval seconds requested\n";
|
|
|
|
my $lastBuilt = (stat($Settings::DirName))[9]; ## Magic 9 is st_mtime
|
|
|
|
my $now = time();
|
|
|
|
|
|
|
|
if (($now - $Settings::BuildInterval) < $lastBuilt) {
|
|
|
|
print STDERR 'Last built at ' . scalar(localtime($lastBuilt)) .
|
|
|
|
', ' . ($now - $lastBuilt) . " seconds ago; not building.\n";
|
|
|
|
TinderUtils::stop_tinderbox(reason => 'Build interval not expired');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-03-22 03:18:06 +03:00
|
|
|
TinderUtils::Build();
|
2000-02-26 03:08:03 +03:00
|
|
|
}
|
1999-04-28 01:32:19 +04:00
|
|
|
|
1999-08-21 03:52:18 +04:00
|
|
|
# End of main
|
2000-02-26 00:40:56 +03:00
|
|
|
#======================================================================
|
1999-04-28 01:32:19 +04:00
|
|
|
|
2000-02-26 00:40:56 +03:00
|
|
|
|
1999-04-28 01:32:19 +04:00
|
|
|
|
2000-03-22 03:18:06 +03:00
|
|
|
sub tree_specific_overides {
|
2000-02-29 21:08:12 +03:00
|
|
|
|
2000-03-23 09:05:10 +03:00
|
|
|
$TreeSpecific::name = 'mozilla';
|
2004-02-01 00:31:54 +03:00
|
|
|
$TreeSpecific::build_target = 'build_all_depend';
|
|
|
|
$TreeSpecific::checkout_target = 'checkout';
|
2004-03-26 01:22:00 +03:00
|
|
|
$TreeSpecific::clobber_target = 'distclean';
|
2005-01-04 06:41:19 +03:00
|
|
|
$TreeSpecific::extrafiles = '';
|
2000-03-23 09:05:10 +03:00
|
|
|
|
2000-02-29 21:08:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|