default.mk 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. # Define if you want to include some (or all) files from contrib/lisp
  22. # just the filename please (no path prefix, no .el suffix), maybe with globbing
  23. #ORG_ADD_CONTRIB = ox-* # e.g. the contributed exporter
  24. # Where to create temporary files for the testsuite
  25. # respect TMPDIR if it is already defined in the environment
  26. TMPDIR ?= /tmp
  27. testdir = $(TMPDIR)/tmp-orgtest
  28. # Configuration for testing
  29. # add options before standard load-path
  30. BTEST_PRE =
  31. # add options after standard load path
  32. BTEST_POST =
  33. # -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
  34. # -L <path-to>/ess # needed for running R tests
  35. # -L <path-to>/htmlize # need at least version 1.34 for source code formatting
  36. BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python vala
  37. # R # requires ESS to be installed and configured
  38. # ruby # requires inf-ruby to be installed and configured
  39. # extra packages to require for testing
  40. BTEST_EXTRA =
  41. # ess-site # load ESS for R tests
  42. ##->8-------------------------------------------------------------------
  43. ## YOU MAY NEED TO ADAPT THESE DEFINITIONS
  44. ##----------------------------------------------------------------------
  45. # How to run tests
  46. req-ob-lang = --eval '(require '"'"'ob-$(ob-lang))'
  47. lst-ob-lang = ($(ob-lang) . t)
  48. req-extra = --eval '(require '"'"'$(req))'
  49. BTEST_RE ?= \\(org\\|ob\\)
  50. BTEST_LOAD = \
  51. --eval '(add-to-list '"'"'load-path (concat default-directory "lisp"))' \
  52. --eval '(add-to-list '"'"'load-path (concat default-directory "testing"))'
  53. BTEST_INIT = $(BTEST_PRE) $(BTEST_LOAD) $(BTEST_POST)
  54. BTEST = $(BATCH) $(BTEST_INIT) \
  55. -l org-batch-test-init \
  56. --eval '(setq \
  57. org-batch-test t \
  58. org-babel-load-languages \
  59. (quote ($(foreach ob-lang,\
  60. $(BTEST_OB_LANGUAGES) emacs-lisp shell org,\
  61. $(lst-ob-lang)))) \
  62. org-test-select-re "$(BTEST_RE)" \
  63. )' \
  64. -l org-loaddefs.el \
  65. -l cl -l testing/org-test.el \
  66. -l ert -l org -l ox \
  67. $(foreach req,$(BTEST_EXTRA),$(req-extra)) \
  68. --eval '(org-test-run-batch-tests org-test-select-re)'
  69. # Running a plain emacs with no config and this Org mode loaded. This
  70. # should be useful for manual testing and verification of problems.
  71. NOBATCH = $(EMACSQ) $(BTEST_INIT) -l org -f org-version
  72. # start Emacs with no user and site configuration
  73. # EMACSQ = -vanilla # XEmacs
  74. EMACSQ = $(EMACS) -Q
  75. # Using emacs in batch mode.
  76. BATCH = $(EMACSQ) -batch \
  77. --eval '(setq vc-handled-backends nil org-startup-folded nil)'
  78. # Emacs must be started in toplevel directory
  79. BATCHO = $(BATCH) \
  80. --eval '(add-to-list '"'"'load-path "./lisp")'
  81. # How to generate local.mk
  82. MAKE_LOCAL_MK = $(BATCHO) \
  83. --eval '(load "org-compat.el")' \
  84. --eval '(load "../mk/org-fixup.el")' \
  85. --eval '(org-make-local-mk)'
  86. # Emacs must be started in lisp directory
  87. BATCHL = $(BATCH) \
  88. --eval '(add-to-list '"'"'load-path ".")'
  89. # How to generate org-loaddefs.el
  90. MAKE_ORG_INSTALL = $(BATCHL) \
  91. --eval '(load "org-compat.el")' \
  92. --eval '(load "../mk/org-fixup.el")' \
  93. --eval '(org-make-org-loaddefs)'
  94. # How to generate org-version.el
  95. MAKE_ORG_VERSION = $(BATCHL) \
  96. --eval '(load "org-compat.el")' \
  97. --eval '(load "../mk/org-fixup.el")' \
  98. --eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "'$(datadir)'")'
  99. # How to byte-compile the whole source directory
  100. ELCDIR = $(BATCHL) \
  101. --eval '(batch-byte-recompile-directory 0)'
  102. # How to byte-compile a single file
  103. ELC = $(BATCHL) \
  104. --eval '(batch-byte-compile)'
  105. # How to make a pdf file from a texinfo file
  106. TEXI2PDF = texi2pdf --batch --clean --expand
  107. # How to make a pdf file from a tex file
  108. PDFTEX = pdftex
  109. # How to create directories with leading path components
  110. # MKDIR = mkdir -m 755 -p # try this if you have no install
  111. MKDIR = install -m 755 -d
  112. # How to create the info files from the texinfo file
  113. MAKEINFO = makeinfo
  114. # How to create the HTML file
  115. TEXI2HTML = makeinfo --html --number-sections
  116. # How to find files
  117. FIND = find
  118. # How to remove files
  119. RM = rm -f
  120. # How to remove files recursively
  121. RMR = rm -fr
  122. # How to change file permissions
  123. # currently only needed for git-annex due to its "lockdown" feature
  124. CHMOD = chmod
  125. # How to copy the lisp files and elc files to their destination.
  126. # CP = cp -p # try this if you have no install
  127. CP = install -m 644 -p
  128. # How to obtain administrative privileges
  129. # leave blank if you don't need this
  130. # SUDO =
  131. SUDO = sudo
  132. # Name of the program to install info files
  133. # INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
  134. INSTALL_INFO = install-info
  135. # target method for 'compile'
  136. ORGCM = dirall
  137. # ORGCM = dirall # 1x slowdown compared to default compilation method
  138. # ORGCM = single # 4x one Emacs process per compilation
  139. # ORGCM = source # 5x ditto, but remove compiled file immediately
  140. # ORGCM = slint1 # 3x possibly elicit more warnings
  141. # ORGCM = slint2 # 7x possibly elicit even more warnings