From 358bd037daa87c7a13e1ccbaacb096c4f8f6d894 Mon Sep 17 00:00:00 2001 From: Joshua Cranmer Date: Sat, 29 Nov 2014 18:44:10 -0600 Subject: [PATCH] =?UTF-8?q?Bug=201099430,=20part=20=E4=B8=80:=20Define=20M?= =?UTF-8?q?OZILLA=5FDIR=20early=20in=20the=20base=20makefiles,=20r=3Dgland?= =?UTF-8?q?ium.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 7 +++++++ config/rules.mk | 4 ---- config/tests/makefiles/autodeps/testor.tmpl | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/baseconfig.mk b/config/baseconfig.mk index 6fa232aeb64c..d4d8081c5b0a 100644 --- a/config/baseconfig.mk +++ b/config/baseconfig.mk @@ -131,3 +131,10 @@ $(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES) $(_DEPRECATED_VARIABLES),$(eval $( 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 diff --git a/config/rules.mk b/config/rules.mk index a893555a2e68..5f7b66c81293 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -20,10 +20,6 @@ INCLUDED_RULES_MK = 1 # 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 diff --git a/config/tests/makefiles/autodeps/testor.tmpl b/config/tests/makefiles/autodeps/testor.tmpl index d216e6e27863..3134277e6583 100644 --- a/config/tests/makefiles/autodeps/testor.tmpl +++ b/config/tests/makefiles/autodeps/testor.tmpl @@ -43,6 +43,7 @@ MKDIR ?= mkdir -p TOUCH ?= touch INCLUDED_CONFIG_MK = 1 +MOZILLA_DIR := $(topsrcdir) include $(topsrcdir)/config/rules.mk ##-------------------##