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/.
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
)
26 define gb_Extension_add_file
27 $(call gb_ExtensionTarget_add_file
,$(1),$(2),$(3))
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))
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))
48 define gb_Extension_add_libraries
49 $(call gb_ExtensionTarget_add_libraries
,$(1),$(2))
53 # add an executable from the solver
54 define gb_Extension_add_executable
55 $(call gb_ExtensionTarget_add_executable
,$(1),$(2))
59 define gb_Extension_add_executables
60 $(call gb_ExtensionTarget_add_executables
,$(1),$(2))
64 # localize .properties file
65 define gb_Extension_localize_properties
66 $(call gb_ExtensionTarget_localize_properties
,$(1),$(2),$(3))
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))
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
79 define gb_Extension_add_helpfile
80 $(call gb_ExtensionTarget_add_helpfile
,$(1),$(2),$(3),$(4))
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))
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))
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
102 define gb_Extension_add_helptreefile
103 $(call gb_ExtensionTarget_add_helptreefile
,$(1),$(2),$(3),$(4),$(5))
107 define gb_Extension_use_default_description
108 $(call gb_ExtensionTarget_use_default_description
,$(1))
112 define gb_Extension_use_default_license
113 $(call gb_ExtensionTarget_use_default_license
,$(1))
117 define gb_Extension_use_unpacked
118 $(call gb_ExtensionTarget_use_unpacked
,$(1),$(2))
122 define gb_Extension_use_package
123 $(call gb_ExtensionTarget_use_package
,$(1),$(2))
127 define gb_Extension_use_packages
128 $(call gb_ExtensionTarget_use_packages
,$(1),$(2))
132 define gb_Extension_add_package_dependency
133 $$(call gb_Output_error
,\
134 gb_Extension_add_package_dependency
: use gb_Extension_use_package instead.
)
137 define gb_Extension_add_package_dependencies
138 $$(call gb_Output_error
,\
139 gb_Extension_add_package_dependencies
: use gb_Extension_use_packages instead.
)
142 # vim: set noet sw=4 ts=4: