From 634bdeb7190d46af9f3147dc3bcac5819c4f22ce Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Sat, 8 Jul 2000 09:36:01 +0000 Subject: [PATCH] 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 --- config/Makefile.in | 36 +++++++++---------- modules/libreg/src/Makefile.in | 4 --- modules/libreg/src/vr_stubs.c | 5 ++- xpfe/appshell/public/Makefile.in | 3 +- xpfe/browser/resources/content/Makefile.in | 11 +++++- .../resources/locale/en-US/Makefile.in | 11 +++++- 6 files changed, 40 insertions(+), 30 deletions(-) diff --git a/config/Makefile.in b/config/Makefile.in index 0f7c096778c3..f8cfe618dc01 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -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:: diff --git a/modules/libreg/src/Makefile.in b/modules/libreg/src/Makefile.in index a93e03709aaf..f132876d36cc 100644 --- a/modules/libreg/src/Makefile.in +++ b/modules/libreg/src/Makefile.in @@ -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 diff --git a/modules/libreg/src/vr_stubs.c b/modules/libreg/src/vr_stubs.c index 439181985fc4..d557a817df02 100644 --- a/modules/libreg/src/vr_stubs.c +++ b/modules/libreg/src/vr_stubs.c @@ -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 diff --git a/xpfe/appshell/public/Makefile.in b/xpfe/appshell/public/Makefile.in index e22770a04681..6b66a41c9258 100644 --- a/xpfe/appshell/public/Makefile.in +++ b/xpfe/appshell/public/Makefile.in @@ -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)) diff --git a/xpfe/browser/resources/content/Makefile.in b/xpfe/browser/resources/content/Makefile.in index d187779c3b58..aaaee9b8910f 100644 --- a/xpfe/browser/resources/content/Makefile.in +++ b/xpfe/browser/resources/content/Makefile.in @@ -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 + diff --git a/xpfe/browser/resources/locale/en-US/Makefile.in b/xpfe/browser/resources/locale/en-US/Makefile.in index f8cdd769eaf8..d30a83e53edd 100644 --- a/xpfe/browser/resources/locale/en-US/Makefile.in +++ b/xpfe/browser/resources/locale/en-US/Makefile.in @@ -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 +