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/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 # Overview of dependencies and tasks of Module
23 # target task depends on
24 # Module build the product all product targets
25 # excluding tests recursive Modules
26 # Module/unitcheck run unit tests all unit tests
27 # recursive Module/checks
28 # Module/slowcheck run all slow unit tests
29 # Module/screenshot create all screenshots
30 # Module/subsequentcheck run system tests all system tests
31 # Module/uicheck run uitests all uitests
32 # recursive Module/subsequentchecks
33 # build (global) build the product top-level Module
34 # unitcheck (global) run unit tests top-level Module/unitcheck
35 # slowcheck (global) run slow unit tests top-level Module/slowcheck
36 # screenshot (global) create all screenshots top-level Module/screenshot
37 # subsequentcheck (global) run system tests top-level Module/subsequentcheck
38 # perfcheck (global) run performance unit tests top-level Module/perfcheck
39 # uicheck (global) run the uitests run all uitests
44 gb_Module_ALLMODULES
:=
45 gb_Module_MODULELOCATIONS
:=
46 gb_Module_TARGETSTACK
:=
47 gb_Module_L10NTARGETSTACK
:=
48 gb_Module_CHECKTARGETSTACK
:=
49 gb_Module_SLOWCHECKTARGETSTACK
:=
50 gb_Module_SCREENSHOTTARGETSTACK
:=
51 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:=
52 gb_Module_STAGINGCHECKTARGETSTACK
:=
53 gb_Module_PERFCHECKTARGETSTACK
:=
54 gb_Module_UICHECKTARGETSTACK
:=
55 gb_Module_CLEANTARGETSTACK
:=
57 # The currently read gbuild makefile.
59 # gbuild classes should use this if they need to depend on their makefile
60 # (e.g., to make sure a zip file is rebuilt if files are removed from it).
61 # Because makefiles may include other makefiles, it is not safe to rely
62 # on $(MAKEFILE_LIST).
63 gb_Module_CURRENTMAKEFILE
:=
65 $(call gb_Module_get_nonl10n_target
,%) :
66 $(call gb_Output_announce
,$*,$(true
),BIN
,5)
67 $(call gb_Trace_MakeMark
,$*,BIN
)
68 -$(call gb_Helper_abbreviate_dirs
,\
69 mkdir
-p
$(dir $@
) && \
72 .PHONY
: $(call gb_Module_get_clean_target
,%)
73 $(call gb_Module_get_clean_target
,%) :
74 $(call gb_Output_announce
,$*,$(false
),MOD
,5)
75 $(call gb_Output_announce_title
,module
$* cleared.
)
76 -$(call gb_Helper_abbreviate_dirs
,\
77 rm -f
$(call gb_Module_get_target
,$*) $(call gb_Module_get_nonl10n_target
,$*) $(call gb_Module_get_l10n_target
,$*) $(call gb_Module_get_check_target
,$*) $(call gb_Module_get_slowcheck_target
,$*) $(call gb_Module_get_screenshot_target
,$*) $(call gb_Module_get_subsequentcheck_target
,$*) $(call gb_Module_get_perfcheck_target
,$*) $(call gb_Module_get_uicheck
,$*))
79 $(call gb_Module_get_l10n_target
,%) :
80 $(call gb_Output_announce
,$*,$(true
),LOC
,5)
81 $(call gb_Trace_MakeMark
,$*,LOC
)
82 $(call gb_Output_announce_title
,module
$* done.
)
83 -$(call gb_Helper_abbreviate_dirs
,\
84 mkdir
-p
$(dir $@
) && \
87 $(call gb_Module_get_check_target
,%) :
88 $(call gb_Output_announce
,$*,$(true
),CHK
,5)
89 $(call gb_Trace_MakeMark
,$*,CHK
)
90 $(call gb_Output_announce_title
,module
$* checks done.
)
91 -$(call gb_Helper_abbreviate_dirs
,\
92 mkdir
-p
$(dir $@
) && \
95 $(call gb_Module_get_slowcheck_target
,%) :
96 $(call gb_Output_announce
,$*,$(true
),SLC
,5)
97 $(call gb_Trace_MakeMark
,$*,SLC
)
98 $(call gb_Output_announce_title
,module
$* slowchecks done.
)
99 -$(call gb_Helper_abbreviate_dirs
,\
100 mkdir
-p
$(dir $@
) && \
103 $(call gb_Module_get_screenshot_target
,%) :
104 $(call gb_Output_announce
,$*,$(true
),SCR
,5)
105 $(call gb_Trace_MakeMark
,$*,SCR
)
106 $(call gb_Output_announce_title
,module
$* screenshots done.
)
107 -$(call gb_Helper_abbreviate_dirs
,\
108 mkdir
-p
$(dir $@
) && \
111 $(call gb_Module_get_subsequentcheck_target
,%) :
112 $(call gb_Output_announce
,$*,$(true
),SCK
,5)
113 $(call gb_Trace_MakeMark
,$*,SCK
)
114 $(call gb_Output_announce_title
,module
$* subsequentchecks done.
)
115 -$(call gb_Helper_abbreviate_dirs
,\
116 mkdir
-p
$(dir $@
) && \
119 $(call gb_Module_get_stagingcheck_target
,%) :
120 $(call gb_Output_announce
,$*,$(true
),STC
,5)
121 $(call gb_Trace_MakeMark
,$*,STC
)
122 $(call gb_Output_announce_title
,module
$* stagingchecks done.
)
123 -$(call gb_Helper_abbreviate_dirs
,\
124 mkdir
-p
$(dir $@
) && \
127 $(call gb_Module_get_perfcheck_target
,%) :
128 $(call gb_Output_announce
,$*,$(true
),PFC
,5)
129 $(call gb_Trace_MakeMark
,$*,PFC
)
130 $(call gb_Output_announce_title
,module
$* perfchecks done.
)
131 -$(call gb_Helper_abbreviate_dirs
,\
132 mkdir
-p
$(dir $@
) && \
135 $(call gb_Module_get_uicheck_target
,%) :
136 $(call gb_Output_announce
,$*,$(true
),UIT
,5)
137 $(call gb_Trace_MakeMark
,$*,UIT
)
138 $(call gb_Output_announce_title
,module
$* uicheck done.
)
139 -$(call gb_Helper_abbreviate_dirs
,\
140 mkdir
-p
$(dir $@
) && \
143 $(call gb_Module_get_target
,%) :
144 $(call gb_Output_announce
,$*,$(true
),MOD
,5)
145 $(call gb_Trace_MakeMark
,$*,MOD
)
146 $(call gb_Output_announce_title
,module
$* done.
)
147 -$(call gb_Helper_abbreviate_dirs
,\
148 mkdir
-p
$(dir $@
) && \
151 .PHONY
: build build-l10n-only build-non-l10n-only unitcheck slowcheck screenshot subsequentcheck stagingcheck perfcheck uicheck
clean check debugrun help showmodules translations
152 .DEFAULT_GOAL
:= build
154 ifeq ($(gb_Side
),build
)
155 build-tools
: $(gb_BUILD_TOOLS
)
156 $(call gb_Output_announce
,loaded tools
: $(gb_BUILD_TOOLS
),$(true
),ALL
,6)
157 $(call gb_Trace_MakeMark
,$(gb_BUILD_TOOLS
),ALL
)
158 $(call gb_Output_announce_title
,build-tools done.
)
159 $(call gb_Output_announce_bell
)
163 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),ALL
,6)
164 $(call gb_Trace_MakeMark
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),ALL
)
165 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),ALL
,6))
166 $(call gb_Output_announce_title
,build done.
)
167 $(call gb_Output_announce_bell
)
170 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),LOC
,6)
171 $(call gb_Trace_MakeMark
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),LOC
)
172 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),LOC
,6))
173 $(call gb_Output_announce_title
,l10n done.
)
174 $(call gb_Output_announce_bell
)
176 build-non-l10n-only
:
177 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),BIN
,6)
178 $(call gb_Trace_MakeMark
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),BIN
)
179 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),BIN
,6))
180 $(call gb_Output_announce_title
,non-l10n done.
)
181 $(call gb_Output_announce_bell
)
184 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),CHK
,6))
185 $(call gb_Output_announce_title
,all unittests checked.
)
186 $(call gb_Output_announce_bell
)
189 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SLC
,6))
190 $(call gb_Output_announce_title
,all slowtests checked.
)
191 $(call gb_Output_announce_bell
)
194 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SCR
,6))
195 $(call gb_Output_announce_title
,all screenshots checked.
)
196 $(call gb_Output_announce_bell
)
198 # removing the dependency on build for now until we can make a full build with gbuild
199 #subsequentcheck : build
201 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SCK
,6))
202 $(call gb_Output_announce_title
,all subsequent tests checked.
)
203 $(call gb_Output_announce_bell
)
206 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),STC
,6))
207 $(call gb_Output_announce_title
,all staging tests checked.
)
208 $(call gb_Output_announce_bell
)
211 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),PFC
,6))
212 $(call gb_Output_announce_title
,all perftests checked.
)
213 $(call gb_Output_announce_bell
)
216 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),UIT
,6))
217 $(call gb_Output_announce_title
,all uicheck checked.
)
218 $(call gb_Output_announce_bell
)
221 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,top level modules
: $(foreach module
,$^
,$(notdir $(module
))),$(false
),ALL
,6))
222 $(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(false
),ALL
,6)
223 $(call gb_Output_announce_title
,all cleared.
)
224 $(call gb_Output_announce_bell
)
226 check : unitcheck slowcheck
227 $(call gb_Output_announce_title
,all tests checked.
)
228 $(call gb_Output_announce_bell
)
231 export HEADLESS
= && \
232 $(if
$(filter svp
,$(SAL_USE_VCLPLUGIN
)),unset SAL_USE_VCLPLUGIN
&&) \
233 $(call gb_Module_DEBUGRUNCOMMAND
)
236 @cat
$(SRCDIR
)/solenv
/gbuild
/gbuild.help.txt
239 $(info $(strip $(gb_Module_ALLMODULES
)))
242 translations
: $(WORKDIR
)/pot.done
244 $(WORKDIR
)/pot.done
: $(foreach exec
,cfgex helpex localize propex ulfex xrmex treex
, \
245 $(call gb_Executable_get_target_for_build
,$(exec
)))
246 $(call gb_Output_announce
,$(subst .pot
,,$(subst $(WORKDIR
)/,,$@
)),$(true
),POT
,1)
247 $(call gb_Trace_MakeMark
,$(subst .pot
,,$(subst $(WORKDIR
)/,,$@
)),POT
)
248 $(call gb_Helper_abbreviate_dirs
,\
249 mkdir
-p
$(dir $@
) && $(call gb_Helper_execute
,localize
) $(SRCDIR
) $(dir $@
)/pot \
250 && $(FIND
) $(dir $@
)/pot
-type f
-printf
"%P\n" | sed
-e
"s/\.pot/.po/" | LC_ALL
=C
$(SORT
) > $(dir $@
)/LIST \
253 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
254 gb_Module__symbols_enabled
= \
255 $(and
$(if
$(filter -$(1)/,$(gb_ENABLE_SYMBOLS_FOR
)),,$(true
)),\
256 $(filter all $(1)/,$(gb_ENABLE_SYMBOLS_FOR
)))
258 define gb_Module_Module
259 gb_Module_ALLMODULES
+= $(1)
260 gb_Module_MODULELOCATIONS
+= $(1):$(dir $(realpath
$(lastword
$(MAKEFILE_LIST
))))
261 gb_Module_TARGETSTACK
:= $(call gb_Module_get_target
,$(1)) $(gb_Module_TARGETSTACK
)
262 gb_Module_L10NTARGETSTACK
:= $(call gb_Module_get_l10n_target
,$(1)) $(gb_Module_L10NTARGETSTACK
)
263 gb_Module_CHECKTARGETSTACK
:= $(call gb_Module_get_check_target
,$(1)) $(gb_Module_CHECKTARGETSTACK
)
264 gb_Module_SLOWCHECKTARGETSTACK
:= $(call gb_Module_get_slowcheck_target
,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK
)
265 gb_Module_SCREENSHOTTARGETSTACK
:= $(call gb_Module_get_screenshot_target
,$(1)) $(gb_Module_SCREENSHOTTARGETSTACK
)
266 gb_Module_UICHECKTARGETSTACK
:= $(call gb_Module_get_uicheck_target
,$(1)) $(gb_Module_UICHECKTARGETSTACK
)
267 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $(call gb_Module_get_subsequentcheck_target
,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)
268 gb_Module_STAGINGCHECKTARGETSTACK
:= $(call gb_Module_get_stagingcheck_target
,$(1)) $(gb_Module_STAGINGCHECKTARGETSTACK
)
269 gb_Module_PERFCHECKTARGETSTACK
:= $(call gb_Module_get_perfcheck_target
,$(1)) $(gb_Module_PERFCHECKTARGETSTACK
)
270 gb_Module_CLEANTARGETSTACK
:= $(call gb_Module_get_clean_target
,$(1)) $(gb_Module_CLEANTARGETSTACK
)
271 gb_Module_CURRENTMODULE_SYMBOLS_ENABLED
:= $(call gb_Module__symbols_enabled
,$(1))
272 gb_Module_CURRENTMODULE_NAME
:= $(1)
273 $(call gb_Helper_make_userfriendly_targets
,$(1),Module
)
274 $(if
$(filter-out libreoffice instsetoo_native android ios
,$(1)),\
275 $(call gb_Postprocess_register_target
,AllModulesButInstsetNative
,Module
,$(1)))
277 $(call gb_Postprocess_get_target
,AllModuleTests
) : $(call gb_Module_get_check_target
,$(1))
278 $(call gb_Postprocess_get_target
,AllModuleSlowtests
) : $(call gb_Module_get_slowcheck_target
,$(1))
279 $(call gb_Postprocess_get_target
,AllModuleScreenshots
) : $(call gb_Module_get_screenshot_target
,$(1))
280 $(call gb_Postprocess_get_target
,AllModuleUITest
) : $(call gb_Module_get_uicheck_target
,$(1))
284 # This is called inside the included file and pushes one target on each stack.
285 # This has to be called with full late evaluation ($$(eval $$(call ))) and
286 # should never be inlined ($(call )) as the calls defining it might be sourced
288 define gb_Module_register_target
289 gb_Module_CURRENTTARGET
:= $(1)
290 gb_Module_CURRENTCLEANTARGET
:= $(2)
294 # Here we include the file (in it there will be a call to gb_Module_register_target)
295 define gb_Module__read_targetfile
296 gb_Module_CURRENTTARGET
:=
297 gb_Module_CURRENTCLEANTARGET
:=
298 gb_Module_CURRENTMAKEFILE
:= $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
299 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
300 gb_Module_CURRENTMAKEFILE
:=
301 ifneq ($$(words $$(gb_Module_CURRENTTARGET
)) $$(words $$(gb_Module_CURRENTCLEANTARGET
)),1 1)
302 $$(eval
$$(call gb_Output_error
,No
$(3) registered while reading
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
!))
307 define gb_Module_add_target
308 $(if
$(filter AllLang
% Dictionary
% Package_registry
,$(2)),$(warning target
$(2) should be a l10n target
))
309 $(call gb_Module__read_targetfile
,$(1),$(2),target
)
311 $(call gb_Module_get_nonl10n_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
312 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
316 define gb_Module_add_l10n_target
317 $(if
$(filter AllLang
% CustomTarget_autotextshare Dictionary
% Package_registry
,$(2)),,$(warning target
$(2) should not be a l10n target
))
318 $(call gb_Module__read_targetfile
,$(1),$(2),target
)
320 $(call gb_Module_get_l10n_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
321 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
325 define gb_Module_add_check_target
326 $(call gb_Module__read_targetfile
,$(1),$(2),check target
)
328 $(call gb_Module_get_check_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
329 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
333 define gb_Module_add_slowcheck_target
334 $(call gb_Module__read_targetfile
,$(1),$(2),slowcheck target
)
336 $(call gb_Module_get_slowcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
337 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
341 define gb_Module_add_screenshot_target
342 $(call gb_Module__read_targetfile
,$(1),$(2),screenshot target
)
344 $(call gb_Module_get_screenshot_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
345 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
349 # has order dependency on AllModulesButInstsetNative to be able to run
350 # subsequentcheck in the same make process on "make check"
351 define gb_Module_add_subsequentcheck_target
352 $(call gb_Module__read_targetfile
,$(1),$(2),subsequentcheck target
)
354 $(call gb_Module_get_subsequentcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
355 $$(gb_Module_CURRENTTARGET
) :| \
356 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
357 $(call gb_Package_get_target
,instsetoo_native_setup
) \
358 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
359 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
363 define gb_Module_add_stagingcheck_target
364 $(info adding stagingcheck
$(1) $(2))
365 $(call gb_Module__read_targetfile
,$(1),$(2),stagingcheck target
)
367 $(call gb_Module_get_stagingcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
368 $$(gb_Module_CURRENTTARGET
) :| \
369 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
370 $(call gb_Package_get_target
,instsetoo_native_setup
) \
371 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
372 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
376 define gb_Module_add_perfcheck_target
377 $(call gb_Module__read_targetfile
,$(1),$(2),perfcheck target
)
379 $(call gb_Module_get_perfcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
380 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
384 define gb_Module_add_uicheck_target
385 $(call gb_Module__read_targetfile
,$(1),$(2),uicheck target
)
387 $(call gb_Module_get_uicheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
388 $$(gb_Module_CURRENTTARGET
) :| \
389 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
390 $(call gb_Package_get_target
,instsetoo_native_setup
) \
391 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
392 $(call gb_Module_get_uicheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
393 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
397 define gb_Module__modulefile
398 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))/$(2)/Module_
$(2).mk
401 define gb_Module_add_moduledir
402 $(if
$(wildcard $(call gb_Module__modulefile
,$(1),$(2))),,$(call gb_Output_error
,Module does not exist
: $(call gb_Module__modulefile
,$(1),$(2))))
403 include $(call gb_Module__modulefile
,$(1),$(2))
404 $(call gb_Module_get_target
,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK
))
405 $(call gb_Module_get_l10n_target
,$(1)) : $$(firstword $$(gb_Module_L10NTARGETSTACK
))
406 $(call gb_Module_get_check_target
,$(1)) : $$(firstword $$(gb_Module_CHECKTARGETSTACK
))
407 $(call gb_Module_get_slowcheck_target
,$(1)) : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK
))
408 $(call gb_Module_get_screenshot_target
,$(1)) : $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK
))
409 $(call gb_Module_get_subsequentcheck_target
,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
410 $(call gb_Module_get_stagingcheck_target
,$(1)) : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK
))
411 $(call gb_Module_get_perfcheck_target
,$(1)) : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK
))
412 $(call gb_Module_get_uicheck_target
,$(1)) : $$(firstword $$(gb_Module_UICHECKTARGETSTACK
))
413 $(call gb_Module_get_clean_target
,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK
))
414 gb_Module_TARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_TARGETSTACK
)),$$(gb_Module_TARGETSTACK
))
415 gb_Module_L10NTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_L10NTARGETSTACK
)),$$(gb_Module_L10NTARGETSTACK
))
416 gb_Module_CHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CHECKTARGETSTACK
)),$$(gb_Module_CHECKTARGETSTACK
))
417 gb_Module_SLOWCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK
)),$$(gb_Module_SLOWCHECKTARGETSTACK
))
418 gb_Module_SCREENSHOTTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK
)),$$(gb_Module_SCREENSHOTTARGETSTACK
))
419 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
420 gb_Module_STAGINGCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK
)),$$(gb_Module_STAGINGCHECKTARGETSTACK
))
421 gb_Module_PERFCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK
)),$$(gb_Module_PERFCHECKTARGETSTACK
))
422 gb_Module_UICHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_UICHECKTARGETSTACK
)),$$(gb_Module_UICHECKTARGETSTACK
))
423 gb_Module_CLEANTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CLEANTARGETSTACK
)),$$(gb_Module_CLEANTARGETSTACK
))
427 define gb_Module_add_targets
428 $(call gb_Module_get_target
,$(1)) : $(call gb_Module_get_nonl10n_target
,$(1))
429 $(foreach target
,$(2),$(call gb_Module_add_target
,$(1),$(target
)))
433 define gb_Module_add_l10n_targets
434 $(call gb_Module_get_target
,$(1)) : $(call gb_Module_get_l10n_target
,$(1))
435 $(foreach target
,$(2),$(call gb_Module_add_l10n_target
,$(1),$(target
)))
439 gb_Module_add_targets_for_build
= $(call gb_Module_add_targets
,$(1),$(2))
441 define gb_Module_add_check_targets
442 $(foreach target
,$(2),$(call gb_Module_add_check_target
,$(1),$(target
)))
446 define gb_Module_add_slowcheck_targets
447 $(foreach target
,$(2),$(call gb_Module_add_slowcheck_target
,$(1),$(target
)))
451 define gb_Module_add_screenshot_targets
452 $(foreach target
,$(2),$(call gb_Module_add_screenshot_target
,$(1),$(target
)))
456 define gb_Module_add_subsequentcheck_targets
457 $(foreach target
,$(2),$(call gb_Module_add_subsequentcheck_target
,$(1),$(target
)))
461 define gb_Module_add_stagingcheck_targets
462 $(foreach target
,$(2),$(call gb_Module_add_stagingcheck_target
,$(1),$(target
)))
466 define gb_Module_add_perfcheck_targets
467 $(foreach target
,$(2),$(call gb_Module_add_perfcheck_target
,$(1),$(target
)))
471 define gb_Module_add_moduledirs
472 $(foreach target
,$(sort $(2)),$(call gb_Module_add_moduledir
,$(1),$(target
)))
476 define gb_Module_add_uicheck_targets
477 $(foreach target
,$(2),$(call gb_Module_add_uicheck_target
,$(1),$(target
)))
481 define gb_Module_make_global_targets
482 ifneq ($$(gb_Module_TARGETSTACK
),)
483 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
!1))
488 build
: build-non-l10n-only build-l10n-only
489 build-non-l10n-only
: $$(firstword $$(gb_Module_TARGETSTACK
))
490 build-l10n-only
: $$(firstword $$(gb_Module_L10NTARGETSTACK
))
491 unitcheck
: $$(firstword $$(gb_Module_CHECKTARGETSTACK
))
492 slowcheck
: $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK
))
493 screenshot
: $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK
))
494 ifeq ($(WINDOWS_BUILD_SIGNING
),TRUE
)
495 screenshot
: $(call gb_CustomTarget_get_workdir
,postprocess
/signing
)/signing.done
497 subsequentcheck
: $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
498 stagingcheck
: $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK
))
499 perfcheck
: $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK
))
500 uicheck
: build
$$(firstword $$(gb_Module_UICHECKTARGETSTACK
))
501 clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK
))
503 ifneq ($$(words $$(gb_Module_TARGETSTACK
)),1)
504 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
! $(gb_Module_TARGETSTACK
)))
507 gb_Module_TARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_TARGETSTACK
)),$$(gb_Module_TARGETSTACK
))
508 gb_Module_L10NTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_L10NTARGETSTACK
)),$$(gb_Module_L10NTARGETSTACK
))
509 gb_Module_CHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CHECKTARGETSTACK
)),$$(gb_Module_CHECKTARGETSTACK
))
510 gb_Module_SLOWCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK
)),$$(gb_Module_SLOWCHECKTARGETSTACK
))
511 gb_Module_SCREENSHOTTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK
)),$$(gb_Module_SCREENSHOTTARGETSTACK
))
512 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
513 gb_Module_UICHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_UICHECKTARGETSTACK
)),$$(gb_Module_UICHECKTARGETSTACK
))
514 gb_Module_STAGINGCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK
)),$$(gb_Module_STAGINGCHECKTARGETSTACK
))
515 gb_Module_PERFCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK
)),$$(gb_Module_PERFCHECKTARGETSTACK
))
516 gb_Module_CLEANTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CLEANTARGETSTACK
)),$$(gb_Module_CLEANTARGETSTACK
))
518 ifneq ($$(and
$$(gb_Module_TARGETSTACK
),$$(gb_Module_CHECKTARGETSTACK
),$$(gb_Module_SLOWCHECKTARGETSTACK
),$$(gb_Module_SCREENSHOTTARGETSTACK
),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
),$$(gb_Module_UICHECKTARGETSTACK
),$$(gb_Module_STAGINGCHECKTARGETSTACK
),$$(gb_Module_PERFCHECKTARGETSTACK
),$$(gb_Module_L10NTARGETSTACK
)),)
519 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
!3))
522 $$(eval
$$(gb_Extensions_final_hook
))
525 # vim: set noet sw=4: