tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / solenv / gbuild / extensions / post_GbuildToJson.mk
bloba4b6b105f32985fed5e1c2fcc942d38c283b476d
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/.
11 # Outstanding work:
13 # fill files names in:
14 # --ASMOBJECTS
15 # --GENCOBJECTS
16 # --YACCOBJECTS
17 # --LEXOBJECTS
18 # --JAVAOBJECTS
19 # --PYTHONOBJECTS
21 # Add black listed modules a json files (--DENYLIST)
23 ifneq ($(filter gbuildtojson,$(MAKECMDGOALS)),)
25 # possibly recurse to ensure gbuildtojson was build before running the modded make
26 gb_GbuildToJson_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile Executable_gbuildtojson)
27 gb_FULLDEPS:=
29 gbuildtojson:
30 @true
33 gb_GbuildToJson_PHONY := $(WORKDIR)/GBUILDTOJSONPHONY
34 .PHONY : $(gb_GbuildToJson_PHONY)
35 $(gb_GbuildToJson_PHONY):
36 @true
40 define gb_LinkTarget__command
41 $(call gb_Output_announce,$(2),$(true),GBJ,1)
42 mkdir -p $(WORKDIR)/GbuildToJson/$(dir $(2))
43 mkdir -p $(WORKDIR)/LinkTarget/$(dir $(2))
44 $(if $(GBUILDTOJSON_LD_LIBRARY_PATH),LD_LIBRARY_PATH=$(GBUILDTOJSON_LD_LIBRARY_PATH)) \
45 $(call gb_Executable_get_command,gbuildtojson) \
46 --makefile=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_MAKEFILE)) \
47 --linktarget=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(2)) \
48 --ilibtarget=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(ILIBTARGET)) \
49 --cxxobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(CXXOBJECTS)) \
50 --yaccobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(YACCOBJECTS)) \
51 --objcobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(OBJCOBJECTS)) \
52 --objcxxobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(OBJCXXOBJECTS)) \
53 --cxxclrobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(CXXCLROBJECTS)) \
54 --asmobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(ASMOBJECTS)) \
55 --lexobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(LEXOBJECTS)) \
56 --gencobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(GENCOBJECTS)) \
57 --gencxxobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(GENCXXOBJECTS)) \
58 --gencxxclrobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(GENCXXCLROBJECTS)) \
59 --cobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(COBJECTS)) \
60 --javaobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(JAVAOBJECTS)) \
61 --pythonobjects=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(PYTHONOBJECTS)) \
62 --cflags=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CFLAGS)) \
63 --cflagsappend=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CFLAGS_APPEND)) \
64 --cxxflags=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CXXFLAGS)) \
65 --cxxflagsappend=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CXXFLAGS_APPEND)) \
66 --objcflags=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_OBJCFLAGS)) \
67 --objcflagsappend=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_OBJCFLAGS_APPEND)) \
68 --objcxxflags=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_OBJCXXFLAGS)) \
69 --objcxxflagsappend=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_OBJCXXFLAGS_APPEND)) \
70 --cxxclrflags=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CXXCLRFLAGS)) \
71 --cxxclrflagsappend=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(T_CXXCLRFLAGS_APPEND)) \
72 --defs=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(DEFS)) \
73 --include=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(INCLUDE)) \
74 --linked_libs=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(LINKED_LIBS)) \
75 --linked_static_libs=$(call gb_var2file,$(shell $(gb_MKTEMP)),$(LINKED_STATIC_LIBS)) \
76 > $(WORKDIR)/GbuildToJson/$(2)
77 endef
79 define gb_Postprocess_register_target
80 gbuildtojson : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3)))
82 $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) $(gb_GbuildToJson_PHONY)
83 $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): T_MAKEFILE := $(lastword $(filter %.mk,$(MAKEFILE_LIST)))
84 endef
86 define gb_CppunitTest_register_target
87 gbuildtojson : $(call gb_LinkTarget_get_target,$(2))
89 $(call gb_LinkTarget_get_target,$(2)): $(gb_Helper_MISCDUMMY) $(gb_GbuildToJson_PHONY)
90 $(call gb_LinkTarget_get_target,$(2)): T_MAKEFILE := $(lastword $(filter %.mk,$(MAKEFILE_LIST)))
91 endef
93 define gb_StaticLibrary_register_target
94 gbuildtojson : $(call gb_LinkTarget_get_target,$(2))
96 $(call gb_LinkTarget_get_target,$(2)): $(gb_Helper_MISCDUMMY) $(gb_GbuildToJson_PHONY)
97 $(call gb_LinkTarget_get_target,$(2)): T_MAKEFILE := $(lastword $(filter %.mk,$(MAKEFILE_LIST)))
98 endef
100 gb_LinkTarget_use_static_libraries =
101 gb_UnoApiHeadersTarget_get_target = $(gb_Helper_MISCDUMMY)
102 gb_UnpackedTarball_get_final_target = $(gb_Helper_MISCDUMMY)
103 gb_LinkTarget__get_headers_check =
104 define gb_LinkTarget_add_cobject
105 $(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
107 endef
108 define gb_LinkTarget_add_cxxobject_internal
109 $(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS += $(2)
111 endef
112 define gb_LinkTarget_add_generated_c_object
113 $(call gb_LinkTarget_get_target,$(1)) : GENCOBJECTS += $(2)
115 endef
116 define gb_LinkTarget_add_generated_cxx_object_internal
117 $(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS += $(2)
119 endef
120 define gb_LinkTarget_add_generated_cxxclrobject
121 $(call gb_LinkTarget_get_target,$(1)) : GENCXXCLROBJECTS += $(2)
123 endef
124 define gb_LinkTarget_add_objcobject
125 $(call gb_LinkTarget_get_target,$(1)) : OBJCOBJECTS += $(2)
127 endef
128 define gb_LinkTarget_add_objcxxobject
129 $(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS += $(2)
131 endef
132 define gb_LinkTarget_add_cxxclrobject
133 $(call gb_LinkTarget_get_target,$(1)) : CXXCLROBJECTS += $(2)
135 endef
136 define gb_LinkTarget_add_scanners
137 $(call gb_LinkTarget_get_target,$(1)) : LEXOBJECTS += $(2)
139 endef
140 define gb_LinkTarget_add_grammars
141 $(call gb_LinkTarget_get_target,$(1)) : YACCOBJECTS += $(2)
143 endef
144 gb_LinkTarget_use_package =
145 gb_LinkTarget_use_generated_package =
146 gb_LinkTarget_add_sdi_headers =
147 gb_LinkTarget_use_external_project =
148 gb_LinkTarget__check_srcdir_paths =
149 gb_LinkTarget__command_objectlist = @true
150 gb_WinResTarget_WinResTarget_init =
151 gb_WinResTarget_set_rcfile =
152 gb_WinResTarget_add_defs =
153 gb_LinkTarget_set_nativeres =
154 gb_LinkTarget_add_nativeres =
155 gb_Library_set_componentfile =
156 gb_Library_add_componentimpl =
158 #$(call gb_Library_get_exports_target,%):
159 $(gb_Library_DLLDIR)/%.exports:
160 @true
162 define gb_LinkTarget__use_custom_headers
163 $(call gb_LinkTarget__add_include,$(1),$(gb_CustomTarget_workdir)/$(2))
165 endef
168 define gb_Module__add_target_impl
169 $(call gb_Module__read_targetfile,$(1),$(2),target)
171 $(call gb_Module_get_nonl10n_target,$(1)) : $(3)
173 endef
175 define gb_Module__add_check_target_impl
176 $(call gb_Module__read_targetfile,$(1),$(2),check target)
178 $(call gb_Module_get_check_target,$(1)) : $(3)
180 endef
182 define gb_Module_add_target
183 $(if $(filter Library_% Executable_% StaticLibrary_%,$(2)),$(call gb_Module__add_target_impl,$(1),$(2),$$(gb_Module_CURRENTTARGET)))
184 endef
186 define gb_Module_add_check_target
187 $(if $(filter CppunitTest_% Library_%,$(2)),$(call gb_Module__add_check_target_impl,$(1),$(2),$$(gb_Module_CURRENTTARGET)))
188 endef
190 gb_Module_add_l10n_target =
192 gb_GbuildToJson_DENYLISTEDMODULES :=
194 define gb_Module__add_moduledir_impl
195 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(notdir $(2)).mk
196 $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
197 gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
199 endef
201 define gb_Module_add_moduledir
202 $(if $(filter $(gb_GbuildToJson_DENYLISTEDMODULES),$(2)),,$(call gb_Module__add_moduledir_impl,$(1),$(2)))
204 endef
206 endif
208 # vim: set noet ts=4 sw=4: