diff --git a/b2g/app/Makefile.in b/b2g/app/Makefile.in index 71596aaa3c6..c0bf9ffd89a 100644 --- a/b2g/app/Makefile.in +++ b/b2g/app/Makefile.in @@ -24,11 +24,6 @@ include $(topsrcdir)/config/rules.mk APP_ICON = b2g -source_repo ?= $(call getSourceRepo,$(srcdir)/..) -ifneq (,$(filter http%,$(source_repo))) - DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)' -endif - ifeq ($(OS_ARCH),WINNT) REDIT_PATH = $(LIBXUL_DIST)/bin endif diff --git a/build/Makefile.in b/build/Makefile.in index 417d9f1fe8e..40c3514d2d2 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -33,10 +33,12 @@ ifdef MOZ_SOURCE_STAMP DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)' endif +ifdef MOZILLA_OFFICIAL source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..) ifneq (,$(source_repo)) DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)' endif +endif endif diff --git a/toolkit/components/telemetry/Makefile.in b/toolkit/components/telemetry/Makefile.in index bebc099c6c4..b58fa9a9222 100644 --- a/toolkit/components/telemetry/Makefile.in +++ b/toolkit/components/telemetry/Makefile.in @@ -8,10 +8,12 @@ include $(topsrcdir)/config/makefiles/rcs.mk DEFINES += -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"' +ifdef MOZILLA_OFFICIAL MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null)) ifdef MOZ_HISTOGRAMS_VERSION DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)' endif +endif INSTALL_TARGETS += histoenums histoenums_FILES := TelemetryHistogramEnums.h diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in index ba43f063831..8779e2b7e41 100644 --- a/toolkit/content/Makefile.in +++ b/toolkit/content/Makefile.in @@ -16,12 +16,14 @@ ifdef MOZ_SOURCE_STAMP DEFINES += -DSOURCE_CHANGESET='$(MOZ_SOURCE_STAMP)' endif +ifdef MOZILLA_OFFICIAL source_repo ?= $(call getSourceRepo) ifneq (,$(filter http%,$(source_repo))) DEFINES += -DSOURCE_REPO='$(source_repo)' else ifneq (,$(strip $(source_repo))) DEFINES += -DSOURCE_GIT_COMMIT='$(source_repo)' endif +endif ifndef BUILD_HOSTNAME BUILD_HOSTNAME = $(shell hostname -s || hostname) diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk index 4cb98b45575..1040c217ef9 100644 --- a/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk @@ -145,7 +145,9 @@ MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{ # bug: 746277 - preserve existing functionality. # MOZILLA_DIR="": cd $(SPACE); hg # succeeds if ~/.hg exists ########################################################################### +ifdef MOZILLA_OFFICIAL MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL)) +endif MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 8af082a63cd..3bf80e8284b 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -217,7 +217,7 @@ RPM_CMD = \ --define 'moz_numeric_app_version $(MOZ_NUMERIC_APP_VERSION)' \ --define 'moz_rpm_release $(MOZ_RPM_RELEASE)' \ --define 'buildid $(BUILDID)' \ - --define 'moz_source_repo $(MOZ_SOURCE_REPO)' \ + $(if $(MOZ_SOURCE_REPO),--define 'moz_source_repo $(MOZ_SOURCE_REPO)') \ --define 'moz_source_stamp $(MOZ_SOURCE_STAMP)' \ --define 'moz_branding_directory $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)' \ --define '_topdir $(RPMBUILD_TOPDIR)' \ @@ -757,14 +757,16 @@ GARBAGE += make-package make-sourcestamp-file:: $(NSINSTALL) -D $(DIST)/$(PKG_PATH) @echo '$(BUILDID)' > $(MOZ_SOURCESTAMP_FILE) +ifdef MOZ_SOURCE_REPO @echo '$(MOZ_SOURCE_REPO)/rev/$(MOZ_SOURCE_STAMP)' >> $(MOZ_SOURCESTAMP_FILE) +endif .PHONY: make-buildinfo-file make-buildinfo-file: $(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/informulate.py \ $(MOZ_BUILDINFO_FILE) \ BUILDID=$(BUILDID) \ - MOZ_SOURCE_REPO=$(MOZ_SOURCE_REPO) \ + $(addprefix MOZ_SOURCE_REPO=,MOZ_SOURCE_REPO=$(MOZ_SOURCE_REPO)) \ MOZ_SOURCE_STAMP=$(MOZ_SOURCE_STAMP) \ MOZ_PKG_PLATFORM=$(MOZ_PKG_PLATFORM) diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index 92a9da41f77..b9dfb3a312a 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -24,11 +24,13 @@ ifdef MOZ_SOURCE_STAMP INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP) - source_repo := $(call getSourceRepo) + ifdef MOZILLA_OFFICIAL + source_repo := $(call getSourceRepo) - # extra sanity check for old versions of hg, no showconfig support - ifneq (,$(filter http%,$(source_repo))) - INIARGS += --sourcerepo=$(source_repo) + # extra sanity check for old versions of hg, no showconfig support + ifneq (,$(filter http%,$(source_repo))) + INIARGS += --sourcerepo=$(source_repo) + endif endif endif # MOZ_SOURCE_STAMP