Fix Solaris build bustage for bug 332535

This commit is contained in:
jag%tty.nl 2006-04-04 08:14:36 +00:00
Родитель 635aa3c4fa
Коммит f0d910ba19
2 изменённых файлов: 15 добавлений и 21 удалений

Просмотреть файл

@ -167,12 +167,7 @@ ifdef MOZ_ENABLE_GTK2
endif
build_number: FORCE
$(PERL) -I$(srcdir) $(srcdir)/bdate.pl build_number.tmp $(_BN_OFFICIAL)
@if ! diff build_number.tmp $@ >&/dev/null; then \
echo Generated new build ID; \
mv -f build_number.tmp $@; \
fi
@rm -f build_number.tmp
$(PERL) -I$(srcdir) $(srcdir)/bdate.pl $@ $(_BN_OFFICIAL)
nsBuildID.h: nsBuildID.h.in build_number $(srcdir)/milestone.txt Makefile
$(RM) $@

Просмотреть файл

@ -87,23 +87,22 @@ sub UpdateBuildNumber($$) {
return;
}
if ($official) {
&write_number($outfile, $build_number);
} else {
if (!$official) {
$build_number = "0000000000";
}
my $old_num = -1;
# Only overwrite file if contents are not already set to 0
if ( -e $outfile ) {
open(OLD, "<$outfile") || die "$outfile: $!\n";
$old_num = <OLD>;
chomp($old_num);
close(OLD);
}
my $old_num = "";
if ($old_num != 0) {
&write_number($outfile, "0000000000");
}
# Only overwrite file if contents are not already set to 0
if ( -e $outfile ) {
open(OLD, "<$outfile") || die "$outfile: $!\n";
$old_num = <OLD>;
chomp($old_num);
close(OLD);
}
if ($old_num ne $build_number) {
&write_number($outfile, $build_number);
}
return;
}