2011-07-12 17:45:59 +00:00
|
|
|
##----------------------------------------------------------------------
|
2012-01-05 19:54:52 +00:00
|
|
|
## NEVER EDIT THIS FILE, PUT ANY ADAPTATIONS INTO local.mk
|
2012-04-23 19:20:58 +00:00
|
|
|
##-8<-------------------------------------------------------------------
|
2012-05-26 20:32:21 +00:00
|
|
|
## CHECK AND ADAPT THE FOLLOWING DEFINITIONS
|
|
|
|
##----------------------------------------------------------------------
|
2012-04-22 06:22:31 +00:00
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Name of your emacs binary
|
2012-01-05 19:54:52 +00:00
|
|
|
EMACS = emacs
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# Where local software is found
|
2012-01-05 19:54:52 +00:00
|
|
|
prefix = /usr/share
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# Where local lisp files go.
|
2012-01-05 19:54:52 +00:00
|
|
|
lispdir= $(prefix)/emacs/site-lisp/org
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-10-03 10:13:33 +00:00
|
|
|
# Where local data files go.
|
|
|
|
datadir = $(prefix)/emacs/etc/org
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Where info files go.
|
2011-07-12 18:11:15 +00:00
|
|
|
infodir = $(prefix)/info
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-04-22 06:22:31 +00:00
|
|
|
# Define if you only need info documentation, the default includes html and pdf
|
2012-05-26 20:32:21 +00:00
|
|
|
#ORG_MAKE_DOC = info # html pdf
|
2012-04-22 06:22:31 +00:00
|
|
|
|
2013-12-14 09:18:59 +00:00
|
|
|
# Define which git branch to switch to during update. Does not switch
|
|
|
|
# the branch when undefined.
|
|
|
|
GIT_BRANCH =
|
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Where to create temporary files for the testsuite
|
2012-05-31 18:10:56 +00:00
|
|
|
# respect TMPDIR if it is already defined in the environment
|
|
|
|
TMPDIR ?= /tmp
|
2012-02-16 20:24:51 +00:00
|
|
|
testdir = $(TMPDIR)/tmp-orgtest
|
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Configuration for testing
|
2022-01-15 15:54:30 +00:00
|
|
|
# Verbose ERT summary by default for Emacs-28 and above.
|
|
|
|
# To override:
|
|
|
|
# - Add to local.mk
|
|
|
|
# EMACS_TEST_VERBOSE =
|
|
|
|
# - Export EMACS_TEST_VERBOSE environment variable with empty value
|
|
|
|
# - Run tests as
|
|
|
|
# EMACS_TEST_VERBOSE= make test [OTHER_ARGUMENTS...]
|
|
|
|
# or as
|
|
|
|
# make test EMACS_TEST_VERBOSE= [OTHER_ARGUMENTS...]
|
|
|
|
EMACS_TEST_VERBOSE ?= yes
|
|
|
|
ifeq (,$(EMACS_TEST_VERBOSE))
|
|
|
|
# Emacs-28 considers empty value as true, fixed in Emacs-29
|
|
|
|
unexport EMACS_TEST_VERBOSE
|
|
|
|
endif
|
2012-05-31 18:10:56 +00:00
|
|
|
# add options before standard load-path
|
|
|
|
BTEST_PRE =
|
|
|
|
# add options after standard load path
|
|
|
|
BTEST_POST =
|
2012-04-01 07:48:18 +00:00
|
|
|
# -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
|
2012-07-15 16:03:27 +00:00
|
|
|
# -L <path-to>/ess # needed for running R tests
|
2012-04-01 07:48:18 +00:00
|
|
|
# -L <path-to>/htmlize # need at least version 1.34 for source code formatting
|
2024-03-16 11:34:14 +00:00
|
|
|
BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python java sqlite eshell calc
|
2012-07-15 16:03:27 +00:00
|
|
|
# R # requires ESS to be installed and configured
|
2013-11-23 16:46:35 +00:00
|
|
|
# ruby # requires inf-ruby to be installed and configured
|
2012-05-31 18:10:56 +00:00
|
|
|
# extra packages to require for testing
|
|
|
|
BTEST_EXTRA =
|
2012-07-15 16:03:27 +00:00
|
|
|
# ess-site # load ESS for R tests
|
2022-05-01 02:44:10 +00:00
|
|
|
# Whether to activate extra debugging facilities for make repro.
|
|
|
|
REPRO_DEBUG ?= yes
|
|
|
|
# Extra arguments passed to Emacs for make repro.
|
|
|
|
# e.g. -l config.el /tmp/bug.org
|
|
|
|
REPRO_ARGS ?=
|
2012-04-23 19:20:58 +00:00
|
|
|
##->8-------------------------------------------------------------------
|
2012-01-05 19:54:52 +00:00
|
|
|
## YOU MAY NEED TO ADAPT THESE DEFINITIONS
|
2011-07-12 17:45:59 +00:00
|
|
|
##----------------------------------------------------------------------
|
|
|
|
|
2012-01-05 19:54:52 +00:00
|
|
|
# How to run tests
|
2024-02-09 11:53:03 +00:00
|
|
|
req-ob-lang = --eval '(require `ob-$(ob-lang))'
|
2013-11-23 16:46:35 +00:00
|
|
|
lst-ob-lang = ($(ob-lang) . t)
|
2024-02-09 11:53:03 +00:00
|
|
|
req-extra = --eval '(require `$(req))'
|
2022-10-16 03:14:06 +00:00
|
|
|
BTEST_RE ?= \\(org\\|ob\\|ox\\)
|
2013-12-14 09:17:53 +00:00
|
|
|
BTEST_LOAD = \
|
2024-02-09 11:53:03 +00:00
|
|
|
--eval '(add-to-list `load-path (concat default-directory "lisp"))' \
|
|
|
|
--eval '(add-to-list `load-path (concat default-directory "testing"))'
|
2013-12-14 09:17:53 +00:00
|
|
|
BTEST_INIT = $(BTEST_PRE) $(BTEST_LOAD) $(BTEST_POST)
|
|
|
|
|
2024-05-19 21:15:21 +00:00
|
|
|
BTEST = $(BATCH) $(BTEST_INIT) \
|
|
|
|
-l org-batch-test-init \
|
|
|
|
--eval '(setq \
|
|
|
|
org-batch-test t \
|
|
|
|
org-babel-load-languages \
|
|
|
|
(quote ($(foreach ob-lang, \
|
|
|
|
$(BTEST_OB_LANGUAGES) emacs-lisp shell org, \
|
|
|
|
$(lst-ob-lang)))) \
|
|
|
|
org-test-select-re "$(BTEST_RE)" \
|
|
|
|
)' \
|
|
|
|
-l org-loaddefs.el \
|
|
|
|
-l testing/org-test.el \
|
|
|
|
-l ert -l org -l ox -l ol \
|
|
|
|
$(foreach req,$(BTEST_EXTRA),$(req-extra)) \
|
2013-11-23 16:46:35 +00:00
|
|
|
--eval '(org-test-run-batch-tests org-test-select-re)'
|
2012-01-04 20:02:14 +00:00
|
|
|
|
2017-12-31 14:48:09 +00:00
|
|
|
# Running a plain emacs with no config and this Org mode loaded. This
|
2013-12-14 09:17:53 +00:00
|
|
|
# should be useful for manual testing and verification of problems.
|
|
|
|
NOBATCH = $(EMACSQ) $(BTEST_INIT) -l org -f org-version
|
|
|
|
|
2022-05-01 02:44:10 +00:00
|
|
|
ifeq ($(REPRO_DEBUG), yes)
|
|
|
|
REPRO_INIT = --eval "(setq \
|
|
|
|
debug-on-error t\
|
|
|
|
debug-on-signal nil\
|
|
|
|
debug-on-quit nil\
|
|
|
|
org-element--cache-self-verify 'backtrace\
|
|
|
|
org-element--cache-self-verify-frequency 1.0\
|
|
|
|
org-element--cache-map-statistics t)"
|
|
|
|
else
|
|
|
|
REPRO_INIT =
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Running a plain emacs with no config, this Org mode loaded, and
|
|
|
|
# debugging facilities activated.
|
2024-06-18 15:00:42 +00:00
|
|
|
REPRO = $(NOBATCH) $(BTEST_INIT) $(REPRO_INIT) $(REPRO_ARGS)
|
2022-05-01 02:44:10 +00:00
|
|
|
|
2013-12-14 09:17:53 +00:00
|
|
|
# start Emacs with no user and site configuration
|
|
|
|
# EMACSQ = -vanilla # XEmacs
|
|
|
|
EMACSQ = $(EMACS) -Q
|
2013-12-13 16:34:35 +00:00
|
|
|
|
2012-04-01 07:48:18 +00:00
|
|
|
# Using emacs in batch mode.
|
2013-12-14 09:17:53 +00:00
|
|
|
BATCH = $(EMACSQ) -batch \
|
2021-10-18 12:59:10 +00:00
|
|
|
--eval '(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)'
|
2012-05-19 20:08:06 +00:00
|
|
|
|
2012-09-29 08:47:40 +00:00
|
|
|
# Emacs must be started in toplevel directory
|
|
|
|
BATCHO = $(BATCH) \
|
2024-02-09 11:53:03 +00:00
|
|
|
--eval '(add-to-list `load-path "./lisp")'
|
2012-09-29 08:47:40 +00:00
|
|
|
|
2012-05-26 20:32:21 +00:00
|
|
|
# How to generate local.mk
|
2012-09-29 08:47:40 +00:00
|
|
|
MAKE_LOCAL_MK = $(BATCHO) \
|
2012-05-26 20:32:21 +00:00
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 12:03:20 +00:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2012-05-26 20:32:21 +00:00
|
|
|
--eval '(org-make-local-mk)'
|
|
|
|
|
2012-05-19 20:08:06 +00:00
|
|
|
# Emacs must be started in lisp directory
|
|
|
|
BATCHL = $(BATCH) \
|
2024-02-09 11:53:03 +00:00
|
|
|
--eval '(add-to-list `load-path ".")'
|
2012-05-19 20:08:06 +00:00
|
|
|
|
2012-10-02 09:30:24 +00:00
|
|
|
# How to generate org-loaddefs.el
|
2012-05-19 20:08:06 +00:00
|
|
|
MAKE_ORG_INSTALL = $(BATCHL) \
|
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 12:03:20 +00:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2012-10-02 09:30:24 +00:00
|
|
|
--eval '(org-make-org-loaddefs)'
|
2012-05-19 20:08:06 +00:00
|
|
|
|
|
|
|
# How to generate org-version.el
|
|
|
|
MAKE_ORG_VERSION = $(BATCHL) \
|
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 12:03:20 +00:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2019-02-09 11:28:15 +00:00
|
|
|
--eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)")'
|
2012-04-01 07:48:18 +00:00
|
|
|
|
2011-11-13 10:53:12 +00:00
|
|
|
# How to byte-compile the whole source directory
|
2012-05-19 20:08:06 +00:00
|
|
|
ELCDIR = $(BATCHL) \
|
|
|
|
--eval '(batch-byte-recompile-directory 0)'
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-08-04 13:50:39 +00:00
|
|
|
# How to byte-compile a single file
|
|
|
|
ELC = $(BATCHL) \
|
|
|
|
--eval '(batch-byte-compile)'
|
|
|
|
|
2024-02-08 19:16:51 +00:00
|
|
|
# How to native-compile a single file
|
|
|
|
ELN = $(BATCHL) \
|
|
|
|
--eval '(batch-native-compile)'
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# How to make a pdf file from a texinfo file
|
2013-09-30 06:36:16 +00:00
|
|
|
TEXI2PDF = texi2pdf --batch --clean --expand
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
# How to make a pdf file from a tex file
|
|
|
|
PDFTEX = pdftex
|
|
|
|
|
2012-05-26 20:32:21 +00:00
|
|
|
# How to create directories with leading path components
|
|
|
|
# MKDIR = mkdir -m 755 -p # try this if you have no install
|
|
|
|
MKDIR = install -m 755 -d
|
2011-07-12 17:45:59 +00:00
|
|
|
|
|
|
|
# How to create the info files from the texinfo file
|
|
|
|
MAKEINFO = makeinfo
|
|
|
|
|
|
|
|
# How to create the HTML file
|
2021-03-24 08:06:09 +00:00
|
|
|
TEXI2HTML = makeinfo --html --number-sections --css-ref "https://www.gnu.org/software/emacs/manual.css"
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2011-07-12 20:31:41 +00:00
|
|
|
# How to find files
|
2012-01-05 19:54:52 +00:00
|
|
|
FIND = find
|
2011-07-12 20:31:41 +00:00
|
|
|
|
|
|
|
# How to remove files
|
2012-01-05 19:54:52 +00:00
|
|
|
RM = rm -f
|
2011-07-12 20:31:41 +00:00
|
|
|
|
2011-07-17 12:49:43 +00:00
|
|
|
# How to remove files recursively
|
2012-01-05 19:54:52 +00:00
|
|
|
RMR = rm -fr
|
2011-07-17 12:49:43 +00:00
|
|
|
|
2016-02-14 11:44:56 +00:00
|
|
|
# How to change file permissions
|
|
|
|
# currently only needed for git-annex due to its "lockdown" feature
|
|
|
|
CHMOD = chmod
|
|
|
|
|
2011-07-12 18:11:15 +00:00
|
|
|
# How to copy the lisp files and elc files to their destination.
|
2012-05-26 20:32:21 +00:00
|
|
|
# CP = cp -p # try this if you have no install
|
|
|
|
CP = install -m 644 -p
|
2011-07-12 17:45:59 +00:00
|
|
|
|
2012-01-31 19:44:37 +00:00
|
|
|
# How to obtain administrative privileges
|
2012-05-31 18:10:56 +00:00
|
|
|
# leave blank if you don't need this
|
|
|
|
# SUDO =
|
2012-01-31 19:44:37 +00:00
|
|
|
SUDO = sudo
|
|
|
|
|
2011-07-12 17:45:59 +00:00
|
|
|
# Name of the program to install info files
|
2012-01-05 19:54:52 +00:00
|
|
|
# INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
|
2011-07-12 18:11:15 +00:00
|
|
|
INSTALL_INFO = install-info
|
2012-08-19 10:20:47 +00:00
|
|
|
|
2012-08-19 10:21:33 +00:00
|
|
|
# target method for 'compile'
|
2024-02-09 16:17:12 +00:00
|
|
|
ORGCM = single
|
2012-08-19 10:21:33 +00:00
|
|
|
# ORGCM = dirall # 1x slowdown compared to default compilation method
|
|
|
|
# ORGCM = single # 4x one Emacs process per compilation
|
2024-02-08 19:16:51 +00:00
|
|
|
# ORGCM = native # 4x one Emacs process per native compilation
|
2012-08-19 10:21:33 +00:00
|
|
|
# ORGCM = source # 5x ditto, but remove compiled file immediately
|
|
|
|
# ORGCM = slint1 # 3x possibly elicit more warnings
|
|
|
|
# ORGCM = slint2 # 7x possibly elicit even more warnings
|