bump product version to 7.2.5.1
[LibreOffice.git] / solenv / gbuild / extensions / post_GbuildToJson.mk
blob708de742fffb3b9fb05b7e8ad0fee68d0c5de8f5
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 # Reduce number of denylisted modules
25 ifneq ($(filter gbuildtojson,$(MAKECMDGOALS)),)
27 ifeq ($(MAKE_VERSION),3.81)
28 $(error make version 3.81 not supported for gbuildtojson; install newer make via LODE)
29 endif
31 # possibly recurse to ensure gbuildtojson was build before running the modded make
32 gb_GbuildToJson_prep := $(shell $(MAKE) -f $(SRCDIR)/solenv/Makefile Executable_gbuildtojson)
33 gb_FULLDEPS:=
35 gbuildtojson:
36 @true
39 gb_GbuildToJson_PHONY := $(WORKDIR)/GBUILDTOJSONPHONY
40 .PHONY : $(gb_GbuildToJson_PHONY)
41 $(gb_GbuildToJson_PHONY):
42 @true
46 define gb_LinkTarget__command
47 mkdir -p $(WORKDIR)/GbuildToJson/$(dir $(2))
48 mkdir -p $(WORKDIR)/LinkTarget/$(dir $(2))
49 $(if $(GBUILDTOJSON_LD_LIBRARY_PATH),LD_LIBRARY_PATH=$(GBUILDTOJSON_LD_LIBRARY_PATH)) \
50 $(call gb_Executable_get_command,gbuildtojson) \
51 --makefile=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_MAKEFILE)) \
52 --linktarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(2)) \
53 --ilibtarget=$(call var2file,$(shell $(gb_MKTEMP)),100,$(ILIBTARGET)) \
54 --cxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(CXXOBJECTS)) \
55 --yaccobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(YACCOBJECTS)) \
56 --objcobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(OBJCOBJECTS)) \
57 --objcxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(OBJCXXOBJECTS)) \
58 --cxxclrobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(CXXCLROBJECTS)) \
59 --asmobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(ASMOBJECTS)) \
60 --lexobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LEXOBJECTS)) \
61 --gencobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(GENCOBJECTS)) \
62 --gencxxobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(GENCXXOBJECTS)) \
63 --gencxxclrobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(GENCXXCLROBJECTS)) \
64 --cobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(COBJECTS)) \
65 --javaobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(JAVAOBJECTS)) \
66 --pythonobjects=$(call var2file,$(shell $(gb_MKTEMP)),100,$(PYTHONOBJECTS)) \
67 --cflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CFLAGS)) \
68 --cflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CFLAGS_APPEND)) \
69 --cxxflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXFLAGS)) \
70 --cxxflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXFLAGS_APPEND)) \
71 --objcflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCFLAGS)) \
72 --objcflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCFLAGS_APPEND)) \
73 --objcxxflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCXXFLAGS)) \
74 --objcxxflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_OBJCXXFLAGS_APPEND)) \
75 --cxxclrflags=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXCLRFLAGS)) \
76 --cxxclrflagsappend=$(call var2file,$(shell $(gb_MKTEMP)),100,$(T_CXXCLRFLAGS_APPEND)) \
77 --defs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(DEFS)) \
78 --include=$(call var2file,$(shell $(gb_MKTEMP)),100,$(INCLUDE)) \
79 --linked_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_LIBS)) \
80 --linked_static_libs=$(call var2file,$(shell $(gb_MKTEMP)),100,$(LINKED_STATIC_LIBS)) \
81 > $(WORKDIR)/GbuildToJson/$(2)
82 endef
84 define gb_Postprocess_register_target
85 gbuildtojson : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3)))
87 $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) $(gb_GbuildToJson_PHONY)
88 $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): T_MAKEFILE := $(lastword $(MAKEFILE_LIST))
89 endef
91 define gb_CppunitTest_register_target
92 gbuildtojson : $(call gb_LinkTarget_get_target,$(2))
94 $(call gb_LinkTarget_get_target,$(2)): $(gb_Helper_MISCDUMMY) $(gb_GbuildToJson_PHONY)
95 $(call gb_LinkTarget_get_target,$(2)): T_MAKEFILE := $(lastword $(MAKEFILE_LIST))
96 endef
98 gb_LinkTarget_use_static_libraries =
99 gb_UnoApiHeadersTarget_get_target = $(gb_Helper_MISCDUMMY)
100 gb_UnpackedTarball_get_final_target = $(gb_Helper_MISCDUMMY)
101 gb_LinkTarget__get_headers_check =
102 define gb_LinkTarget_add_cobject
103 $(call gb_LinkTarget_get_target,$(1)) : COBJECTS += $(2)
105 endef
106 define gb_LinkTarget_add_cxxobject_internal
107 $(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS += $(2)
109 endef
110 define gb_LinkTarget_add_generated_c_object
111 $(call gb_LinkTarget_get_target,$(1)) : GENCOBJECTS += $(2)
113 endef
114 define gb_LinkTarget_add_generated_cxx_object_internal
115 $(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS += $(2)
117 endef
118 define gb_LinkTarget_add_generated_cxxclrobject
119 $(call gb_LinkTarget_get_target,$(1)) : GENCXXCLROBJECTS += $(2)
121 endef
122 define gb_LinkTarget_add_objcobject
123 $(call gb_LinkTarget_get_target,$(1)) : OBJCOBJECTS += $(2)
125 endef
126 define gb_LinkTarget_add_objcxxobject
127 $(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS += $(2)
129 endef
130 define gb_LinkTarget_add_cxxclrobject
131 $(call gb_LinkTarget_get_target,$(1)) : CXXCLROBJECTS += $(2)
133 endef
134 define gb_LinkTarget_add_scanners
135 $(call gb_LinkTarget_get_target,$(1)) : LEXOBJECTS += $(2)
137 endef
138 define gb_LinkTarget_add_grammars
139 $(call gb_LinkTarget_get_target,$(1)) : YACCOBJECTS += $(2)
141 endef
142 gb_LinkTarget_use_package =
143 gb_LinkTarget_use_generated_package =
144 gb_LinkTarget_add_sdi_headers =
145 gb_LinkTarget_use_external_project =
146 gb_LinkTarget__check_srcdir_paths =
147 gb_LinkTarget__command_objectlist = @true
148 gb_WinResTarget_WinResTarget_init =
149 gb_WinResTarget_set_rcfile =
150 gb_WinResTarget_add_defs =
151 gb_LinkTarget_set_nativeres =
152 gb_LinkTarget_add_nativeres =
153 gb_Library_set_componentfile =
155 #$(call gb_Library_get_exports_target,%):
156 $(WORKDIR)/LinkTarget/Library/%.exports:
157 @true
159 define gb_LinkTarget__use_custom_headers
160 $(call gb_LinkTarget__add_include,$(1),$(call gb_CustomTarget_get_workdir,$(2)))
162 endef
165 define gb_Module__add_target_impl
166 $(call gb_Module__read_targetfile,$(1),$(2),target)
168 $(call gb_Module_get_nonl10n_target,$(1)) : $(3)
170 endef
172 define gb_Module__add_check_target_impl
173 $(call gb_Module__read_targetfile,$(1),$(2),check target)
175 $(call gb_Module_get_check_target,$(1)) : $(3)
177 endef
179 define gb_Module_add_target
180 $(if $(filter Library_% Executable_%,$(2)),$(call gb_Module__add_target_impl,$(1),$(2),$$(gb_Module_CURRENTTARGET)))
181 endef
183 define gb_Module_add_check_target
184 $(if $(filter CppunitTest_% Library_%,$(2)),$(call gb_Module__add_check_target_impl,$(1),$(2),$$(gb_Module_CURRENTTARGET)))
185 endef
187 gb_Module_add_l10n_target =
189 gb_GbuildToJson_DENYLISTEDMODULES := cli_ure jurt external
191 define gb_Module__add_moduledir_impl
192 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(notdir $(2)).mk
193 $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
194 gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
196 endef
198 define gb_Module_add_moduledir
199 $(if $(filter $(gb_GbuildToJson_DENYLISTEDMODULES),$(2)),,$(call gb_Module__add_moduledir_impl,$(1),$(2)))
201 endef
203 endif
205 # vim: set noet ts=4 sw=4: