зеркало из https://github.com/mozilla/gecko-dev.git
Bug 515792 - use hg parent, as few times as possible, rather than lots of hg identify, r=ted.mielczarek
This commit is contained in:
Родитель
72c94be379
Коммит
569fe7220a
|
@ -202,6 +202,9 @@ else
|
|||
BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
|
||||
endif
|
||||
|
||||
MOZ_SOURCE_STAMP = $(shell hg -R $(srcdir) parent --template="{node|short}\n" 2>/dev/null)
|
||||
export MOZ_SOURCE_STAMP
|
||||
|
||||
#XXX: this is a hack, since we don't want to clobber for MSVC
|
||||
# PGO support, but we can't do this test in client.mk
|
||||
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
|
||||
|
|
|
@ -69,9 +69,9 @@ GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBX
|
|||
|
||||
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
|
||||
|
||||
SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify . 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:/")
|
||||
|
|
|
@ -58,9 +58,9 @@ DEFINES += \
|
|||
-DCPPFLAGS="$(CPPFLAGS)" \
|
||||
$(NULL)
|
||||
|
||||
CHANGESET := $(shell cd $(topsrcdir) && hg identify . 2>/dev/null | cut -f1 -d' ')
|
||||
ifdef CHANGESET
|
||||
DEFINES += -DSOURCE_CHANGESET="$(CHANGESET)"
|
||||
MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
DEFINES += -DSOURCE_CHANGESET="$(MOZ_SOURCE_STAMP)"
|
||||
endif
|
||||
|
||||
# strip a trailing slash from the repo URL because it's not always present,
|
||||
|
|
|
@ -221,15 +221,15 @@ DEFINES += -DHAVE_USR_LIB64_DIR
|
|||
endif
|
||||
endif
|
||||
|
||||
SOURCE_STAMP := $(shell cd $(topsrcdir) && hg identify . 2>/dev/null | cut -f1 -d' ')
|
||||
MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
|
||||
# strip a trailing slash from the repo URL because it's not always present,
|
||||
# and we want to construct a working URL in buildconfig.html
|
||||
# make+shell+sed = awful
|
||||
_dollar=$$
|
||||
SOURCE_REPO := $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
|
||||
|
||||
ifdef SOURCE_STAMP
|
||||
INIARGS = --sourcestamp=$(SOURCE_STAMP)
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
|
||||
# extra sanity check for old versions of hg
|
||||
# that don't support showconfig
|
||||
ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
|
||||
|
|
Загрузка…
Ссылка в новой задаче