michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # michael@0: # functions.mk michael@0: # michael@0: # Defines functions that are needed by various Makefiles throughout the build michael@0: # system, which are needed before config.mk can be included. michael@0: # michael@0: michael@0: # Define an include-at-most-once flag michael@0: ifdef INCLUDED_FUNCTIONS_MK michael@0: $(error Do not include functions.mk twice!) michael@0: endif michael@0: INCLUDED_FUNCTIONS_MK = 1 michael@0: michael@0: core_abspath = $(error core_abspath is unsupported, use $$(abspath) instead) michael@0: core_realpath = $(error core_realpath is unsupported) michael@0: michael@0: core_winabspath = $(error core_winabspath is unsupported) michael@0: michael@0: # Run a named Python build action. The first argument is the name of the build michael@0: # action. The second argument are the arguments to pass to the action (space michael@0: # delimited arguments). e.g. michael@0: # michael@0: # libs:: michael@0: # $(call py_action,purge_manifests,_build_manifests/purge/foo.manifest) michael@0: ifdef .PYMAKE michael@0: py_action = %mozbuild.action.$(1) main $(2) michael@0: else michael@0: py_action = $(PYTHON) -m mozbuild.action.$(1) $(2) michael@0: endif