Navigation Menu

Skip to content

Commit

Permalink
Bug 831790 - Use the buildconfig python module for expandlibs_config.…
Browse files Browse the repository at this point in the history
… r=ted

--HG--
rename : config/expandlibs_config.py.in => config/expandlibs_config.py
rename : js/src/config/expandlibs_config.py.in => js/src/config/expandlibs_config.py
  • Loading branch information
glandium committed Jan 19, 2013
1 parent 7b55099 commit 0bfe444
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 56 deletions.
1 change: 0 additions & 1 deletion allmakefiles.sh
Expand Up @@ -35,7 +35,6 @@ config/Makefile
config/autoconf.mk
config/nspr/Makefile
config/doxygen.cfg
config/expandlibs_config.py
mfbt/Makefile
probes/Makefile
python/Makefile
Expand Down
4 changes: 2 additions & 2 deletions config/config.mk
Expand Up @@ -758,8 +758,8 @@ CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/creat
# 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 Down
27 changes: 27 additions & 0 deletions config/expandlibs_config.py
@@ -0,0 +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 = 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']
25 changes: 0 additions & 25 deletions config/expandlibs_config.py.in

This file was deleted.

4 changes: 2 additions & 2 deletions js/src/config/config.mk
Expand Up @@ -758,8 +758,8 @@ CREATE_PRECOMPLETE_CMD = $(PYTHON) $(call core_abspath,$(topsrcdir)/config/creat
# 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 Down
27 changes: 27 additions & 0 deletions js/src/config/expandlibs_config.py
@@ -0,0 +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 = 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']
25 changes: 0 additions & 25 deletions js/src/config/expandlibs_config.py.in

This file was deleted.

1 change: 0 additions & 1 deletion js/src/configure.in
Expand Up @@ -4443,7 +4443,6 @@ MAKEFILES="
shell/Makefile
config/Makefile
config/autoconf.mk
config/expandlibs_config.py
"

if test "$JS_NATIVE_EDITLINE"; then
Expand Down

0 comments on commit 0bfe444

Please sign in to comment.