Make sure that buildID is set to 0 unless MOZILLA_OFFICIAL is set. Bug #26798 r=leaf r=scc
Note: for mac, MOZILLA_OFFICIAL is only set by default on opt builds until the new mac build scripts land. git-svn-id: svn://10.0.0.236/trunk@81519 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -21,12 +21,21 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
use Cwd;
|
||||
|
||||
# Make sure we add the config dir to search
|
||||
BEGIN
|
||||
{
|
||||
my ($inc_path) = cwd();
|
||||
$inc_path =~ s/:build:mac$/:config:/;
|
||||
push(@INC, $inc_path);
|
||||
}
|
||||
|
||||
#
|
||||
# build script (optimized)
|
||||
#
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
#-----------------------------------------------
|
||||
@@ -37,6 +46,7 @@ $CARBON = 0; # turn on to build with TARGET_CARBON
|
||||
$PROFILE = 0;
|
||||
$GC_LEAK_DETECTOR = 0; # turn on to use GC leak detection
|
||||
$INCLUDE_CLASSIC_SKIN = 1;
|
||||
$MOZILLA_OFFICIAL = 1;
|
||||
|
||||
$pull{all} = 0;
|
||||
$pull{moz} = 0;
|
||||
@@ -198,8 +208,8 @@ Checkout();
|
||||
ConfigureBuildSystem();
|
||||
|
||||
my(@gen_files) = (
|
||||
":mozilla:xpfe:appshell:public:nsBuildID.h",
|
||||
":mozilla:xpfe:browser:resources:locale:en-US:navigator.dtd"
|
||||
":mozilla:config:nsBuildID.h",
|
||||
":mozilla:xpfe:global:build.dtd"
|
||||
);
|
||||
SetBuildNumber(":mozilla:config:build_number", ":mozilla:config:aboutime.pl", \@gen_files);
|
||||
|
||||
|
||||
@@ -21,12 +21,21 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
use Cwd;
|
||||
|
||||
# Make sure we add the config dir to search
|
||||
BEGIN
|
||||
{
|
||||
my ($inc_path) = cwd();
|
||||
$inc_path =~ s/:build:mac$/:config:/;
|
||||
push(@INC, $inc_path);
|
||||
}
|
||||
|
||||
#
|
||||
# build script (debug)
|
||||
#
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
$DEBUG = 1;
|
||||
@@ -194,6 +203,12 @@ Checkout();
|
||||
|
||||
ConfigureBuildSystem();
|
||||
|
||||
my(@gen_files) = (
|
||||
":mozilla:config:nsBuildID.h",
|
||||
":mozilla:xpfe:global:build.dtd"
|
||||
);
|
||||
SetBuildNumber(":mozilla:config:build_number", ":mozilla:config:aboutime.pl", \@gen_files);
|
||||
|
||||
chdir($MOZ_SRC);
|
||||
BuildDist();
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ use Mac::Types;
|
||||
use Mac::Events;
|
||||
use Mac::Processes;
|
||||
use File::Copy;
|
||||
use mozBDate;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(LaunchCodeWarrior BuildProject BuildProjectClean GetFileModDate OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest InstallResources SetBuildNumber SetAgentString SetTimeBomb Delay ActivateApplication);
|
||||
@@ -413,23 +414,13 @@ sub InstallResources($;$;$)
|
||||
sub SetBuildNumber($$$)
|
||||
{
|
||||
my($build_num_file, $build_gen_script, $files_to_touch) = @_;
|
||||
|
||||
open (OUTPUT, ">$build_num_file") || die "could not open buildnumber";
|
||||
|
||||
open (BDATE, "perl :mozilla:config:bdate.pl|");
|
||||
mozBDate::UpdateBuildNumber($build_num_file, $::MOZILLA_OFFICIAL);
|
||||
|
||||
while (<BDATE>) {
|
||||
print OUTPUT $_;
|
||||
}
|
||||
|
||||
close (BDATE);
|
||||
close (OUTPUT);
|
||||
|
||||
my($file);
|
||||
foreach $file (@$files_to_touch)
|
||||
{
|
||||
print "Writing build number to $file\n";
|
||||
system ("perl $build_gen_script $file $build_num_file");
|
||||
print "Writing build number to $file from ${file}.in\n";
|
||||
mozBDate::SubstituteBuildNumber($file,$build_num_file,"${file}.in");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,17 @@
|
||||
#
|
||||
# nglayout pull script
|
||||
#
|
||||
use Cwd;
|
||||
|
||||
# Make sure we add the config dir to search
|
||||
BEGIN
|
||||
{
|
||||
my ($inc_path) = cwd();
|
||||
$inc_path =~ s/:build:mac$/:config:/;
|
||||
push(@INC, $inc_path);
|
||||
}
|
||||
use Mac::Processes;
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
# configuration variables
|
||||
|
||||
@@ -75,24 +75,20 @@ ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(INSTALL) -m 444 $(srcdir)/os2/getopt.h $(DIST)/include
|
||||
endif
|
||||
|
||||
# Make sure the build_number is 00000000000 unless MOZILLA_OFFICIAL is set
|
||||
build_number: FORCE
|
||||
GARBAGE += build_number nsBuildId.h
|
||||
|
||||
ifneq ($(origin BUILD_OFFICIAL)_$(origin MOZILLA_OFFICIAL),undefined_undefined)
|
||||
$(PERL) $(srcdir)/bdate.pl > $@
|
||||
_BN_OFFICIAL=1
|
||||
else
|
||||
@if [ ! -f build_number ]; then \
|
||||
$(RM) -rf $@ ; \
|
||||
echo 0000000000 > $@ ; \
|
||||
else if [ `cat build_number` != "0000000000" ]; then \
|
||||
echo 0000000000 > $@ ; \
|
||||
fi \
|
||||
fi
|
||||
_BN_OFFICIAL=
|
||||
endif
|
||||
|
||||
nsBuildID.h: build_number
|
||||
build_number: FORCE
|
||||
$(PERL) -I$(srcdir) $(srcdir)/bdate.pl $@ $(_BN_OFFICIAL)
|
||||
|
||||
nsBuildID.h: nsBuildID.h.in build_number
|
||||
$(RM) $@
|
||||
echo "#define NS_BUILD_ID 0000000000" > $@
|
||||
$(PERL) $(srcdir)/aboutime.pl $@ build_number
|
||||
$(PERL) -I$(srcdir) $(srcdir)/aboutime.pl $@ build_number $<
|
||||
|
||||
# clear record of installed chrome on complete rebuild
|
||||
#install::
|
||||
|
||||
@@ -1,30 +1,12 @@
|
||||
open INFILE, "<$ARGV[1]";
|
||||
$build = <INFILE>;
|
||||
close INFILE;
|
||||
chop $build;
|
||||
open INFILE, "<$ARGV[0]" || die;
|
||||
open OUTFILE, ">$ARGV[0].old" || die;
|
||||
|
||||
while (<INFILE>) {
|
||||
use strict;
|
||||
use mozBDate;
|
||||
|
||||
$id = $_;
|
||||
if ($id =~ "Build ID:") {
|
||||
$temp = "Build ID: " . $build;
|
||||
$id =~ s/Build ID:\s\d+/$temp/;
|
||||
print OUTFILE $id;
|
||||
}
|
||||
elsif ($id =~ "NS_BUILD_ID") {
|
||||
$temp = "NS_BUILD_ID " . $build;
|
||||
$id =~ s/NS_BUILD_ID\s\d+/$temp/;
|
||||
print OUTFILE $id;
|
||||
}
|
||||
else {
|
||||
print OUTFILE $_;
|
||||
}
|
||||
}
|
||||
my $outfile = $ARGV[0];
|
||||
my $build_num_file = $ARGV[1];
|
||||
my $infile = "";
|
||||
|
||||
close INFILE;
|
||||
close OUTFILE;
|
||||
$infile = $ARGV[2] if ("$ARGV[2]" ne "");
|
||||
|
||||
&mozBDate::SubstituteBuildNumber($outfile, $build_num_file, $infile);
|
||||
|
||||
unlink $ARGV[0];
|
||||
rename "$ARGV[0].old", "$ARGV[0]";
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
# XP way of doing the build date.
|
||||
# 1998091509 = 1998, September, 15th, 9am local time zone
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
|
||||
# localtime returns year minus 1900
|
||||
$year = $year + 1900;
|
||||
printf("%04d%02d%02d%02d\n", $year, 1+$mon, $mday, $hour);
|
||||
use mozBDate;
|
||||
|
||||
# Both "generate" args are optional
|
||||
$file = $ARGV[0] if ("$ARGV[0]" ne "");
|
||||
$official = 1 if ("$ARGV[1]" ne "");
|
||||
&mozBDate::UpdateBuildNumber($file, $official);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ INSTALL_FILE_LIST=$(MOZ_TOOLS)\bin\fullsoft.dll $(MOZ_TOOLS)\bin\talkback.cnt $(
|
||||
INSTALL_DIR=$(DIST)\bin
|
||||
!endif
|
||||
|
||||
GARBAGE = *.obj *.sbr *.pdb
|
||||
GARBAGE = *.obj *.sbr *.pdb build_number nsBuildID.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
@@ -58,17 +58,20 @@ GARBAGE = *.obj *.sbr *.pdb
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
# update build number from within make script
|
||||
build_number::
|
||||
!ifdef MOZILLA_OFFICIAL
|
||||
echo Generating build number...
|
||||
$(RM) $@
|
||||
$(PERL) bdate.pl > $@
|
||||
echo Setting build number...
|
||||
$(PERL) aboutime.pl $(DEPTH)/xpfe/browser/resources/locale/en-US/navigator.dtd $@
|
||||
$(PERL) aboutime.pl $(DEPTH)/xpfe/appshell/public/nsBuildID.h $@
|
||||
_BN_OFFICIAL=1
|
||||
!else
|
||||
_BN_OFFICIAL=
|
||||
!endif
|
||||
|
||||
# update build number from within make script
|
||||
build_number:
|
||||
$(PERL) -I. bdate.pl $@ $(_BN_OFFICIAL)
|
||||
|
||||
nsBuildID.h: build_number nsBuildID.h.in
|
||||
$(RM) $@
|
||||
$(PERL) -I. aboutime.pl $@ build_number nsBuildID.h.in
|
||||
|
||||
#// Rule to set the timebomb on official mozilla builds
|
||||
|
||||
|
||||
@@ -94,7 +97,7 @@ bin2rc.exe:: bin2rc.c
|
||||
makedep.exe:: makedep.cpp
|
||||
$(CC) -MT /O2 /GB $**
|
||||
|
||||
export:: makecopy.exe mangle.exe mantomak.exe bin2rc.exe makedep.exe build_number
|
||||
export:: makecopy.exe mangle.exe mantomak.exe bin2rc.exe makedep.exe build_number nsBuildID.h
|
||||
$(MAKE_INSTALL) nsBuildID.h $(PUBLIC)
|
||||
|
||||
!ifdef MOZ_FULLCIRCLE
|
||||
|
||||
@@ -605,7 +605,7 @@ REGCHROME = @perl $(DEPTH)\config\add-chrome.pl $(DIST)\bin\chrome\installed-chr
|
||||
|
||||
!if exist($(JAR_MANIFEST))
|
||||
|
||||
chrome::
|
||||
chrome:: $(CHROME_DEPS)
|
||||
$(PERL) $(DEPTH)\config\make-jars.pl $(_JAR_FLAT_FILES_ONLY) -d $(DIST)\bin\chrome < $(JAR_MANIFEST)
|
||||
|
||||
!endif
|
||||
|
||||
@@ -1142,7 +1142,7 @@ _JAR_FLAT_FILES_ONLY=
|
||||
_JAR_REGCHROME_JAR=0
|
||||
endif
|
||||
|
||||
chrome::
|
||||
chrome:: $(CHROME_DEPS)
|
||||
@if test -f $(JAR_MANIFEST); then $(PERL) $(topsrcdir)/../mozilla/config/make-jars.pl $(_JAR_FLAT_FILES_ONLY) -d $(DIST)/bin/chrome -s $(srcdir) < $(JAR_MANIFEST); fi
|
||||
|
||||
install:: chrome
|
||||
|
||||
@@ -40,7 +40,6 @@ XPIDLSRCS = \
|
||||
EXPORTS = \
|
||||
nsIWebShellWindow.h \
|
||||
nsAppShellCIDs.h \
|
||||
nsBuildID.h \
|
||||
nsIDOMXPConnectFactory.h \
|
||||
nsFileLocations.h \
|
||||
nsINetSupportDialogService.h \
|
||||
|
||||
@@ -33,6 +33,8 @@ Contributor(s): ______________________________________. -->
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % buildDTD SYSTEM "chrome://global/content/build.dtd" >
|
||||
%buildDTD;
|
||||
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
|
||||
%navigatorDTD;
|
||||
]>
|
||||
|
||||
@@ -28,14 +28,5 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = unix
|
||||
|
||||
GARBAGE += navigator.dtd.out
|
||||
|
||||
navigator.dtd.out: navigator.dtd $(DEPTH)/config/build_number Makefile Makefile.in
|
||||
cp $(srcdir)/navigator.dtd $@
|
||||
$(PERL) $(topsrcdir)/config/aboutime.pl $@ $(DEPTH)/config/build_number
|
||||
|
||||
chrome:: navigator.dtd.out unix-jar.mn
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
JAR_MANIFEST = $(srcdir)/unix-jar.mn
|
||||
|
||||
@@ -309,7 +309,6 @@
|
||||
|
||||
<!-- Statusbar -->
|
||||
<!ENTITY statusText.label "Document: Done">
|
||||
<!ENTITY buildId.label "Build ID: 2000091312">
|
||||
|
||||
<!-- Context Menu -->
|
||||
<!ENTITY blockImageCmd.label "Block Image from Loading">
|
||||
|
||||
@@ -28,8 +28,17 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = resources
|
||||
|
||||
CHROME_DEPS = build.dtd
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
GARBAGE += build.dtd
|
||||
|
||||
build.dtd: build.dtd.in $(DEPTH)/config/build_number
|
||||
@$(RM) -f $@
|
||||
$(PERL) -I$(topsrcdir)/config $(topsrcdir)/config/aboutime.pl $@ $(DEPTH)/config/build_number $<
|
||||
|
||||
chrome::
|
||||
@$(REGCHROME) content global toolkit.jar
|
||||
@$(REGCHROME) locale en-US/global en-US.jar
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ toolkit.jar:
|
||||
content/global/xul.css (resources/content/xul.css)
|
||||
content/global/toolbarBindings.xml (resources/content/toolbarBindings.xml)
|
||||
content/global/stringbundleBindings.xml (resources/content/stringbundleBindings.xml)
|
||||
content/global/build.dtd (build.dtd)
|
||||
|
||||
en-US.jar:
|
||||
locale/en-US/global/contents.rdf (resources/locale/en-US/contents.rdf)
|
||||
|
||||
@@ -23,8 +23,16 @@ DEPTH=..\..
|
||||
|
||||
DIRS= resources
|
||||
|
||||
CHROME_DEPS = build.dtd
|
||||
GARBAGE = build.dtd
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
chrome::
|
||||
$(REGCHROME) content global toolkit.jar
|
||||
$(REGCHROME) locale en-US/global en-US.jar
|
||||
|
||||
build.dtd: build.dtd.in $(DEPTH)\config\build_number
|
||||
@rm -f $@
|
||||
$(PERL) -I$(DEPTH)\config $(DEPTH)\config\aboutime.pl $@ $(DEPTH)\config\build_number build.dtd.in
|
||||
|
||||
|
||||
Reference in New Issue
Block a user