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