The unix builds will use a generated build_number (rather than the checked in version) that will forcibly be 000000000 unless MOZILLA_OFFICIAL is set. Bug #26798

Chrome files that need the build date set for MOZILLA_OFFICIAL builds will no longer be modified in the source tree.  The source tree copies will be used as a template for a generated version.  Bug #29597
This commit is contained in:
cls%seawood.org 2000-07-08 09:36:01 +00:00
parent a79763793b
commit 634bdeb719
6 changed files with 40 additions and 30 deletions

View File

@ -40,17 +40,7 @@ endif
TARGETS = $(HOST_PROGRAM) $(PROGRAM) $(PLSRCS:.pl=)
# Generate the build number on the fly.
ifneq ($(origin BUILD_OFFICIAL)_$(origin MOZILLA_OFFICIAL),undefined_undefined)
TARGETS += $(DEPTH)/build/build_number
endif
# Remove this on distclean regardless of "official" setting
DIST_GARBAGE += $(DEPTH)/build/build_number
# If this is an "official mozilla build" make them shortlived.
ifdef MOZILLA_OFFICIAL
export:: $(DEPTH)/modules/libpref/src/init/all.js
endif
TARGETS += build_number nsBuildID.h
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
# a recursive rule for finding nsinstall and the Perl scripts.
@ -79,21 +69,29 @@ NSPR_CFLAGS += -DGETCWD_CANT_MALLOC
endif
export:: $(TARGETS)
$(INSTALL) -m 444 nsBuildID.h $(DIST)/include
ifeq ($(MOZ_OS2_TOOLS),VACPP)
$(INSTALL) -m 444 $(srcdir)/os2/dirent.h $(DIST)/include
$(INSTALL) -m 444 $(srcdir)/os2/getopt.h $(DIST)/include
endif
#update build number from within make script
$(DEPTH)/build/build_number: FORCE
$(RM) $@
# Make sure the build_number is 00000000000 unless MOZILLA_OFFICIAL is set
build_number: FORCE
ifdef MOZILLA_OFFICIAL
$(PERL) $(srcdir)/bdate.pl > $@
$(PERL) $(srcdir)/aboutime.pl $(topsrcdir)/xpfe/browser/resources/locale/en-US/navigator.dtd $@
$(PERL) $(srcdir)/aboutime.pl $(topsrcdir)/xpfe/browser/resources/content/viewSource.xul $@
$(PERL) $(srcdir)/aboutime.pl $(topsrcdir)/xpfe/appshell/public/nsBuildID.h $@
else
@if [ ! -e build_number ]; then \
echo 0000000000 > $@ ; \
else if [ `cat build_number` != "0000000000" ]; then \
echo 0000000000 > $@ ; \
fi \
fi
endif
$(DEPTH)/modules/libpref/src/init/all.js: FORCE
$(PERL) $(srcdir)/set-timebomb.pl 0 30
nsBuildID.h: build_number
$(RM) $@
echo "#define NS_BUILD_ID 0000000000" > $@
$(PERL) $(srcdir)/aboutime.pl $@ build_number
# clear record of installed chrome on complete rebuild
install::

View File

@ -59,7 +59,3 @@ else
$(CC) -o $@ -c $(COMPILE_CFLAGS) -DSTANDALONE_REGISTRY $<
endif
vr_stubs.c: $(DEPTH)/build/build_number
$(DEPTH)/build/build_number:
cd $(DEPTH)/config; $(MAKE) ../build/build_number

View File

@ -511,15 +511,14 @@ int strncasecmp(const char *str1, const char *str2, int length)
#include "NSReg.h"
#include "VerReg.h"
#include "nsBuildID.h"
char *TheRegistry = "registry";
char *Flist;
/* WARNING: build hackery */
#if defined(STANDALONE_REGISTRY) && !defined(XP_MAC)
long BUILDNUM =
#include "../../../build/build_number"
;
long BUILDNUM = NS_BUILD_ID;
#endif

View File

@ -31,7 +31,6 @@ XPIDL_MODULE = appshell
EXPORTS = \
nsIWebShellWindow.h \
nsAppShellCIDs.h \
nsBuildID.h \
nsFileLocations.h \
nsIDOMXPConnectFactory.h \
nsINetSupportDialogService.h \
@ -48,7 +47,7 @@ XPIDLSRCS = \
nsIFileLocator.idl \
nsIWindowMediator.idl \
nsIXULWindow.idl \
nsIUserInfo.idl \
nsIUserInfo.idl \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))

View File

@ -42,12 +42,21 @@ CHROME_CONTENT = \
navigator.js \
navigatorDD.js \
openLocation.xul \
viewSource.xul \
NetSupportConfirmYN.xul \
NetSupportConfirmCheckYN.xul \
pageInfo.xul \
pageInfo.js \
$(NULL)
# viewSource.xul \
include $(topsrcdir)/config/rules.mk
GARBAGE += viewSource.xul.out
viewSource.xul.out: viewSource.xul $(DEPTH)/config/build_number
cp $(srcdir)/viewSource.xul $@
$(PERL) $(topsrcdir)/config/aboutime.pl $@ $(DEPTH)/config/build_number
install:: viewSource.xul.out
cp viewSource.xul.out $(CHROME_DIST)/$(CHROME_CONTENT_DIR)/viewSource.xul

View File

@ -30,13 +30,22 @@ CHROME_DIR=locales/en-US
CHROME_L10N_DIR=navigator/locale
CHROME_L10N = \
navigator.dtd \
openLocation.dtd \
openLocation.properties \
viewSource.dtd \
NetSupportConfirmCheckYN.dtd \
navigator.properties \
$(NULL)
# navigator.dtd \
include $(topsrcdir)/config/rules.mk
GARBAGE += navigator.dtd.out
navigator.dtd.out: navigator.dtd $(DEPTH)/config/build_number
cp $(srcdir)/navigator.dtd $@
$(PERL) $(topsrcdir)/config/aboutime.pl $@ $(DEPTH)/config/build_number
install:: navigator.dtd.out
cp navigator.dtd.out $(CHROME_DIST)/$(CHROME_L10N_DIR)/navigator.dtd