bump product version to 7.2.5.1
[LibreOffice.git] / solenv / gbuild / CliNativeLibrary.mk
blob9e19ccd709b59c2e3e0a84ff91db69076f1941d5
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # CliNativeLibrary class
12 gb_CliNativeLibrary_PLATFORM_DEFAULT := x86
13 gb_CliNativeLibrary_EXT := $(gb_CliAssembly_POLICYEXT)
15 gb_CliNativeLibrary__get_library = $(call gb_CliAssembly_get_dll,$(1))
17 define gb_CliNativeLibrary__command
18 $(call gb_Helper_abbreviate_dirs,\
19 $(GNUCOPY) $(CLI_NATIVE_LIBRARY) $(1).tmp && \
20 sn -R $(1).tmp $(CLI_NATIVE_KEYFILE) && \
21 mv $(1).tmp $(1) \
23 endef
25 $(call gb_CliNativeLibrary_get_preparation_target,%) :
26 mkdir -p $(dir $@) && touch $@
28 .PHONY : $(call gb_CliNativeLibrary_get_clean_target,%)
29 $(call gb_CliNativeLibrary_get_clean_target,%) :
30 $(call gb_Output_announce,$*,$(false),SN ,4)
31 $(call gb_Helper_abbreviate_dirs,\
32 rm -rf $(call gb_CliNativeLibrary_get_target,$*) \
33 $(call gb_CliNativeLibrary_get_preparation_target,$*) \
37 # Create a CLI library for a native library
39 # CliNativeLibrary target
40 define gb_CliNativeLibrary_CliNativeLibrary
41 $(call gb_CliAssembly_CliAssembly,$(1),$(call gb_CliNativeLibrary_get_target,$(1)))
43 $(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_ASSEMBLIES := $(gb_Helper_MISCDUMMY)
44 $(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_KEYFILE :=
45 $(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_LIBRARY :=
48 $(call gb_CliNativeLibrary_set_keyfile,$(1),$(gb_CliAssembly_KEYFILE_DEFAULT))
49 $(call gb_CliAssembly_set_platform,$(1),$(gb_CliNativeLibrary_PLATFORM_DEFAULT))
51 $(call gb_CliNativeLibrary_get_target,$(1)) :| $(call gb_CliAssembly_get_target,$(1))
52 $(call gb_CliNativeLibrary_get_target,$(1)) :| $(dir $(call gb_CliNativeLibrary_get_target,$(1))).dir
53 $(call gb_CliNativeLibrary_get_clean_target,$(1)) : $(call gb_CliAssembly_get_clean_target,$(1))
55 $$(eval $$(call gb_Module_register_target,$(call gb_CliNativeLibrary_get_target,$(1)),$(call gb_CliNativeLibrary_get_clean_target,$(1))))
56 $(call gb_Helper_make_userfriendly_targets,$(1),CliNativeLibrary)
58 $(call gb_CliNativeLibrary_get_target,$(1)) :
59 $$(call gb_Output_announce,$(1),$(true),SN ,4)
60 $$(call gb_Trace_StartRange,$(1),SN )
61 $$(call gb_CliNativeLibrary__command,$$@,$(1))
62 $$(call gb_Trace_EndRange,$(1),SN )
64 endef
66 define gb_CliNativeLibrary_set_configfile
67 $(call gb_CliAssembly_set_configfile,$(1),$(2),$(3))
69 endef
71 define gb_CliNativeLibrary_set_keyfile
72 $(call gb_CliAssembly_set_keyfile,$(1),$(2))
73 $(call gb_CliNativeLibrary_get_target,$(1)) : CLI_NATIVE_KEYFILE := $(2)
74 $(call gb_CliNativeLibrary_get_target,$(1)) : $(2)
76 endef
78 define gb_CliNativeLibrary_set_platform
79 $(call gb_CliAssembly_set_platform,$(1),$(2))
81 endef
83 define gb_CliNativeLibrary_set_policy
84 $(call gb_CliAssembly_set_policy,$(1),$(2),$(3))
86 endef
88 define gb_CliNativeLibrary_wrap_library
89 $(call gb_CliNativeLibrary_get_target,$(1)) : \
90 CLI_NATIVE_LIBRARY := $(call gb_CliNativeLibrary__get_library,$(2))
91 $(call gb_CliNativeLibrary_get_target,$(1)) : \
92 $(call gb_Library_get_target,$(2))
93 $(call gb_Library_get_headers_target,$(2)) : \
94 $(call gb_CliNativeLibrary_get_preparation_target,$(1))
96 endef
98 define gb_CliNativeLibrary_use_assembly
99 $(call gb_CliNativeLibrary_get_target,$(1)) : \
100 CLI_NATIVE_ASSEMBLIES += $(call gb_CliLibrary_get_target,$(2))
101 $(call gb_CliNativeLibrary_get_preparation_target,$(1)) : \
102 $(call gb_CliLibrary_get_target,$(2))
104 endef
106 define gb_CliNativeLibrary_use_assemblies
107 $(foreach assembly,$(2),$(call gb_CliNativeLibrary_use_assembly,$(1),$(assembly)))
109 endef
111 # vim: set noet sw=4 ts=4: