author | Nathan Froyd <froydnj@mozilla.com> |
Thu, 19 Feb 2015 10:35:08 -0500 | |
changeset 230002 | 0645b0eeb7202ee9e3aa0a0fe90b2affabbc79bc |
parent 230001 | 9ba87714f5cfda74e6dd2eb8fd73678429a9b3e6 |
child 230003 | 00ea6409e912aac7552509669a8f0528595259ba |
push id | 55869 |
push user | nfroyd@mozilla.com |
push date | Fri, 20 Feb 2015 17:19:38 +0000 |
treeherder | mozilla-inbound@0645b0eeb720 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mshal |
bugs | 1134633 |
milestone | 38.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
|
dom/encoding/Makefile.in | file | annotate | diff | comparison | revisions | |
dom/encoding/moz.build | file | annotate | diff | comparison | revisions | |
intl/locale/Makefile.in | file | annotate | diff | comparison | revisions | |
intl/locale/moz.build | file | annotate | diff | comparison | revisions | |
intl/locale/props2arrays.py | file | annotate | diff | comparison | revisions | |
intl/locale/unix/Makefile.in | file | annotate | diff | comparison | revisions | |
intl/locale/unix/moz.build | file | annotate | diff | comparison | revisions | |
intl/locale/windows/Makefile.in | file | annotate | diff | comparison | revisions | |
intl/locale/windows/moz.build | file | annotate | diff | comparison | revisions |
deleted file mode 100644 --- a/dom/encoding/Makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# 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/. - -include $(topsrcdir)/config/rules.mk - -PROPS2ARRAYS = $(topsrcdir)/intl/locale/props2arrays.py -labelsencodings.properties.h: $(PROPS2ARRAYS) labelsencodings.properties - $(PYTHON) $^ $@ -localesfallbacks.properties.h: $(PROPS2ARRAYS) localesfallbacks.properties - $(PYTHON) $^ $@ -domainsfallbacks.properties.h: $(PROPS2ARRAYS) domainsfallbacks.properties - $(PYTHON) $^ $@ -encodingsgroups.properties.h: $(PROPS2ARRAYS) encodingsgroups.properties - $(PYTHON) $^ $@ -nonparticipatingdomains.properties.h: $(PROPS2ARRAYS) nonparticipatingdomains.properties - $(PYTHON) $^ $@
--- a/dom/encoding/moz.build +++ b/dom/encoding/moz.build @@ -20,21 +20,30 @@ UNIFIED_SOURCES += [ FAIL_ON_WARNINGS = True FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ '/intl/locale', ] -GENERATED_FILES += [ - 'domainsfallbacks.properties.h', - 'encodingsgroups.properties.h', - 'labelsencodings.properties.h', - 'localesfallbacks.properties.h', - 'nonparticipatingdomains.properties.h', -] +props2arrays = TOPSRCDIR + '/intl/locale/props2arrays.py' +prefixes = ( + 'domainsfallbacks', + 'encodingsgroups', + 'labelsencodings', + 'localesfallbacks', + 'nonparticipatingdomains', +) + +for prefix in prefixes: + input_file = prefix + '.properties' + header = prefix + '.properties.h' + GENERATED_FILES += [header] + props = GENERATED_FILES[header] + props.script = props2arrays + props.inputs = [input_file] MOCHITEST_MANIFESTS += [ 'test/mochitest.ini', ] MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
deleted file mode 100644 --- a/intl/locale/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# 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/. - -include $(topsrcdir)/config/rules.mk - -PROPS2ARRAYS = $(topsrcdir)/intl/locale/props2arrays.py -langGroups.properties.h: $(PROPS2ARRAYS) langGroups.properties - $(PYTHON) $^ $@
--- a/intl/locale/moz.build +++ b/intl/locale/moz.build @@ -59,13 +59,16 @@ LOCAL_INCLUDES += [ RESOURCE_FILES += [ 'langGroups.properties', 'language.properties', ] GENERATED_FILES += [ 'langGroups.properties.h', ] +langgroups = GENERATED_FILES['langGroups.properties.h'] +langgroups.script = 'props2arrays.py' +langgroups.inputs = ['langGroups.properties'] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': CXXFLAGS += CONFIG['MOZ_QT_CFLAGS'] FAIL_ON_WARNINGS = True
--- a/intl/locale/props2arrays.py +++ b/intl/locale/props2arrays.py @@ -1,39 +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/. import sys -mappings = {} - -propFile = open(sys.argv[1], "r"); - -for line in propFile: - line = line.strip() - if not line.startswith('#'): - parts = line.split("=", 1) - if len(parts) == 2 and len(parts[0]) > 0: - mappings[parts[0].strip()] = parts[1].strip() - -propFile.close() - -keys = mappings.keys() -keys.sort() +def main(header, propFile): + mappings = {} -hFile = open(sys.argv[2], "w"); - -hFile.write("// This is a generated file. Please do not edit.\n") -hFile.write("// Please edit the corresponding .properties file instead.\n") + with open(propFile, 'r') as f: + for line in f: + line = line.strip() + if not line.startswith('#'): + parts = line.split("=", 1) + if len(parts) == 2 and len(parts[0]) > 0: + mappings[parts[0].strip()] = parts[1].strip() + + keys = mappings.keys() + keys.sort() -first = 1 -for key in keys: - if first: - first = 0 - else: - hFile.write(',\n') - hFile.write('{ "%s", "%s", (const char*)NS_INT32_TO_PTR(%d) }' - % (key, mappings[key], len(mappings[key]))); -hFile.write('\n') -hFile.flush() -hFile.close() + header.write("// This is a generated file. Please do not edit.\n") + header.write("// Please edit the corresponding .properties file instead.\n") + entries = ['{ "%s", "%s", (const char*)NS_INT32_TO_PTR(%d) }' + % (key, mappings[key], len(mappings[key])) for key in keys] + header.write(',\n'.join(entries) + '\n') +
deleted file mode 100644 --- a/intl/locale/unix/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# -# 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/. - -include $(topsrcdir)/config/rules.mk - -unixcharset.properties.h: $(srcdir)/../props2arrays.py unixcharset.properties - $(PYTHON) $^ $@
--- a/intl/locale/unix/moz.build +++ b/intl/locale/unix/moz.build @@ -19,16 +19,20 @@ else: 'nsUNIXCharset.cpp', ] FINAL_LIBRARY = 'xul' GENERATED_FILES = [ 'unixcharset.properties.h', ] +unixcharset = GENERATED_FILES['unixcharset.properties.h'] +unixcharset.script = '../props2arrays.py' +unixcharset.inputs = ['unixcharset.properties'] + LOCAL_INCLUDES += [ '..', ] # CODESET is not automatically defined on some older versions of Redhat. # Define _XOPEN_SOURCE so CODESET will get defined and thus allow # nl_langinfo(CODESET) to compile on these systems.
deleted file mode 100644 --- a/intl/locale/windows/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# -# 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/. - -include $(topsrcdir)/config/rules.mk - -wincharset.properties.h: $(srcdir)/../props2arrays.py wincharset.properties - $(PYTHON) $^ $@
--- a/intl/locale/windows/moz.build +++ b/intl/locale/windows/moz.build @@ -11,12 +11,16 @@ SOURCES += [ 'nsWinCharset.cpp', ] FINAL_LIBRARY = 'xul' GENERATED_FILES = [ 'wincharset.properties.h', ] +wincharset = GENERATED_FILES['wincharset.properties.h'] +wincharset.script = '../props2arrays.py' +wincharset.inputs = ['wincharset.properties'] + LOCAL_INCLUDES += [ '..', ]