Bug 831790 - Use the buildconfig python module for expandlibs_config. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 19 Jan 2013 09:45:50 +0100
changeset 129224 204b95febb133df8062ab60e393ca8b654f31d07
parent 129223 ab31d2237244ccfc348c1562bbd6776c2495f7d7
child 129225 6b280e1554845df3eff6a6ef1f885ab6a64f4489
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs831790
milestone21.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 831790 - Use the buildconfig python module for expandlibs_config. r=ted
allmakefiles.sh
config/config.mk
config/expandlibs_config.py
config/expandlibs_config.py.in
js/src/config/config.mk
js/src/config/expandlibs_config.py
js/src/config/expandlibs_config.py.in
js/src/configure.in
--- a/allmakefiles.sh
+++ b/allmakefiles.sh
@@ -30,17 +30,16 @@ Makefile
 build/Makefile
 build/pgo/Makefile
 build/pgo/blueprint/Makefile
 build/pgo/js-input/Makefile
 config/Makefile
 config/autoconf.mk
 config/nspr/Makefile
 config/doxygen.cfg
-config/expandlibs_config.py
 mfbt/Makefile
 probes/Makefile
 python/Makefile
 extensions/Makefile
 "
 
 if [ "$MOZ_WEBAPP_RUNTIME" ]; then
   add_makefiles "
--- a/config/config.mk
+++ b/config/config.mk
@@ -753,18 +753,18 @@ endif
 
 OPTIMIZE_JARS_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/optimizejars.py)
 
 CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/createprecomplete.py)
 
 # MDDEPDIR is the subdirectory where dependency files are stored
 MDDEPDIR := .deps
 
-EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp --target $@)
-EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp)
+EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp --target $@)
+EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp)
 EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
 EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
 EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
 EXPAND_LD = $(EXPAND_LIBS_EXEC) --uselist -- $(LD)
 EXPAND_MKSHLIB_ARGS = --uselist
 ifdef SYMBOL_ORDER
 EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
 endif
rename from config/expandlibs_config.py.in
rename to config/expandlibs_config.py
--- a/config/expandlibs_config.py.in
+++ b/config/expandlibs_config.py
@@ -1,25 +1,27 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+from buildconfig import substs
+
 def normalize_suffix(suffix):
     '''Returns a normalized suffix, i.e. ensures it starts with a dot and
     doesn't starts or ends with whitespace characters'''
     value = suffix.strip()
     if len(value) and not value.startswith('.'):
         value = '.' + value
     return value
 
 # Variables from the build system
-AR = "@AR@"
-AR_EXTRACT = "@AR_EXTRACT@".replace('$(AR)', AR)
-DLL_PREFIX = "@DLL_PREFIX@"
-LIB_PREFIX = "@LIB_PREFIX@"
-OBJ_SUFFIX = normalize_suffix("@OBJ_SUFFIX@")
-LIB_SUFFIX = normalize_suffix("@LIB_SUFFIX@")
-DLL_SUFFIX = normalize_suffix("@DLL_SUFFIX@")
-IMPORT_LIB_SUFFIX = normalize_suffix("@IMPORT_LIB_SUFFIX@")
-LIBS_DESC_SUFFIX = normalize_suffix("@LIBS_DESC_SUFFIX@")
-EXPAND_LIBS_LIST_STYLE = "@EXPAND_LIBS_LIST_STYLE@"
-EXPAND_LIBS_ORDER_STYLE = "@EXPAND_LIBS_ORDER_STYLE@"
-LD_PRINT_ICF_SECTIONS = "@LD_PRINT_ICF_SECTIONS@"
+AR = substs['AR']
+AR_EXTRACT = substs['AR_EXTRACT'].replace('$(AR)', AR)
+DLL_PREFIX = substs['DLL_PREFIX']
+LIB_PREFIX = substs['LIB_PREFIX']
+OBJ_SUFFIX = normalize_suffix(substs['OBJ_SUFFIX'])
+LIB_SUFFIX = normalize_suffix(substs['LIB_SUFFIX'])
+DLL_SUFFIX = normalize_suffix(substs['DLL_SUFFIX'])
+IMPORT_LIB_SUFFIX = normalize_suffix(substs['IMPORT_LIB_SUFFIX'])
+LIBS_DESC_SUFFIX = normalize_suffix(substs['LIBS_DESC_SUFFIX'])
+EXPAND_LIBS_LIST_STYLE = substs['EXPAND_LIBS_LIST_STYLE']
+EXPAND_LIBS_ORDER_STYLE = substs['EXPAND_LIBS_ORDER_STYLE']
+LD_PRINT_ICF_SECTIONS = substs['LD_PRINT_ICF_SECTIONS']
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -753,18 +753,18 @@ endif
 
 OPTIMIZE_JARS_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/optimizejars.py)
 
 CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/createprecomplete.py)
 
 # MDDEPDIR is the subdirectory where dependency files are stored
 MDDEPDIR := .deps
 
-EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp --target $@)
-EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/pythonpath.py -I$(DEPTH)/config $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp)
+EXPAND_LIBS_EXEC = $(PYTHON) $(topsrcdir)/config/expandlibs_exec.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp --target $@)
+EXPAND_LIBS_GEN = $(PYTHON) $(topsrcdir)/config/expandlibs_gen.py $(if $@,--depend $(MDDEPDIR)/$(@F).pp)
 EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
 EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
 EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
 EXPAND_LD = $(EXPAND_LIBS_EXEC) --uselist -- $(LD)
 EXPAND_MKSHLIB_ARGS = --uselist
 ifdef SYMBOL_ORDER
 EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
 endif
rename from js/src/config/expandlibs_config.py.in
rename to js/src/config/expandlibs_config.py
--- a/js/src/config/expandlibs_config.py.in
+++ b/js/src/config/expandlibs_config.py
@@ -1,25 +1,27 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+from buildconfig import substs
+
 def normalize_suffix(suffix):
     '''Returns a normalized suffix, i.e. ensures it starts with a dot and
     doesn't starts or ends with whitespace characters'''
     value = suffix.strip()
     if len(value) and not value.startswith('.'):
         value = '.' + value
     return value
 
 # Variables from the build system
-AR = "@AR@"
-AR_EXTRACT = "@AR_EXTRACT@".replace('$(AR)', AR)
-DLL_PREFIX = "@DLL_PREFIX@"
-LIB_PREFIX = "@LIB_PREFIX@"
-OBJ_SUFFIX = normalize_suffix("@OBJ_SUFFIX@")
-LIB_SUFFIX = normalize_suffix("@LIB_SUFFIX@")
-DLL_SUFFIX = normalize_suffix("@DLL_SUFFIX@")
-IMPORT_LIB_SUFFIX = normalize_suffix("@IMPORT_LIB_SUFFIX@")
-LIBS_DESC_SUFFIX = normalize_suffix("@LIBS_DESC_SUFFIX@")
-EXPAND_LIBS_LIST_STYLE = "@EXPAND_LIBS_LIST_STYLE@"
-EXPAND_LIBS_ORDER_STYLE = "@EXPAND_LIBS_ORDER_STYLE@"
-LD_PRINT_ICF_SECTIONS = "@LD_PRINT_ICF_SECTIONS@"
+AR = substs['AR']
+AR_EXTRACT = substs['AR_EXTRACT'].replace('$(AR)', AR)
+DLL_PREFIX = substs['DLL_PREFIX']
+LIB_PREFIX = substs['LIB_PREFIX']
+OBJ_SUFFIX = normalize_suffix(substs['OBJ_SUFFIX'])
+LIB_SUFFIX = normalize_suffix(substs['LIB_SUFFIX'])
+DLL_SUFFIX = normalize_suffix(substs['DLL_SUFFIX'])
+IMPORT_LIB_SUFFIX = normalize_suffix(substs['IMPORT_LIB_SUFFIX'])
+LIBS_DESC_SUFFIX = normalize_suffix(substs['LIBS_DESC_SUFFIX'])
+EXPAND_LIBS_LIST_STYLE = substs['EXPAND_LIBS_LIST_STYLE']
+EXPAND_LIBS_ORDER_STYLE = substs['EXPAND_LIBS_ORDER_STYLE']
+LD_PRINT_ICF_SECTIONS = substs['LD_PRINT_ICF_SECTIONS']
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -4438,17 +4438,16 @@ dnl Spit out some output
 dnl ========================================================
 
 MAKEFILES="
   js-confdefs.h
   Makefile
   shell/Makefile
   config/Makefile
   config/autoconf.mk
-  config/expandlibs_config.py
 "
 
 if test "$JS_NATIVE_EDITLINE"; then
   MAKEFILES="$MAKEFILES
     editline/Makefile
   "
 fi