default.mk 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. ##----------------------------------------------------------------------
  2. ## NEVER EDIT THIS FILE, PUT ANY ADAPTATIONS INTO local.mk
  3. ##-8<-------------------------------------------------------------------
  4. ## CHECK AND ADAPT THE FOLLOWING DEFINITIONS
  5. ##----------------------------------------------------------------------
  6. # Name of your emacs binary
  7. EMACS = emacs
  8. # Where local software is found
  9. prefix = /usr/share
  10. # Where local lisp files go.
  11. lispdir= $(prefix)/emacs/site-lisp/org
  12. # Where local data files go.
  13. datadir = $(prefix)/emacs/etc/org
  14. # Where info files go.
  15. infodir = $(prefix)/info
  16. # Define if you only need info documentation, the default includes html and pdf
  17. #ORG_MAKE_DOC = info # html pdf
  18. # Define which git branch to switch to during update. Does not switch
  19. # the branch when undefined.
  20. GIT_BRANCH =
  21. # Where to create temporary files for the testsuite
  22. # respect TMPDIR if it is already defined in the environment
  23. TMPDIR ?= /tmp
  24. testdir = $(TMPDIR)/tmp-orgtest
  25. # Configuration for testing
  26. # Verbose ERT summary by default for Emacs-28 and above.
  27. # To override:
  28. # - Add to local.mk
  29. # EMACS_TEST_VERBOSE =
  30. # - Export EMACS_TEST_VERBOSE environment variable with empty value
  31. # - Run tests as
  32. # EMACS_TEST_VERBOSE= make test [OTHER_ARGUMENTS...]
  33. # or as
  34. # make test EMACS_TEST_VERBOSE= [OTHER_ARGUMENTS...]
  35. EMACS_TEST_VERBOSE ?= yes
  36. ifeq (,$(EMACS_TEST_VERBOSE))
  37. # Emacs-28 considers empty value as true, fixed in Emacs-29
  38. unexport EMACS_TEST_VERBOSE
  39. endif
  40. # add options before standard load-path
  41. BTEST_PRE =
  42. # add options after standard load path
  43. BTEST_POST =
  44. # -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
  45. # -L <path-to>/ess # needed for running R tests
  46. # -L <path-to>/htmlize # need at least version 1.34 for source code formatting
  47. BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python java
  48. # R # requires ESS to be installed and configured
  49. # ruby # requires inf-ruby to be installed and configured
  50. # extra packages to require for testing
  51. BTEST_EXTRA =
  52. # ess-site # load ESS for R tests
  53. # Whether to activate extra debugging facilities for make repro.
  54. REPRO_DEBUG ?= yes
  55. # Extra arguments passed to Emacs for make repro.
  56. # e.g. -l config.el /tmp/bug.org
  57. REPRO_ARGS ?=
  58. ##->8-------------------------------------------------------------------
  59. ## YOU MAY NEED TO ADAPT THESE DEFINITIONS
  60. ##----------------------------------------------------------------------
  61. # How to run tests
  62. req-ob-lang = --eval '(require '"'"'ob-$(ob-lang))'
  63. lst-ob-lang = ($(ob-lang) . t)
  64. req-extra = --eval '(require '"'"'$(req))'
  65. BTEST_RE ?= \\(org\\|ob\\|ox\\)
  66. BTEST_LOAD = \
  67. --eval '(add-to-list '"'"'load-path (concat default-directory "lisp"))' \
  68. --eval '(add-to-list '"'"'load-path (concat default-directory "testing"))'
  69. BTEST_INIT = $(BTEST_PRE) $(BTEST_LOAD) $(BTEST_POST)
  70. BTEST = $(BATCH) $(BTEST_INIT) \
  71. -l org-batch-test-init \
  72. --eval '(setq \
  73. org-batch-test t \
  74. org-babel-load-languages \
  75. (quote ($(foreach ob-lang,\
  76. $(BTEST_OB_LANGUAGES) emacs-lisp shell org,\
  77. $(lst-ob-lang)))) \
  78. org-test-select-re "$(BTEST_RE)" \
  79. )' \
  80. -l org-loaddefs.el \
  81. -l cl -l testing/org-test.el \
  82. -l ert -l org -l ox -l ol \
  83. $(foreach req,$(BTEST_EXTRA),$(req-extra)) \
  84. --eval '(org-test-run-batch-tests org-test-select-re)'
  85. # Running a plain emacs with no config and this Org mode loaded. This
  86. # should be useful for manual testing and verification of problems.
  87. NOBATCH = $(EMACSQ) $(BTEST_INIT) -l org -f org-version
  88. ifeq ($(REPRO_DEBUG), yes)
  89. REPRO_INIT = --eval "(setq \
  90. debug-on-error t\
  91. debug-on-signal nil\
  92. debug-on-quit nil\
  93. org-element--cache-self-verify 'backtrace\
  94. org-element--cache-self-verify-frequency 1.0\
  95. org-element--cache-map-statistics t)"
  96. else
  97. REPRO_INIT =
  98. endif
  99. # Running a plain emacs with no config, this Org mode loaded, and
  100. # debugging facilities activated.
  101. REPRO = $(NOBATCH) $(REPRO_INIT) $(REPRO_ARGS)
  102. # start Emacs with no user and site configuration
  103. # EMACSQ = -vanilla # XEmacs
  104. EMACSQ = $(EMACS) -Q
  105. # Using emacs in batch mode.
  106. BATCH = $(EMACSQ) -batch \
  107. --eval '(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)'
  108. # Emacs must be started in toplevel directory
  109. BATCHO = $(BATCH) \
  110. --eval '(add-to-list '"'"'load-path "./lisp")'
  111. # How to generate local.mk
  112. MAKE_LOCAL_MK = $(BATCHO) \
  113. --eval '(load "org-compat.el")' \
  114. --eval '(load "../mk/org-fixup.el")' \
  115. --eval '(org-make-local-mk)'
  116. # Emacs must be started in lisp directory
  117. BATCHL = $(BATCH) \
  118. --eval '(add-to-list '"'"'load-path ".")'
  119. # How to generate org-loaddefs.el
  120. MAKE_ORG_INSTALL = $(BATCHL) \
  121. --eval '(load "org-compat.el")' \
  122. --eval '(load "../mk/org-fixup.el")' \
  123. --eval '(org-make-org-loaddefs)'
  124. # How to generate org-version.el
  125. MAKE_ORG_VERSION = $(BATCHL) \
  126. --eval '(load "org-compat.el")' \
  127. --eval '(load "../mk/org-fixup.el")' \
  128. --eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)")'
  129. # How to byte-compile the whole source directory
  130. ELCDIR = $(BATCHL) \
  131. --eval '(batch-byte-recompile-directory 0)'
  132. # How to byte-compile a single file
  133. ELC = $(BATCHL) \
  134. --eval '(batch-byte-compile)'
  135. # How to make a pdf file from a texinfo file
  136. TEXI2PDF = texi2pdf --batch --clean --expand
  137. # How to make a pdf file from a tex file
  138. PDFTEX = pdftex
  139. # How to create directories with leading path components
  140. # MKDIR = mkdir -m 755 -p # try this if you have no install
  141. MKDIR = install -m 755 -d
  142. # How to create the info files from the texinfo file
  143. MAKEINFO = makeinfo
  144. # How to create the HTML file
  145. TEXI2HTML = makeinfo --html --number-sections --css-ref "https://www.gnu.org/software/emacs/manual.css"
  146. # How to find files
  147. FIND = find
  148. # How to remove files
  149. RM = rm -f
  150. # How to remove files recursively
  151. RMR = rm -fr
  152. # How to change file permissions
  153. # currently only needed for git-annex due to its "lockdown" feature
  154. CHMOD = chmod
  155. # How to copy the lisp files and elc files to their destination.
  156. # CP = cp -p # try this if you have no install
  157. CP = install -m 644 -p
  158. # How to obtain administrative privileges
  159. # leave blank if you don't need this
  160. # SUDO =
  161. SUDO = sudo
  162. # Name of the program to install info files
  163. # INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
  164. INSTALL_INFO = install-info
  165. # target method for 'compile'
  166. ORGCM = dirall
  167. # ORGCM = dirall # 1x slowdown compared to default compilation method
  168. # ORGCM = single # 4x one Emacs process per compilation
  169. # ORGCM = source # 5x ditto, but remove compiled file immediately
  170. # ORGCM = slint1 # 3x possibly elicit more warnings
  171. # ORGCM = slint2 # 7x possibly elicit even more warnings