# 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/.
# Shared makefile that can be used to easily kick off l10n builds # of Mozilla applications. # This makefile should be included, and then assumes that the including # makefile defines the following targets: # l10n-% # This target should call into the various l10n targets that this # application depends on. # installer-% # This target should list all required targets, a typical rule would be # installers-%: clobber-% langpack-% repackage-zip-% # @echo "repackaging done" # to initially clobber the locale staging area, and then to build the # language pack and zip package. # Other targets like windows installers might be listed, too, and should # be defined in the including makefile. # The installer-% targets should not set AB_CD, so that the unpackaging # step finds the original package. # The including makefile should provide values for the variables # MOZ_APP_VERSION and MOZ_LANGPACK_EID.
# This makefile uses variable overrides from the l10n-% target to # build non-default locales to non-default dist/ locations. Be aware!
# export some global defines for l10n repacks
BASE_MERGE:=$(CURDIR)/merge-dir export REAL_LOCALE_MERGEDIR=$(BASE_MERGE)/$(AB_CD) # is an l10n repack step: export IS_LANGUAGE_REPACK # is a language pack: export IS_LANGPACK
# Dealing with app sub dirs: If DIST_SUBDIRS is defined it contains a # listing of app sub-dirs we should include in langpack xpis. If not, # check DIST_SUBDIR, and if that isn't present, just package the default # chrome directory and top-level localization for Fluent.
PKG_ZIP_DIRS = chrome localization $(or $(DIST_SUBDIRS),$(DIST_SUBDIR))
GIT ?= git
merge-%: IS_LANGUAGE_REPACK=1
merge-%: AB_CD=$*
merge-%:
$(RM) -rf $(REAL_LOCALE_MERGEDIR)
$(PYTHON3) -m moz.l10n.bin.build --config $(srcdir)/l10n.toml --base $(L10NBASEDIR) --target $(BASE_MERGE) --locales $(AB_CD) --coverage # Hunspell dictionaries are interesting, as we don't ship the en-US # dictionary in repacks. Thus we can't use the merge logic from # compare-locales above, which would add en-US.dic and en-US.aff to # the merge directory. # Copy them to the merge dir, if exist. The repackaged app can still decide # on whether to package them or not in `l10n-%` and `chrome-%`. if test -d $(L10NBASEDIR)/$(AB_CD)/extensions/spellcheck ; then \
$(NSINSTALL) -D $(REAL_LOCALE_MERGEDIR)/extensions/spellcheck/hunspell ; \ cp $(L10NBASEDIR)/$(AB_CD)/extensions/spellcheck/hunspell/*.* $(REAL_LOCALE_MERGEDIR)/extensions/spellcheck/hunspell ; \ fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.