зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1166538 - Make it more straightforward, path-wise, to change $(ZIP) uses to the zip py_action. r=gps
This commit is contained in:
Родитель
aa8f7a51f7
Коммит
4a4cc01c62
|
@ -10,18 +10,14 @@ from mozpack.copier import Jarrer
|
|||
from mozpack.errors import errors
|
||||
|
||||
import argparse
|
||||
import buildconfig
|
||||
import mozpack.path as mozpath
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
def main(args):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--base-dir",
|
||||
default=os.path.join(buildconfig.topobjdir,
|
||||
"dist", "bin"),
|
||||
help="Store paths relative to this directory")
|
||||
parser.add_argument("-C", metavar='DIR', default=".",
|
||||
help="Change to given directory before considering "
|
||||
"other paths")
|
||||
parser.add_argument("zip", help="Path to zip file to write")
|
||||
parser.add_argument("input", nargs="+",
|
||||
help="Path to files to add to zip")
|
||||
|
@ -30,12 +26,11 @@ def main(args):
|
|||
jarrer = Jarrer(optimize=False)
|
||||
|
||||
with errors.accumulate():
|
||||
finder = FileFinder(args.base_dir)
|
||||
for i in args.input:
|
||||
path = mozpath.relpath(i, args.base_dir)
|
||||
finder = FileFinder(args.C)
|
||||
for path in args.input:
|
||||
for p, f in finder.find(path):
|
||||
jarrer.add(p, f)
|
||||
jarrer.copy(args.zip)
|
||||
jarrer.copy(mozpath.join(args.C, args.zip))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -66,56 +66,56 @@ endif
|
|||
# JavaScript Shell packaging
|
||||
ifndef LIBXUL_SDK
|
||||
JSSHELL_BINS = \
|
||||
$(DIST)/bin/js$(BIN_SUFFIX) \
|
||||
$(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
|
||||
js$(BIN_SUFFIX) \
|
||||
$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
|
||||
$(NULL)
|
||||
ifndef MOZ_NATIVE_NSPR
|
||||
ifdef MSVC_C_RUNTIME_DLL
|
||||
JSSHELL_BINS += $(DIST)/bin/$(MSVC_C_RUNTIME_DLL)
|
||||
JSSHELL_BINS += $(MSVC_C_RUNTIME_DLL)
|
||||
endif
|
||||
ifdef MSVC_CXX_RUNTIME_DLL
|
||||
JSSHELL_BINS += $(DIST)/bin/$(MSVC_CXX_RUNTIME_DLL)
|
||||
JSSHELL_BINS += $(MSVC_CXX_RUNTIME_DLL)
|
||||
endif
|
||||
ifdef MSVC_APPCRT_DLL
|
||||
JSSHELL_BINS += $(DIST)/bin/$(MSVC_APPCRT_DLL)
|
||||
JSSHELL_BINS += $(MSVC_APPCRT_DLL)
|
||||
endif
|
||||
ifdef MSVC_DESKTOPCRT_DLL
|
||||
JSSHELL_BINS += $(DIST)/bin/$(MSVC_DESKTOPCRT_DLL)
|
||||
JSSHELL_BINS += $(MSVC_DESKTOPCRT_DLL)
|
||||
endif
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)
|
||||
JSSHELL_BINS += $(DLL_PREFIX)nss3$(DLL_SUFFIX)
|
||||
else
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
|
||||
$(DIST)/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
|
||||
$(DIST)/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
|
||||
$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
|
||||
$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
|
||||
$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
|
||||
$(NULL)
|
||||
endif # MOZ_FOLD_LIBS
|
||||
endif # MOZ_NATIVE_NSPR
|
||||
ifdef MOZ_SHARED_ICU
|
||||
ifeq ($(OS_TARGET), WINNT)
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/icudt$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
$(DIST)/bin/icuin$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
$(DIST)/bin/icuuc$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
icudt$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
icuin$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
icuuc$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
|
||||
$(NULL)
|
||||
else
|
||||
ifeq ($(OS_TARGET), Darwin)
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/libicudata.$(MOZ_ICU_VERSION).dylib \
|
||||
$(DIST)/bin/libicui18n.$(MOZ_ICU_VERSION).dylib \
|
||||
$(DIST)/bin/libicuuc.$(MOZ_ICU_VERSION).dylib \
|
||||
libicudata.$(MOZ_ICU_VERSION).dylib \
|
||||
libicui18n.$(MOZ_ICU_VERSION).dylib \
|
||||
libicuuc.$(MOZ_ICU_VERSION).dylib \
|
||||
$(NULL)
|
||||
else
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/libicudata.so.$(MOZ_ICU_VERSION) \
|
||||
$(DIST)/bin/libicui18n.so.$(MOZ_ICU_VERSION) \
|
||||
$(DIST)/bin/libicuuc.so.$(MOZ_ICU_VERSION) \
|
||||
libicudata.so.$(MOZ_ICU_VERSION) \
|
||||
libicui18n.so.$(MOZ_ICU_VERSION) \
|
||||
libicuuc.so.$(MOZ_ICU_VERSION) \
|
||||
$(NULL)
|
||||
endif # Darwin
|
||||
endif # WINNT
|
||||
endif # MOZ_STATIC_JS
|
||||
MAKE_JSSHELL = $(call py_action,zip,$(PKG_JSSHELL) $(abspath $(JSSHELL_BINS)))
|
||||
MAKE_JSSHELL = $(call py_action,zip,-C $(DIST)/bin $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS))
|
||||
endif # LIBXUL_SDK
|
||||
|
||||
_ABS_DIST = $(abspath $(DIST))
|
||||
|
|
Загрузка…
Ссылка в новой задаче