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: include $(MOZILLA_DIR)/build/binary-location.mk michael@0: michael@0: browser_path := '"$(browser_path)"' michael@0: michael@0: _PROFILE_DIR = $(TARGET_DEPTH)/_profile/pgo michael@0: michael@0: ABSOLUTE_TOPSRCDIR = $(abspath $(MOZILLA_DIR)) michael@0: _CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs michael@0: michael@0: AUTOMATION_PPARGS = \ michael@0: -DBROWSER_PATH=$(browser_path) \ michael@0: -DXPC_BIN_PATH='"$(LIBXUL_DIST)/bin"' \ michael@0: -DBIN_SUFFIX='"$(BIN_SUFFIX)"' \ michael@0: -DPROFILE_DIR='"$(_PROFILE_DIR)"' \ michael@0: -DCERTS_SRC_DIR='"$(_CERTS_SRC_DIR)"' \ michael@0: -DPERL='"$(PERL)"' \ michael@0: $(NULL) michael@0: michael@0: ifeq ($(OS_ARCH),Darwin) michael@0: AUTOMATION_PPARGS += -DIS_MAC=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_MAC=0 michael@0: endif michael@0: michael@0: ifeq ($(OS_ARCH),Linux) michael@0: AUTOMATION_PPARGS += -DIS_LINUX=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_LINUX=0 michael@0: endif michael@0: michael@0: ifeq ($(MOZ_BUILD_APP),camino) michael@0: AUTOMATION_PPARGS += -DIS_CAMINO=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_CAMINO=0 michael@0: endif michael@0: michael@0: ifeq ($(host_os), cygwin) michael@0: AUTOMATION_PPARGS += -DIS_CYGWIN=1 michael@0: endif michael@0: michael@0: ifeq ($(ENABLE_TESTS), 1) michael@0: AUTOMATION_PPARGS += -DIS_TEST_BUILD=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_TEST_BUILD=0 michael@0: endif michael@0: michael@0: ifeq ($(MOZ_DEBUG), 1) michael@0: AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=0 michael@0: endif michael@0: michael@0: ifdef MOZ_CRASHREPORTER michael@0: AUTOMATION_PPARGS += -DCRASHREPORTER=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DCRASHREPORTER=0 michael@0: endif michael@0: michael@0: ifdef MOZ_ASAN michael@0: AUTOMATION_PPARGS += -DIS_ASAN=1 michael@0: else michael@0: AUTOMATION_PPARGS += -DIS_ASAN=0 michael@0: endif michael@0: michael@0: automation.py: $(MOZILLA_DIR)/build/automation.py.in $(MOZILLA_DIR)/build/automation-build.mk michael@0: $(call py_action,preprocessor, \ michael@0: $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< -o $@) michael@0: michael@0: GARBAGE += automation.py automation.pyc