paths.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. include $(TOP)/mk/common.mk
  2. include $(TOP)/mk/versions.mk
  3. include $(TOP)/mk/ghc.mk
  4. MACRO_DIR = $(TOP)/macros
  5. SRC_DIR = $(TOP)/src
  6. MAIN_SRC_DIR = $(SRC_DIR)/main
  7. FULL_SRC_DIR = $(SRC_DIR)/full
  8. CORE_SRC_DIR = $(SRC_DIR)/core
  9. TRANSL_SRC_DIR = $(SRC_DIR)/transl
  10. COMPAT_SRC_DIR = $(SRC_DIR)/compat
  11. # Note: To use "dist" as the build directory (the default), modify
  12. # BUILD_DIR below. At the time of writing GHC's recompilation checker
  13. # doesn't seem to handle Agda very well: if you compile, switch to
  14. # another branch, and then switch back, then many (but not all)
  15. # modules are likely to be recompiled. However, work seems to be under
  16. # way to improve the situation:
  17. #
  18. # https://ghc.haskell.org/trac/ghc/ticket/8144
  19. # https://ghc.haskell.org/trac/ghc/ticket/4012
  20. #
  21. # Thus it may be worthwhile to keep the present infrastructure with
  22. # different build directories for different versions of Agda.
  23. #
  24. # Andreas, 2020-10-26 further refinement:
  25. # I often switch GHC version, so indexing v1-style build directories
  26. # by GHC version x.y.z makes sense.
  27. BUILD_DIR = $(TOP)/dist-$(VERSION)-ghc-$(GHC_VER)
  28. QUICK_BUILD_DIR = $(BUILD_DIR)-quick
  29. FAST_BUILD_DIR = $(BUILD_DIR)-fast
  30. DEBUG_BUILD_DIR = $(BUILD_DIR)-debug
  31. QUICK_DEBUG_BUILD_DIR = $(BUILD_DIR)-debug-quick
  32. STACK_BUILD_DIR = .stack-work
  33. QUICK_STACK_BUILD_DIR = $(STACK_BUILD_DIR)-quick
  34. FAST_STACK_BUILD_DIR = $(STACK_BUILD_DIR)-fast
  35. OUT_DIR = $(TOP)/out
  36. FULL_OUT_DIR = $(OUT_DIR)/full
  37. CORE_OUT_DIR = $(OUT_DIR)/core
  38. TRANSL_OUT_DIR = $(OUT_DIR)/transl
  39. DOC_DIR = $(TOP)/doc
  40. HADDOCK_DIR = $(DOC_DIR)/haddock
  41. AGDA_BIN ?= $(BUILD_DIR)/build/agda/agda
  42. AGDA_BIN := $(abspath $(AGDA_BIN))
  43. AGDA_MODE ?= $(BUILD_DIR)/build/agda-mode/agda-mode
  44. AGDA_MODE := $(abspath $(AGDA_MODE))
  45. AGDA_TESTS_BIN ?= $(BUILD_DIR)/build/agda-tests/agda-tests
  46. AGDA_TESTS_BIN := $(abspath $(AGDA_TESTS_BIN))