automation-build.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this
  3. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. include $(MOZILLA_DIR)/build/binary-location.mk
  5. browser_path := '"$(browser_path)"'
  6. _PROFILE_DIR = $(TARGET_DEPTH)/_profile/pgo
  7. ABSOLUTE_TOPSRCDIR = $(abspath $(MOZILLA_DIR))
  8. _CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs
  9. AUTOMATION_PPARGS = \
  10. -DBROWSER_PATH=$(browser_path) \
  11. -DXPC_BIN_PATH='"$(DIST)/bin"' \
  12. -DBIN_SUFFIX='"$(BIN_SUFFIX)"' \
  13. -DPROFILE_DIR='"$(_PROFILE_DIR)"' \
  14. -DCERTS_SRC_DIR='"$(_CERTS_SRC_DIR)"' \
  15. -DPERL='"$(PERL)"' \
  16. $(NULL)
  17. ifeq ($(OS_ARCH),Darwin)
  18. AUTOMATION_PPARGS += -DIS_MAC=1
  19. else
  20. AUTOMATION_PPARGS += -DIS_MAC=0
  21. endif
  22. ifeq ($(OS_ARCH),Linux)
  23. AUTOMATION_PPARGS += -DIS_LINUX=1
  24. else
  25. AUTOMATION_PPARGS += -DIS_LINUX=0
  26. endif
  27. ifeq ($(host_os), cygwin)
  28. AUTOMATION_PPARGS += -DIS_CYGWIN=1
  29. endif
  30. ifeq ($(ENABLE_TESTS), 1)
  31. AUTOMATION_PPARGS += -DIS_TEST_BUILD=1
  32. else
  33. AUTOMATION_PPARGS += -DIS_TEST_BUILD=0
  34. endif
  35. ifeq ($(MOZ_DEBUG), 1)
  36. AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=1
  37. else
  38. AUTOMATION_PPARGS += -DIS_DEBUG_BUILD=0
  39. endif
  40. AUTOMATION_PPARGS += -DCRASHREPORTER=0
  41. ifdef MOZ_ASAN
  42. AUTOMATION_PPARGS += -DIS_ASAN=1
  43. else
  44. AUTOMATION_PPARGS += -DIS_ASAN=0
  45. endif
  46. automation.py: $(MOZILLA_DIR)/build/automation.py.in $(MOZILLA_DIR)/build/automation-build.mk
  47. $(call py_action,preprocessor, \
  48. $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< -o $@)
  49. GARBAGE += automation.py automation.pyc