diff --git a/mozilla/config/Makefile.in b/mozilla/config/Makefile.in index 0f7c096778c..f8cfe618dc0 100644 --- a/mozilla/config/Makefile.in +++ b/mozilla/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/mozilla/modules/libreg/src/Makefile.in b/mozilla/modules/libreg/src/Makefile.in index a93e03709aa..f132876d36c 100644 --- a/mozilla/modules/libreg/src/Makefile.in +++ b/mozilla/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/mozilla/modules/libreg/src/vr_stubs.c b/mozilla/modules/libreg/src/vr_stubs.c index 439181985fc..d557a817df0 100644 --- a/mozilla/modules/libreg/src/vr_stubs.c +++ b/mozilla/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/mozilla/xpfe/appshell/public/Makefile.in b/mozilla/xpfe/appshell/public/Makefile.in index e22770a0468..6b66a41c925 100644 --- a/mozilla/xpfe/appshell/public/Makefile.in +++ b/mozilla/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/mozilla/xpfe/browser/resources/content/Makefile.in b/mozilla/xpfe/browser/resources/content/Makefile.in index d187779c3b5..aaaee9b8910 100644 --- a/mozilla/xpfe/browser/resources/content/Makefile.in +++ b/mozilla/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/mozilla/xpfe/browser/resources/locale/en-US/Makefile.in b/mozilla/xpfe/browser/resources/locale/en-US/Makefile.in index f8cdd769eaf..d30a83e53ed 100644 --- a/mozilla/xpfe/browser/resources/locale/en-US/Makefile.in +++ b/mozilla/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 +