mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 924615 - Move JarMaker.py into mozbuild; r=mshal
--HG-- rename : config/JarMaker.py => python/mozbuild/mozbuild/jar.py rename : config/tests/unit-JarMaker.py => python/mozbuild/mozbuild/test/test_jarmaker.py
This commit is contained in:
parent
d8e40bc218
commit
c399347494
@ -352,7 +352,6 @@ DEFINES += -DSTATIC_EXPORTABLE_JS_API
|
||||
endif
|
||||
endif
|
||||
|
||||
# Flags passed to JarMaker.py
|
||||
MAKE_JARS_FLAGS = \
|
||||
-t $(topsrcdir) \
|
||||
-f $(MOZ_CHROME_FILE_FORMAT) \
|
||||
|
@ -1451,10 +1451,10 @@ endif
|
||||
endif
|
||||
|
||||
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
||||
$(call py_action,jar_maker,\
|
||||
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
||||
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
||||
$(JAR_MANIFEST)
|
||||
$(JAR_MANIFEST))
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@ -352,7 +352,6 @@ DEFINES += -DSTATIC_EXPORTABLE_JS_API
|
||||
endif
|
||||
endif
|
||||
|
||||
# Flags passed to JarMaker.py
|
||||
MAKE_JARS_FLAGS = \
|
||||
-t $(topsrcdir) \
|
||||
-f $(MOZ_CHROME_FILE_FORMAT) \
|
||||
|
@ -1451,10 +1451,10 @@ endif
|
||||
endif
|
||||
|
||||
libs realchrome:: $(CHROME_DEPS) $(FINAL_TARGET)/chrome
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
|
||||
$(call py_action,jar_maker,\
|
||||
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
||||
$(MAKE_JARS_FLAGS) $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
||||
$(JAR_MANIFEST)
|
||||
$(JAR_MANIFEST))
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@ -20,12 +20,6 @@ include $(topsrcdir)/config/makefiles/makeutils.mk
|
||||
# Separate items of contention
|
||||
tgt-gendir = .deps/generated_$(AB_CD)
|
||||
|
||||
jar-maker = \
|
||||
$(firstword \
|
||||
$(wildcard $(MOZILLA_DIR)/config/JarMaker.py) \
|
||||
$(topsrcdir)/config/JarMaker.py \
|
||||
)
|
||||
|
||||
GENERATED_DIRS += .deps
|
||||
|
||||
ifdef LOCALE_MERGEDIR
|
||||
@ -130,18 +124,17 @@ search-preqs =\
|
||||
$(call mkdir_deps,$(FINAL_TARGET)/chrome) \
|
||||
$(search-jar) \
|
||||
$(search-dir-deps) \
|
||||
$(jar-maker) \
|
||||
$(if $(IS_LANGUAGE_REPACK),FORCE) \
|
||||
$(GLOBAL_DEPS) \
|
||||
$(NULL)
|
||||
|
||||
.PHONY: searchplugins
|
||||
searchplugins: $(search-preqs)
|
||||
$(PYTHON) $(jar-maker) \
|
||||
$(call py_action,jar_maker,\
|
||||
$(QUIET) -j $(FINAL_TARGET)/chrome \
|
||||
-s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
|
||||
-s $(LOCALE_SRCDIR)/searchplugins \
|
||||
$(MAKE_JARS_FLAGS) $(search-jar)
|
||||
$(MAKE_JARS_FLAGS) $(search-jar))
|
||||
$(TOUCH) $@
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
15
python/mozbuild/mozbuild/action/jar_maker.py
Normal file
15
python/mozbuild/mozbuild/action/jar_maker.py
Normal file
@ -0,0 +1,15 @@
|
||||
# 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
|
||||
|
||||
import mozbuild.jar
|
||||
|
||||
|
||||
def main(args):
|
||||
return mozbuild.jar.main(args)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
@ -9,7 +9,6 @@ See the documentation for jar.mn on MDC for further details on the format.
|
||||
'''
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
import errno
|
||||
import re
|
||||
import logging
|
||||
@ -439,10 +438,11 @@ class JarMaker(object):
|
||||
if rv == 0:
|
||||
raise WinError()
|
||||
|
||||
def main():
|
||||
def main(args=None):
|
||||
args = args or sys.argv
|
||||
jm = JarMaker()
|
||||
p = jm.getCommandLineParser()
|
||||
(options, args) = p.parse_args()
|
||||
(options, args) = p.parse_args(args)
|
||||
jm.processIncludes(options.I)
|
||||
jm.outputFormat = options.f
|
||||
jm.sourcedirs = options.s
|
||||
@ -484,6 +484,3 @@ def main():
|
||||
else:
|
||||
infile, = args
|
||||
jm.makeJar(infile, options.j)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -1,3 +1,7 @@
|
||||
# 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 __future__ import print_function
|
||||
import unittest
|
||||
|
||||
@ -8,7 +12,9 @@ from shutil import rmtree, copy2
|
||||
from StringIO import StringIO
|
||||
from zipfile import ZipFile
|
||||
import mozunit
|
||||
from JarMaker import JarMaker
|
||||
|
||||
from mozbuild.jar import JarMaker
|
||||
|
||||
|
||||
if sys.platform == "win32":
|
||||
import ctypes
|
Loading…
Reference in New Issue
Block a user