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
40 # all (global) default goal build unitcheck
45 gb_Module_ALLMODULES
:=
46 gb_Module_MODULELOCATIONS
:=
47 gb_Module_TARGETSTACK
:=
48 gb_Module_L10NTARGETSTACK
:=
49 gb_Module_CHECKTARGETSTACK
:=
50 gb_Module_SLOWCHECKTARGETSTACK
:=
51 gb_Module_SCREENSHOTTARGETSTACK
:=
52 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:=
53 gb_Module_STAGINGCHECKTARGETSTACK
:=
54 gb_Module_PERFCHECKTARGETSTACK
:=
55 gb_Module_UICHECKTARGETSTACK
:=
56 gb_Module_CLEANTARGETSTACK
:=
58 # The currently read gbuild makefile.
60 # gbuild classes should use this if they need to depend on their makefile
61 # (e.g., to make sure a zip file is rebuilt if files are removed from it).
62 # Because makefiles may include other makefiles, it is not safe to rely
63 # on $(MAKEFILE_LIST).
64 gb_Module_CURRENTMAKEFILE
:=
66 $(call gb_Module_get_nonl10n_target
,%) :
67 $(call gb_Output_announce
,$*,$(true
),BIN
,5)
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_Output_announce_title
,module
$* done.
)
82 -$(call gb_Helper_abbreviate_dirs
,\
83 mkdir
-p
$(dir $@
) && \
86 $(call gb_Module_get_check_target
,%) :
87 $(call gb_Output_announce
,$*,$(true
),CHK
,5)
88 $(call gb_Output_announce_title
,module
$* checks done.
)
89 -$(call gb_Helper_abbreviate_dirs
,\
90 mkdir
-p
$(dir $@
) && \
93 $(call gb_Module_get_slowcheck_target
,%) :
94 $(call gb_Output_announce
,$*,$(true
),SLC
,5)
95 $(call gb_Output_announce_title
,module
$* slowchecks done.
)
96 -$(call gb_Helper_abbreviate_dirs
,\
97 mkdir
-p
$(dir $@
) && \
100 $(call gb_Module_get_screenshot_target
,%) :
101 $(call gb_Output_announce
,$*,$(true
),SCR
,5)
102 $(call gb_Output_announce_title
,module
$* screenshots done.
)
103 -$(call gb_Helper_abbreviate_dirs
,\
104 mkdir
-p
$(dir $@
) && \
107 $(call gb_Module_get_subsequentcheck_target
,%) :
108 $(call gb_Output_announce
,$*,$(true
),SCK
,5)
109 $(call gb_Output_announce_title
,module
$* subsequentchecks done.
)
110 -$(call gb_Helper_abbreviate_dirs
,\
111 mkdir
-p
$(dir $@
) && \
114 $(call gb_Module_get_stagingcheck_target
,%) :
115 $(call gb_Output_announce
,$*,$(true
),STC
,5)
116 $(call gb_Output_announce_title
,module
$* stagingchecks done.
)
117 -$(call gb_Helper_abbreviate_dirs
,\
118 mkdir
-p
$(dir $@
) && \
121 $(call gb_Module_get_perfcheck_target
,%) :
122 $(call gb_Output_announce
,$*,$(true
),PFC
,5)
123 $(call gb_Output_announce_title
,module
$* perfchecks done.
)
124 -$(call gb_Helper_abbreviate_dirs
,\
125 mkdir
-p
$(dir $@
) && \
128 $(call gb_Module_get_uicheck_target
,%) :
129 $(call gb_Output_announce
,$*,$(true
),UIT
,5)
130 $(call gb_Output_announce_title
,module
$* uicheck done.
)
131 -$(call gb_Helper_abbreviate_dirs
,\
132 mkdir
-p
$(dir $@
) && \
135 $(call gb_Module_get_target
,%) :
136 $(call gb_Output_announce
,$*,$(true
),MOD
,5)
137 $(call gb_Output_announce_title
,module
$* done.
)
138 -$(call gb_Helper_abbreviate_dirs
,\
139 mkdir
-p
$(dir $@
) && \
142 .PHONY
: all build build-l10n-only build-non-l10n-only unitcheck slowcheck screenshot subsequentcheck stagingcheck perfcheck uicheck
clean check debugrun help showmodules translations
145 all : build
$(if
$(CROSS_COMPILING
),,unitcheck
$(if
$(gb_PARTIAL_BUILD
),,slowcheck
))
147 ifeq ($(gb_Side
),build
)
148 build-tools
: $(gb_BUILD_TOOLS
)
149 $(call gb_Output_announce
,loaded tools
: $(gb_BUILD_TOOLS
),$(true
),ALL
,6)
150 $(call gb_Output_announce_title
,build-tools done.
)
151 $(call gb_Output_announce_bell
)
155 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),ALL
,6)
156 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),ALL
,6))
157 $(call gb_Output_announce_title
,build done.
)
158 $(call gb_Output_announce_bell
)
161 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),LOC
,6)
162 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),LOC
,6))
163 $(call gb_Output_announce_title
,l10n done.
)
164 $(call gb_Output_announce_bell
)
166 build-non-l10n-only
:
167 $(call gb_Output_announce
,top level modules
: $(foreach module
,$(filter-out deliverlog
$(WORKDIR
)/bootstrap
,$^
),$(notdir $(module
))),$(true
),BIN
,6)
168 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),BIN
,6))
169 $(call gb_Output_announce_title
,non-l10n done.
)
170 $(call gb_Output_announce_bell
)
173 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),CHK
,6))
174 $(call gb_Output_announce_title
,all unittests checked.
)
175 $(call gb_Output_announce_bell
)
178 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SLC
,6))
179 $(call gb_Output_announce_title
,all slowtests checked.
)
180 $(call gb_Output_announce_bell
)
183 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SCR
,6))
184 $(call gb_Output_announce_title
,all screenshots checked.
)
185 $(call gb_Output_announce_bell
)
187 # removing the dependency on build for now until we can make a full build with gbuild
188 #subsequentcheck : all
190 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),SCK
,6))
191 $(call gb_Output_announce_title
,all subsequent tests checked.
)
192 $(call gb_Output_announce_bell
)
195 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),STC
,6))
196 $(call gb_Output_announce_title
,all staging tests checked.
)
197 $(call gb_Output_announce_bell
)
200 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),PFC
,6))
201 $(call gb_Output_announce_title
,all perftests checked.
)
202 $(call gb_Output_announce_bell
)
205 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(true
),UIT
,6))
206 $(call gb_Output_announce_title
,all uicheck checked.
)
207 $(call gb_Output_announce_bell
)
210 $(if
$(gb_VERBOSE
),$(call gb_Output_announce
,top level modules
: $(foreach module
,$^
,$(notdir $(module
))),$(false
),ALL
,6))
211 $(call gb_Output_announce
,loaded modules
: $(sort $(gb_Module_ALLMODULES
)),$(false
),ALL
,6)
212 $(call gb_Output_announce_title
,all cleared.
)
213 $(call gb_Output_announce_bell
)
215 check : unitcheck slowcheck
216 $(call gb_Output_announce_title
,all tests checked.
)
217 $(call gb_Output_announce_bell
)
220 $(call gb_Module_DEBUGRUNCOMMAND
)
223 @cat
$(SRCDIR
)/solenv
/gbuild
/gbuild.help.txt
226 $(info $(strip $(gb_Module_ALLMODULES
)))
229 translations
: $(WORKDIR
)/pot.done
231 $(WORKDIR
)/pot.done
: $(foreach exec
,cfgex helpex localize propex ulfex xrmex treex
, \
232 $(call gb_Executable_get_target_for_build
,$(exec
)))
233 $(call gb_Output_announce
,$(subst .pot
,,$(subst $(WORKDIR
)/,,$@
)),$(true
),POT
,1)
234 $(call gb_Helper_abbreviate_dirs
,\
235 mkdir
-p
$(dir $@
) && $(call gb_Helper_execute
,localize
) $(SRCDIR
) $(dir $@
)/pot \
236 && $(FIND
) $(dir $@
)/pot
-type f
-printf
"%P\n" | sed
-e
"s/\.pot/.po/" > $(dir $@
)/LIST \
239 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
240 gb_Module__debug_enabled
= \
241 $(and
$(if
$(filter -$(1)/,$(ENABLE_DEBUGINFO_FOR
)),,$(true
)),\
242 $(filter all $(1)/,$(ENABLE_DEBUGINFO_FOR
)))
244 define gb_Module_Module
245 gb_Module_ALLMODULES
+= $(1)
246 gb_Module_MODULELOCATIONS
+= $(1):$(dir $(realpath
$(lastword
$(MAKEFILE_LIST
))))
247 gb_Module_TARGETSTACK
:= $(call gb_Module_get_target
,$(1)) $(gb_Module_TARGETSTACK
)
248 gb_Module_L10NTARGETSTACK
:= $(call gb_Module_get_l10n_target
,$(1)) $(gb_Module_L10NTARGETSTACK
)
249 gb_Module_CHECKTARGETSTACK
:= $(call gb_Module_get_check_target
,$(1)) $(gb_Module_CHECKTARGETSTACK
)
250 gb_Module_SLOWCHECKTARGETSTACK
:= $(call gb_Module_get_slowcheck_target
,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK
)
251 gb_Module_SCREENSHOTTARGETSTACK
:= $(call gb_Module_get_screenshot_target
,$(1)) $(gb_Module_SCREENSHOTTARGETSTACK
)
252 gb_Module_UICHECKTARGETSTACK
:= $(call gb_Module_get_uicheck_target
,$(1)) $(gb_Module_UICHECKTARGETSTACK
)
253 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $(call gb_Module_get_subsequentcheck_target
,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)
254 gb_Module_STAGINGCHECKTARGETSTACK
:= $(call gb_Module_get_stagingcheck_target
,$(1)) $(gb_Module_STAGINGCHECKTARGETSTACK
)
255 gb_Module_PERFCHECKTARGETSTACK
:= $(call gb_Module_get_perfcheck_target
,$(1)) $(gb_Module_PERFCHECKTARGETSTACK
)
256 gb_Module_CLEANTARGETSTACK
:= $(call gb_Module_get_clean_target
,$(1)) $(gb_Module_CLEANTARGETSTACK
)
257 gb_Module_CURRENTMODULE_DEBUG_ENABLED
:= $(call gb_Module__debug_enabled
,$(1))
258 gb_Module_CURRENTMODULE_NAME
:= $(1)
259 $(call gb_Helper_make_userfriendly_targets
,$(1),Module
)
260 $(if
$(filter-out libreoffice instsetoo_native android ios
,$(1)),\
261 $(call gb_Postprocess_register_target
,AllModulesButInstsetNative
,Module
,$(1)))
263 $(call gb_Postprocess_get_target
,AllModuleTests
) : $(call gb_Module_get_check_target
,$(1))
264 $(call gb_Postprocess_get_target
,AllModuleSlowtests
) : $(call gb_Module_get_slowcheck_target
,$(1))
265 $(call gb_Postprocess_get_target
,AllModuleScreenshots
) : $(call gb_Module_get_screenshot_target
,$(1))
266 $(call gb_Postprocess_get_target
,AllModuleUITest
) : $(call gb_Module_get_uicheck_target
,$(1))
270 # This is called inside the included file and pushes one target on each stack.
271 # This has to be called with full late evaluation ($$(eval $$(call ))) and
272 # should never be inlined ($(call )) as the calls defining it might be sourced
274 define gb_Module_register_target
275 gb_Module_CURRENTTARGET
:= $(1)
276 gb_Module_CURRENTCLEANTARGET
:= $(2)
280 # Here we include the file (in it there will be a call to gb_Module_register_target)
281 define gb_Module__read_targetfile
282 gb_Module_CURRENTTARGET
:=
283 gb_Module_CURRENTCLEANTARGET
:=
284 gb_Module_CURRENTMAKEFILE
:= $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
285 include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
286 gb_Module_CURRENTMAKEFILE
:=
287 ifneq ($$(words $$(gb_Module_CURRENTTARGET
)) $$(words $$(gb_Module_CURRENTCLEANTARGET
)),1 1)
288 $$(eval
$$(call gb_Output_error
,No
$(3) registered while reading
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))$(2).mk
!))
293 define gb_Module_add_target
294 $(if
$(filter AllLang
% Dictionary
% Package_registry
,$(2)),$(warning target
$(2) should be a l10n target
))
295 $(call gb_Module__read_targetfile
,$(1),$(2),target
)
297 $(call gb_Module_get_nonl10n_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
298 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
302 define gb_Module_add_l10n_target
303 $(if
$(filter AllLang
% CustomTarget_autotextshare Dictionary
% Package_registry
,$(2)),,$(warning target
$(2) should not be a l10n target
))
304 $(call gb_Module__read_targetfile
,$(1),$(2),target
)
306 $(call gb_Module_get_l10n_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
307 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
311 define gb_Module_add_check_target
312 $(call gb_Module__read_targetfile
,$(1),$(2),check target
)
314 $(call gb_Module_get_check_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
315 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
319 define gb_Module_add_slowcheck_target
320 $(call gb_Module__read_targetfile
,$(1),$(2),slowcheck target
)
322 $(call gb_Module_get_slowcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
323 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
327 define gb_Module_add_screenshot_target
328 $(call gb_Module__read_targetfile
,$(1),$(2),screenshot target
)
330 $(call gb_Module_get_screenshot_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
331 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
335 # has order dependency on AllModulesButInstsetNative to be able to run
336 # subsequentcheck in the same make process on "make check"
337 define gb_Module_add_subsequentcheck_target
338 $(call gb_Module__read_targetfile
,$(1),$(2),subsequentcheck target
)
340 $(call gb_Module_get_subsequentcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
341 $$(gb_Module_CURRENTTARGET
) :| \
342 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
343 $(call gb_Package_get_target
,instsetoo_native_setup
) \
344 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
345 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
349 define gb_Module_add_stagingcheck_target
350 $(info adding stagingcheck
$(1) $(2))
351 $(call gb_Module__read_targetfile
,$(1),$(2),stagingcheck target
)
353 $(call gb_Module_get_stagingcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
354 $$(gb_Module_CURRENTTARGET
) :| \
355 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
356 $(call gb_Package_get_target
,instsetoo_native_setup
) \
357 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
358 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
362 define gb_Module_add_perfcheck_target
363 $(call gb_Module__read_targetfile
,$(1),$(2),perfcheck target
)
365 $(call gb_Module_get_perfcheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
366 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
370 define gb_Module_add_uicheck_target
371 $(call gb_Module__read_targetfile
,$(1),$(2),uicheck target
)
373 $(call gb_Module_get_uicheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
374 $$(gb_Module_CURRENTTARGET
) :| \
375 $(call gb_Postprocess_get_target
,AllModulesButInstsetNative
) \
376 $(call gb_Package_get_target
,instsetoo_native_setup
) \
377 $(call gb_Package_get_target
,instsetoo_native_setup_ure
)
378 $(call gb_Module_get_uicheck_target
,$(1)) : $$(gb_Module_CURRENTTARGET
)
379 $(call gb_Module_get_clean_target
,$(1)) : $$(gb_Module_CURRENTCLEANTARGET
)
383 define gb_Module__modulefile
384 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS
)))/$(2)/Module_
$(2).mk
387 define gb_Module_add_moduledir
388 $(if
$(wildcard $(call gb_Module__modulefile
,$(1),$(2))),,$(call gb_Output_error
,Module does not exist
: $(call gb_Module__modulefile
,$(1),$(2))))
389 include $(call gb_Module__modulefile
,$(1),$(2))
390 $(call gb_Module_get_target
,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK
))
391 $(call gb_Module_get_l10n_target
,$(1)) : $$(firstword $$(gb_Module_L10NTARGETSTACK
))
392 $(call gb_Module_get_check_target
,$(1)) : $$(firstword $$(gb_Module_CHECKTARGETSTACK
))
393 $(call gb_Module_get_slowcheck_target
,$(1)) : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK
))
394 $(call gb_Module_get_screenshot_target
,$(1)) : $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK
))
395 $(call gb_Module_get_subsequentcheck_target
,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
396 $(call gb_Module_get_stagingcheck_target
,$(1)) : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK
))
397 $(call gb_Module_get_perfcheck_target
,$(1)) : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK
))
398 $(call gb_Module_get_uicheck_target
,$(1)) : $$(firstword $$(gb_Module_UICHECKTARGETSTACK
))
399 $(call gb_Module_get_clean_target
,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK
))
400 gb_Module_TARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_TARGETSTACK
)),$$(gb_Module_TARGETSTACK
))
401 gb_Module_L10NTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_L10NTARGETSTACK
)),$$(gb_Module_L10NTARGETSTACK
))
402 gb_Module_CHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CHECKTARGETSTACK
)),$$(gb_Module_CHECKTARGETSTACK
))
403 gb_Module_SLOWCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK
)),$$(gb_Module_SLOWCHECKTARGETSTACK
))
404 gb_Module_SCREENSHOTTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK
)),$$(gb_Module_SCREENSHOTTARGETSTACK
))
405 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
406 gb_Module_STAGINGCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK
)),$$(gb_Module_STAGINGCHECKTARGETSTACK
))
407 gb_Module_PERFCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK
)),$$(gb_Module_PERFCHECKTARGETSTACK
))
408 gb_Module_UICHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_UICHECKTARGETSTACK
)),$$(gb_Module_UICHECKTARGETSTACK
))
409 gb_Module_CLEANTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CLEANTARGETSTACK
)),$$(gb_Module_CLEANTARGETSTACK
))
413 define gb_Module_add_targets
414 $(call gb_Module_get_target
,$(1)) : $(call gb_Module_get_nonl10n_target
,$(1))
415 $(foreach target
,$(2),$(call gb_Module_add_target
,$(1),$(target
)))
419 define gb_Module_add_l10n_targets
420 $(call gb_Module_get_target
,$(1)) : $(call gb_Module_get_l10n_target
,$(1))
421 $(foreach target
,$(2),$(call gb_Module_add_l10n_target
,$(1),$(target
)))
425 gb_Module_add_targets_for_build
= $(call gb_Module_add_targets
,$(1),$(2))
427 define gb_Module_add_check_targets
428 $(foreach target
,$(2),$(call gb_Module_add_check_target
,$(1),$(target
)))
432 define gb_Module_add_slowcheck_targets
433 $(foreach target
,$(2),$(call gb_Module_add_slowcheck_target
,$(1),$(target
)))
437 define gb_Module_add_screenshot_targets
438 $(foreach target
,$(2),$(call gb_Module_add_screenshot_target
,$(1),$(target
)))
442 define gb_Module_add_subsequentcheck_targets
443 $(foreach target
,$(2),$(call gb_Module_add_subsequentcheck_target
,$(1),$(target
)))
447 define gb_Module_add_stagingcheck_targets
448 $(foreach target
,$(2),$(call gb_Module_add_stagingcheck_target
,$(1),$(target
)))
452 define gb_Module_add_perfcheck_targets
453 $(foreach target
,$(2),$(call gb_Module_add_perfcheck_target
,$(1),$(target
)))
457 define gb_Module_add_moduledirs
458 $(foreach target
,$(sort $(2)),$(call gb_Module_add_moduledir
,$(1),$(target
)))
462 define gb_Module_add_uicheck_targets
463 $(foreach target
,$(2),$(call gb_Module_add_uicheck_target
,$(1),$(target
)))
467 define gb_Module_make_global_targets
468 ifneq ($$(gb_Module_TARGETSTACK
),)
469 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
!1))
474 build
: build-non-l10n-only build-l10n-only
475 build-non-l10n-only
: $$(firstword $$(gb_Module_TARGETSTACK
))
476 build-l10n-only
: $$(firstword $$(gb_Module_L10NTARGETSTACK
))
477 unitcheck
: $$(firstword $$(gb_Module_CHECKTARGETSTACK
))
478 slowcheck
: $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK
))
479 screenshot
: $$(firstword $$(gb_Module_SCREENSHOTTARGETSTACK
))
480 ifeq ($(WINDOWS_BUILD_SIGNING
),TRUE
)
481 screenshot
: $(call gb_CustomTarget_get_workdir
,postprocess
/signing
)/signing.done
483 subsequentcheck
: $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
484 stagingcheck
: $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK
))
485 perfcheck
: $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK
))
486 uicheck
: build
$$(firstword $$(gb_Module_UICHECKTARGETSTACK
))
487 clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK
))
489 ifneq ($$(words $$(gb_Module_TARGETSTACK
)),1)
490 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
! $(gb_Module_TARGETSTACK
)))
493 gb_Module_TARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_TARGETSTACK
)),$$(gb_Module_TARGETSTACK
))
494 gb_Module_L10NTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_L10NTARGETSTACK
)),$$(gb_Module_L10NTARGETSTACK
))
495 gb_Module_CHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CHECKTARGETSTACK
)),$$(gb_Module_CHECKTARGETSTACK
))
496 gb_Module_SLOWCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK
)),$$(gb_Module_SLOWCHECKTARGETSTACK
))
497 gb_Module_SCREENSHOTTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SCREENSHOTTARGETSTACK
)),$$(gb_Module_SCREENSHOTTARGETSTACK
))
498 gb_Module_SUBSEQUENTCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK
))
499 gb_Module_UICHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_UICHECKTARGETSTACK
)),$$(gb_Module_UICHECKTARGETSTACK
))
500 gb_Module_STAGINGCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK
)),$$(gb_Module_STAGINGCHECKTARGETSTACK
))
501 gb_Module_PERFCHECKTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK
)),$$(gb_Module_PERFCHECKTARGETSTACK
))
502 gb_Module_CLEANTARGETSTACK
:= $$(wordlist
2,$$(words $$(gb_Module_CLEANTARGETSTACK
)),$$(gb_Module_CLEANTARGETSTACK
))
504 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
)),)
505 $$(eval
$$(call gb_Output_error
,Corrupted module target stack
!3))
508 $$(eval
$$(gb_Extensions_final_hook
))
511 # vim: set noet sw=4: