# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- # # This file is part of the LibreOffice project. # # 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/. #
# AllLangPackage class
# Handles creation of a bunch of packages with content dependent on # language. The package files are placed into $(INSTROOT).
# Add a file to one of the child packages. # # If 'lang' is empty, the language is taken from the first component of the 'source' file name. The # file is only added if there is a package defined for the language # (i.e., if we are building with the language). # # gb_AllLangPackage_add_file target destination source lang
gb_AllLangPackage_ALLDIRS := define gb_AllLangPackage_add_file
gb_AllLangPackage_ALLDIRS := $(sort $(gb_AllLangPackage_ALLDIRS) $(patsubst %$(3),%,$(2)))
$(call gb_AllLangPackage__add_file,$(1),$(2),$(3),$(or $(4),$(firstword $(subst /, ,$(3)))))
endef
# Add several files to the child packages at once. # # gb_AllLangPackage_add_files target destination-dir file(s) define gb_AllLangPackage_add_files
$(if $(strip $(2)),,$(call gb_Output_error,gb_AllLangPackage_add_files: destination dir cannot be empty))
$(foreach file,$(3),$(call gb_AllLangPackage_add_file,$(1),$(2)/$(file),$(file)))
endef
# gb_AllLangPackage_add_files_for_lang target lang destination-dir file(s) define gb_AllLangPackage_add_files_for_lang
$(if $(strip $(3)),,$(call gb_Output_error,gb_AllLangPackage_add_files: destination dir cannot be empty))
$(foreach file,$(4),$(call gb_AllLangPackage_add_file,$(1),$(3)/$(file),$(file),$(2)))
endef
# Add several files to the child packages at once. # # The files are placed into subdir under the language-dependent path. # # Example: # $(eval $(call # gb_AllLangPackage_add_files_with_subdir,foo,destdir,subdir,cs/file.ext)) # # -> destdir/cs/subdir/file.ext # # gb_AllLangPackage_add_files_with_subdir target destination-dir subdir file(s) define gb_AllLangPackage_add_files_with_subdir
$(if $(strip $(2)),,$(call gb_Output_error,gb_AllLangPackage_add_files_with_subdir: destination dir cannot be empty))
$(if $(strip $(3)),,$(call gb_Output_error,gb_AllLangPackage_add_files_with_subdir: there is no subdir, just use gb_AllLangPackage_add_files))
$(foreach file,$(4),$(call gb_AllLangPackage_add_file,$(1),$(2)/$(dir $(file))$(3)/$(notdir $(file)),$(file)))
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.