bump product version to 4.1.6.2
[LibreOffice.git] / solenv / gbuild / Extension.mk
blob37ad1e270a09fe3a5debd51da710323376ca3742
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 # Extension class
13 define gb_Extension_Extension
14 $(call gb_ExtensionTarget_ExtensionTarget,$(1),$(2))
16 $(call gb_Extension_get_target,$(1)) : $(call gb_ExtensionTarget_get_target,$(1))
17 $(call gb_Extension_get_clean_target,$(1)) : $(call gb_ExtensionTarget_get_clean_target,$(1))
19 $(call gb_Deliver_add_deliverable,$(call gb_Extension_get_target,$(1)),$(call gb_ExtensionTarget_get_target,$(1)),$(1))
21 $$(eval $$(call gb_Module_register_target,$(call gb_Extension_get_target,$(1)),$(call gb_Extension_get_clean_target,$(1))))
22 $(call gb_Helper_make_userfriendly_targets,$(1),Extension)
24 endef
26 define gb_Extension_add_file
27 $(call gb_ExtensionTarget_add_file,$(1),$(2),$(3))
29 endef
31 # Add several files at once
33 # This function avoids the need to specify each file's name twice. The
34 # files are added directly under specified path in the extension,
35 # without any subpath. If no path is specified, they are added directly
36 # to the root dir of the extension.
37 define gb_Extension_add_files
38 $(call gb_ExtensionTarget_add_files,$(1),$(2),$(3))
40 endef
42 # add a library from the solver; DO NOT use gb_Library_get_target
43 define gb_Extension_add_library
44 $(call gb_ExtensionTarget_add_library,$(1),$(2))
46 endef
48 define gb_Extension_add_libraries
49 $(call gb_ExtensionTarget_add_libraries,$(1),$(2))
51 endef
53 # add an executable from the solver
54 define gb_Extension_add_executable
55 $(call gb_ExtensionTarget_add_executable,$(1),$(2))
57 endef
59 define gb_Extension_add_executables
60 $(call gb_ExtensionTarget_add_executables,$(1),$(2))
62 endef
64 # localize .properties file
65 define gb_Extension_localize_properties
66 $(call gb_ExtensionTarget_localize_properties,$(1),$(2),$(3))
68 endef
70 # add an .xhp help file, to be localized and compiled
71 # $(1): extension identifier
72 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
73 # suffix
74 # $(3): relative path of (target) .xhp file (e.g.,
75 # com.sun.wiki-publisher/wiki.xhp)
76 # $(4): optional relative path of source .xhp file, when it differs from $(3)
77 # (i.e., if $(4) is empty the en-US source file is $(2)/$(3), otherwise it
78 # is $(2)/$(4))
79 define gb_Extension_add_helpfile
80 $(call gb_ExtensionTarget_add_helpfile,$(1),$(2),$(3),$(4))
82 endef
84 # add a list of .xhp help files, to be localized and compiled
85 # $(1): extension identifier
86 # $(2): absolute path prefix of en-US source files without $(3) suffixes
87 # $(3): list of relative paths of .xhp files (see gb_Extension_add_helpfile)
88 define gb_Extension_add_helpfiles
89 $(call gb_ExtensionTarget_add_helpfiles,$(1),$(2),$(3))
91 endef
93 # add a help.tree file, to be localized and compiled
94 # $(1): extension identifier
95 # $(2): absolute path prefix of en-US source file without $(3) (resp. $(4))
96 # suffix
97 # $(3): relative path of (target) help.tree file (e.g.,
98 # com.sun.wiki-publisher/help.tree)
99 # $(4): optional relative path of source help.tree file, when it differs from $(3)
100 # (i.e., if $(4) is empty the en-US source file is $(2)/$(3), otherwise it
101 # is $(2)/$(4))
102 define gb_Extension_add_helptreefile
103 $(call gb_ExtensionTarget_add_helptreefile,$(1),$(2),$(3),$(4),$(5))
105 endef
107 define gb_Extension_use_default_description
108 $(call gb_ExtensionTarget_use_default_description,$(1))
110 endef
112 define gb_Extension_use_default_license
113 $(call gb_ExtensionTarget_use_default_license,$(1))
115 endef
117 define gb_Extension_use_unpacked
118 $(call gb_ExtensionTarget_use_unpacked,$(1),$(2))
120 endef
122 define gb_Extension_use_package
123 $(call gb_ExtensionTarget_use_package,$(1),$(2))
125 endef
127 define gb_Extension_use_packages
128 $(call gb_ExtensionTarget_use_packages,$(1),$(2))
130 endef
132 define gb_Extension_add_package_dependency
133 $$(call gb_Output_error,\
134 gb_Extension_add_package_dependency: use gb_Extension_use_package instead.)
135 endef
137 define gb_Extension_add_package_dependencies
138 $$(call gb_Output_error,\
139 gb_Extension_add_package_dependencies: use gb_Extension_use_packages instead.)
140 endef
142 # vim: set noet sw=4 ts=4: