Bug 536136 - Port |Bug 515792 - build system runs identical 'hg identify' command too many times| to comm-central; (Av1) Just copy it.
authorSerge Gautherie <sgautherie.bz@free.fr>
Sun, 03 Jan 2010 12:37:30 +0100
changeset 4615 2303689fabf41c75c449d1bcbcc8b49d5f60d012
parent 4614 d8a60bb40b9b8b2cb65eac6a7f33aa75ca3f3b62
child 4616 44d5b972c5c096d4d968a8235621538a82ab2982
push idunknown
push userunknown
push dateunknown
bugs536136, 515792
Bug 536136 - Port |Bug 515792 - build system runs identical 'hg identify' command too many times| to comm-central; (Av1) Just copy it. r=Callek.
Makefile.in
calendar/sunbird/app/Makefile.in
mail/app/Makefile.in
suite/app/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -70,8 +70,11 @@ ifeq ($(OS_ARCH),WINNT)
   # PDB files don't get moved to dist, so we need to scan the whole objdir
   MAKE_SYM_STORE_PATH=..
 endif
 
 buildsymbols ::
 	$(MAKE) -C mozilla MAKE_SYM_STORE_PATH=$(MAKE_SYM_STORE_PATH) SYM_STORE_SOURCE_DIRS="$(topsrcdir)/mozilla/extensions/inspector $(topsrcdir)/mozilla $(topsrcdir)" $@
 
 include $(topsrcdir)/config/rules.mk
+
+MOZ_SOURCE_STAMP = $(shell hg -R $(srcdir) parent --template="{node|short}\n" 2>/dev/null)
+export MOZ_SOURCE_STAMP
--- a/calendar/sunbird/app/Makefile.in
+++ b/calendar/sunbird/app/Makefile.in
@@ -64,19 +64,19 @@ DEFINES += -DAPP_UA_NAME="$(APP_UA_NAME)
 
 DIST_FILES = application.ini
 
 GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
  
 DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
 
-SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify -i . 2>/dev/null | cut -f1 -d' ')
-ifdef SOURCE_STAMP
-DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
+ifdef MOZ_SOURCE_STAMP
+DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
  
 ifndef LIBXUL_SDK
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -49,19 +49,19 @@ GRE_BUILDID = $(shell $(PYTHON) $(MOZILL
 
 DEFINES += \
   -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \
   -DAB_CD=$(AB_CD) \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
    $(NULL)
 
-SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify -i . 2>/dev/null | cut -f1 -d' ')
-ifdef SOURCE_STAMP
-DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
+ifdef MOZ_SOURCE_STAMP
+DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
 ifneq (,$(BUILD_OFFICIAL)$(MOZILLA_OFFICIAL))
--- a/suite/app/Makefile.in
+++ b/suite/app/Makefile.in
@@ -50,19 +50,19 @@ GRE_BUILDID = $(shell $(PYTHON) $(MOZILL
 DEFINES += \
 	-DSEAMONKEY_ICO=\"../branding/icons/windows/seamonkey.ico\" \
 	-DAB_CD=$(AB_CD) \
 	-DAPP_VERSION="$(MOZ_APP_VERSION)" \
 	-DGRE_MILESTONE=$(GRE_MILESTONE) \
 	-DGRE_BUILDID=$(GRE_BUILDID) \
 	$(NULL)
 
-SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify -i . 2>/dev/null | cut -f1 -d' ')
-ifdef SOURCE_STAMP
-DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
+ifdef MOZ_SOURCE_STAMP
+DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))