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/.
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
!)
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.
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
34 # $(call py_action,purge_manifests foo.manifest,_build_manifests/purge/foo.manifest)
35 # This optional name will be displayed in build profiles.
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)))