Bug 1257468 - Move setting MOZ_BUILD_APP subst and define to moz.configure. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 18 Mar 2016 18:24:54 +0900
changeset 289746 528c71c035b456b71078af45de8c3c7b1ffbf6d1
parent 289745 8823b620ef0f9b5a549844861e332b6943df5f62
child 289747 71ed98e78d3736e0ad3766d0bd0d0c479c9576ef
push id18304
push usercbook@mozilla.com
push dateTue, 22 Mar 2016 11:33:07 +0000
treeherderfx-team@f18cffdb2277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1257468
milestone48.0a1
Bug 1257468 - Move setting MOZ_BUILD_APP subst and define to moz.configure. r=nalexander This has the side effect of making the variable available in js/src, which it was not in the past.
Makefile.in
build/moz.configure/init.configure
old-configure.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,17 +12,17 @@ ifneq ($(make_min_ver),$(firstword $(sor
 endif
 
 export TOPLEVEL_BUILD := 1
 
 default::
 
 ifndef TEST_MOZBUILD
 ifdef MOZ_BUILD_APP
-include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
+include $(wildcard $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk)
 endif
 endif
 
 include $(topsrcdir)/config/config.mk
 
 GARBAGE_DIRS += _javagen _profile staticlib
 DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
    config/autoconf.mk \
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -575,16 +575,18 @@ def include_project_configure(project, e
     if not os.path.exists(path):
         error('Cannot find project %s' % project[0])
     return path
 
 @depends(include_project_configure, check_build_environment, '--help')
 def build_project(include_project_configure, build_env, help):
     ret = os.path.dirname(os.path.relpath(include_project_configure,
                                           build_env['TOPSRCDIR']))
+    set_config('MOZ_BUILD_APP', ret)
+    set_define('MOZ_BUILD_APP', ret)
     add_old_configure_assignment('MOZ_BUILD_APP', ret)
     return ret
 
 
 # set RELEASE_BUILD and NIGHTLY_BUILD variables depending on the cycle we're in
 # The logic works like this:
 # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
 # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
--- a/old-configure.in
+++ b/old-configure.in
@@ -3092,26 +3092,23 @@ fi
 
 # Propagate feature switches for code written in rust from confvars.sh
 if test -n "$MOZ_RUST"; then
     if test -n "$MOZ_RUST_MP4PARSE"; then
         AC_DEFINE(MOZ_RUST_MP4PARSE)
     fi
 fi
 
-AC_SUBST(MOZ_BUILD_APP)
 AC_SUBST(MOZ_PHOENIX)
 AC_SUBST(MOZ_XULRUNNER)
 AC_SUBST(MOZ_B2G)
 AC_SUBST(MOZ_MULET)
 AC_SUBST(MOZ_B2G_VERSION)
 AC_SUBST(MOZ_B2GDROID)
 
-AC_DEFINE_UNQUOTED(MOZ_BUILD_APP,$MOZ_BUILD_APP)
-
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 if test -z "$gonkdir" ; then
     case "$MOZ_BUILD_APP" in
     mobile/android | mobile/android/b2gdroid)