Bug 1099430, part 一: Define MOZILLA_DIR early in the base makefiles, r=glandium.
☠☠ backed out by 86a74bc04076 ☠ ☠
authorJoshua Cranmer <Pidgeot18@gmail.com>
Sat, 29 Nov 2014 18:44:10 -0600
changeset 243945 3313e545f4f693145d1a358bb3de0c4ff5d3b0fe
parent 243944 7d52e46a08e7b867623479bb5924ff431ad371f0
child 243946 358aa39360d5cc1159d9f0a28d38e131e23d286b
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1099430
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1099430, part 一: Define MOZILLA_DIR early in the base makefiles, r=glandium. This change allows us to use use MOZILLA_DIR even for changes in config.mk. The corollary is that comm-central needs to define MOZILLA_DIR before calling into baseconfig.mk, which it already does. The change to the test Makefile is needed since it decides to skip including config.mk, and hence baseconfig.mk, where it would need to grab the MOZILLA_DIR declaration.
config/baseconfig.mk
config/rules.mk
config/tests/makefiles/autodeps/testor.tmpl
--- a/config/baseconfig.mk
+++ b/config/baseconfig.mk
@@ -126,8 +126,15 @@ else
   $(NULL)
 
 # Freeze the values specified by moz.build to catch them if they fail.
 
 $(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES) $(_DEPRECATED_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
 
 TIERS := export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools
 endif
+
+# These defines are used to support the twin-topsrcdir model for comm-central.
+ifdef MOZILLA_SRCDIR
+  MOZILLA_DIR = $(MOZILLA_SRCDIR)
+else
+  MOZILLA_DIR = $(topsrcdir)
+endif
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -15,20 +15,16 @@ ifdef INCLUDED_RULES_MK
 $(error Do not include rules.mk twice!)
 endif
 INCLUDED_RULES_MK = 1
 
 # Make sure that anything that needs to be defined in moz.build wasn't
 # overwritten after including config.mk.
 _eval_for_side_effects := $(CHECK_MOZBUILD_VARIABLES)
 
-ifndef MOZILLA_DIR
-MOZILLA_DIR = $(topsrcdir)
-endif
-
 ifndef INCLUDED_CONFIG_MK
 include $(topsrcdir)/config/config.mk
 endif
 
 ifndef INCLUDED_VERSION_MK
 include $(topsrcdir)/config/version.mk
 endif
 
--- a/config/tests/makefiles/autodeps/testor.tmpl
+++ b/config/tests/makefiles/autodeps/testor.tmpl
@@ -38,16 +38,17 @@ endif
 
 ###########################
 ## Minimal environment load
 ###########################
 MKDIR ?= mkdir -p
 TOUCH ?= touch
 
 INCLUDED_CONFIG_MK = 1
+MOZILLA_DIR := $(topsrcdir)
 include $(topsrcdir)/config/rules.mk
 
 ##-------------------##
 ##---]  TARGETS  [---##
 ##-------------------##
 all::
 
 # Quarks: