Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input...
[gecko.git] / config / makefiles / functions.mk
blob65c9a6749f57b5ced36ffa4b3a913611924b6442
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # functions.mk
9 # Defines functions that are needed by various Makefiles throughout the build
10 # system, which are needed before config.mk can be included.
13 # Define an include-at-most-once flag
14 ifdef INCLUDED_FUNCTIONS_MK
15 $(error Do not include functions.mk twice!)
16 endif
17 INCLUDED_FUNCTIONS_MK = 1
19 core_abspath = $(error core_abspath is unsupported, use $$(abspath) instead)
20 core_realpath = $(error core_realpath is unsupported)
22 core_winabspath = $(error core_winabspath is unsupported)
24 # Run a named Python build action. The first argument is the name of the build
25 # action. The second argument are the arguments to pass to the action (space
26 # delimited arguments). e.g.
28 # libs::
29 # $(call py_action,purge_manifests,_build_manifests/purge/foo.manifest)
31 # The first argument can optionally contain the name of the file being created
32 # or processed. e.g.
33 # libs::
34 # $(call py_action,purge_manifests foo.manifest,_build_manifests/purge/foo.manifest)
35 # This optional name will be displayed in build profiles.
36 define py_action
37 $(call BUILDSTATUS,START_$(firstword $(1)) $(or $(word 2,$(1)),$(2)))
38 $(if $(3),cd $(3) && )$(PYTHON3) -m mozbuild.action.$(firstword $(1)) $(2)
39 $(call BUILDSTATUS,END_$(firstword $(1)) $(or $(word 2,$(1)),$(2)))
41 endef