2011-07-12 13:45:59 -04:00
|
|
|
##----------------------------------------------------------------------
|
2012-01-05 14:54:52 -05:00
|
|
|
## NEVER EDIT THIS FILE, PUT ANY ADAPTATIONS INTO local.mk
|
2012-04-23 15:20:58 -04:00
|
|
|
##-8<-------------------------------------------------------------------
|
2012-05-26 16:32:21 -04:00
|
|
|
## CHECK AND ADAPT THE FOLLOWING DEFINITIONS
|
|
|
|
##----------------------------------------------------------------------
|
2012-04-22 02:22:31 -04:00
|
|
|
|
2011-07-12 13:45:59 -04:00
|
|
|
# Name of your emacs binary
|
2012-01-05 14:54:52 -05:00
|
|
|
EMACS = emacs
|
2011-07-12 13:45:59 -04:00
|
|
|
|
|
|
|
# Where local software is found
|
2012-01-05 14:54:52 -05:00
|
|
|
prefix = /usr/share
|
2011-07-12 13:45:59 -04:00
|
|
|
|
|
|
|
# Where local lisp files go.
|
2012-01-05 14:54:52 -05:00
|
|
|
lispdir= $(prefix)/emacs/site-lisp/org
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-10-03 06:13:33 -04:00
|
|
|
# Where local data files go.
|
|
|
|
datadir = $(prefix)/emacs/etc/org
|
|
|
|
|
2011-07-12 13:45:59 -04:00
|
|
|
# Where info files go.
|
2011-07-12 14:11:15 -04:00
|
|
|
infodir = $(prefix)/info
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-04-22 02:22:31 -04:00
|
|
|
# Define if you only need info documentation, the default includes html and pdf
|
2012-05-26 16:32:21 -04:00
|
|
|
#ORG_MAKE_DOC = info # html pdf
|
2012-04-22 02:22:31 -04:00
|
|
|
|
2012-08-22 02:04:56 -04:00
|
|
|
# Define if you want to include some (or all) files from contrib/lisp
|
|
|
|
# just the filename please (no path prefix, no .el suffix), maybe with globbing
|
2013-02-22 08:33:41 -05:00
|
|
|
#ORG_ADD_CONTRIB = ox-* # e.g. the contributed exporter
|
2012-08-22 02:04:56 -04:00
|
|
|
|
2012-04-01 03:48:18 -04:00
|
|
|
# Where to create temporary files for the testsuite
|
2012-05-31 14:10:56 -04:00
|
|
|
# respect TMPDIR if it is already defined in the environment
|
|
|
|
TMPDIR ?= /tmp
|
2012-02-16 15:24:51 -05:00
|
|
|
testdir = $(TMPDIR)/tmp-orgtest
|
|
|
|
|
2012-04-01 03:48:18 -04:00
|
|
|
# Configuration for testing
|
2012-05-31 14:10:56 -04:00
|
|
|
# add options before standard load-path
|
|
|
|
BTEST_PRE =
|
|
|
|
# add options after standard load path
|
|
|
|
BTEST_POST =
|
2012-04-01 03:48:18 -04:00
|
|
|
# -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
|
2012-07-15 12:03:27 -04:00
|
|
|
# -L <path-to>/ess # needed for running R tests
|
2012-04-01 03:48:18 -04:00
|
|
|
# -L <path-to>/htmlize # need at least version 1.34 for source code formatting
|
2013-11-23 11:46:35 -05:00
|
|
|
BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python
|
2012-07-15 12:03:27 -04:00
|
|
|
# R # requires ESS to be installed and configured
|
2013-11-23 11:46:35 -05:00
|
|
|
# ruby # requires inf-ruby to be installed and configured
|
2012-05-31 14:10:56 -04:00
|
|
|
# extra packages to require for testing
|
|
|
|
BTEST_EXTRA =
|
2012-07-15 12:03:27 -04:00
|
|
|
# ess-site # load ESS for R tests
|
2012-04-23 15:20:58 -04:00
|
|
|
##->8-------------------------------------------------------------------
|
2012-01-05 14:54:52 -05:00
|
|
|
## YOU MAY NEED TO ADAPT THESE DEFINITIONS
|
2011-07-12 13:45:59 -04:00
|
|
|
##----------------------------------------------------------------------
|
|
|
|
|
2012-01-05 14:54:52 -05:00
|
|
|
# How to run tests
|
2012-03-04 06:07:44 -05:00
|
|
|
req-ob-lang = --eval '(require '"'"'ob-$(ob-lang))'
|
2013-11-23 11:46:35 -05:00
|
|
|
lst-ob-lang = ($(ob-lang) . t)
|
2012-03-04 06:07:44 -05:00
|
|
|
req-extra = --eval '(require '"'"'$(req))'
|
2013-11-23 11:46:35 -05:00
|
|
|
BTEST_RE ?= \\(org\\|ob\\)
|
2013-12-13 11:34:35 -05:00
|
|
|
BTEST_INIT = $(BATCH) \
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 13:24:39 -04:00
|
|
|
$(BTEST_PRE) \
|
2013-11-23 11:46:35 -05:00
|
|
|
--eval '(add-to-list '"'"'load-path (concat default-directory "lisp"))' \
|
|
|
|
--eval '(add-to-list '"'"'load-path (concat default-directory "testing"))' \
|
2013-12-13 11:34:35 -05:00
|
|
|
$(BTEST_POST)
|
|
|
|
BTEST = $(BTEST_INIT) \
|
2013-11-23 11:46:35 -05:00
|
|
|
-l org-batch-test-init \
|
|
|
|
--eval '(setq \
|
|
|
|
org-batch-test t \
|
|
|
|
org-babel-load-languages \
|
2013-12-13 12:03:05 -05:00
|
|
|
(quote ($(foreach ob-lang,$(BTEST_OB_LANGUAGES) emacs-lisp shell org,$(lst-ob-lang)))) \
|
2013-11-23 11:46:35 -05:00
|
|
|
org-test-select-re "$(BTEST_RE)" \
|
|
|
|
)' \
|
2012-10-02 05:30:24 -04:00
|
|
|
-l org-loaddefs.el \
|
2013-11-23 11:46:35 -05:00
|
|
|
-l cl -l testing/org-test.el \
|
|
|
|
-l ert -l org -l ox \
|
2012-03-04 06:07:44 -05:00
|
|
|
$(foreach req,$(BTEST_EXTRA),$(req-extra)) \
|
2013-11-23 11:46:35 -05:00
|
|
|
--eval '(org-test-run-batch-tests org-test-select-re)'
|
2012-01-04 15:02:14 -05:00
|
|
|
|
2013-12-13 11:34:35 -05:00
|
|
|
# Running a plain emacs with no config and this Org-mode loaded. This
|
|
|
|
# should be useful for testing and for manually verrifying problems.
|
|
|
|
NOBATCH = $(filter-out -batch,$(BTEST_INIT)) -l org -f org-version
|
|
|
|
|
2012-04-01 03:48:18 -04:00
|
|
|
# Using emacs in batch mode.
|
cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
org-version.el and org-install.el, now use by the build system.
* lisp/Makefile: delete said definitions, now sourced from toplevel
make. "clean" and "cleanall" should do the same thing here, make
them aliases, ditto for "all" and "compile". Both autoload files
must be .PHONY and depend only on each other for correct ordering.
Make "compile-dirty" actually do that again (i.e. no implied
"clean", but "cleanauto"). Remove autoload files directly after
install, so that they will only be present when explicitly requested
by "autoloads". Create "org-version.el" before compilation as it is
mandatory. Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
source from default.mk/local.mk.
* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
$(ORG_MAKE_VERSION) here so that they can be more easily configured.
Remove definition of "org-release" from $(BATCH) and $(BTEST), now
sourced from "org-version.el".
* targets.mk: target reorganization, introduce "stop" targets to
prevent cleaning of org-version.el. Use new targets for "oldorg" to
make it more robust in case of errors. New target "cleanutils" to
remove any "*.elc" files that may have been produced there and add
this target to "cleanall". Do the same in cleancontrib.
2012-04-28 13:24:39 -04:00
|
|
|
# BATCH = $(EMACS) -batch -vanilla # XEmacs
|
2013-03-18 03:11:46 -04:00
|
|
|
BATCH = $(EMACS) -batch -Q \
|
2013-11-30 11:02:46 -05:00
|
|
|
--eval '(setq vc-handled-backends nil org-startup-folded nil)'
|
2012-05-19 16:08:06 -04:00
|
|
|
|
2012-09-29 04:47:40 -04:00
|
|
|
# Emacs must be started in toplevel directory
|
|
|
|
BATCHO = $(BATCH) \
|
|
|
|
--eval '(add-to-list '"'"'load-path "./lisp")'
|
|
|
|
|
2012-05-26 16:32:21 -04:00
|
|
|
# How to generate local.mk
|
2012-09-29 04:47:40 -04:00
|
|
|
MAKE_LOCAL_MK = $(BATCHO) \
|
2012-05-26 16:32:21 -04:00
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 08:03:20 -04:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2012-05-26 16:32:21 -04:00
|
|
|
--eval '(org-make-local-mk)'
|
|
|
|
|
2012-05-19 16:08:06 -04:00
|
|
|
# Emacs must be started in lisp directory
|
|
|
|
BATCHL = $(BATCH) \
|
|
|
|
--eval '(add-to-list '"'"'load-path ".")'
|
|
|
|
|
2012-10-02 05:30:24 -04:00
|
|
|
# How to generate org-loaddefs.el
|
2012-05-19 16:08:06 -04:00
|
|
|
MAKE_ORG_INSTALL = $(BATCHL) \
|
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 08:03:20 -04:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2012-10-02 05:30:24 -04:00
|
|
|
--eval '(org-make-org-loaddefs)'
|
2012-05-19 16:08:06 -04:00
|
|
|
|
|
|
|
# How to generate org-version.el
|
|
|
|
MAKE_ORG_VERSION = $(BATCHL) \
|
|
|
|
--eval '(load "org-compat.el")' \
|
2012-08-26 08:03:20 -04:00
|
|
|
--eval '(load "../mk/org-fixup.el")' \
|
2013-03-18 03:14:25 -04:00
|
|
|
--eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "'$(datadir)'")'
|
2012-04-01 03:48:18 -04:00
|
|
|
|
2011-11-13 05:53:12 -05:00
|
|
|
# How to byte-compile the whole source directory
|
2012-05-19 16:08:06 -04:00
|
|
|
ELCDIR = $(BATCHL) \
|
|
|
|
--eval '(batch-byte-recompile-directory 0)'
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-08-04 09:50:39 -04:00
|
|
|
# How to byte-compile a single file
|
|
|
|
ELC = $(BATCHL) \
|
|
|
|
--eval '(batch-byte-compile)'
|
|
|
|
|
2011-07-12 13:45:59 -04:00
|
|
|
# How to make a pdf file from a texinfo file
|
2013-09-30 02:36:16 -04:00
|
|
|
TEXI2PDF = texi2pdf --batch --clean --expand
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
# How to make a pdf file from a tex file
|
|
|
|
PDFTEX = pdftex
|
|
|
|
|
2012-05-26 16:32:21 -04: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 13:45:59 -04:00
|
|
|
|
|
|
|
# How to create the info files from the texinfo file
|
|
|
|
MAKEINFO = makeinfo
|
|
|
|
|
|
|
|
# How to create the HTML file
|
|
|
|
TEXI2HTML = makeinfo --html --number-sections
|
|
|
|
|
2011-07-12 16:31:41 -04:00
|
|
|
# How to find files
|
2012-01-05 14:54:52 -05:00
|
|
|
FIND = find
|
2011-07-12 16:31:41 -04:00
|
|
|
|
|
|
|
# How to remove files
|
2012-01-05 14:54:52 -05:00
|
|
|
RM = rm -f
|
2011-07-12 16:31:41 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
# How to remove files recursively
|
2012-01-05 14:54:52 -05:00
|
|
|
RMR = rm -fr
|
2011-07-17 08:49:43 -04:00
|
|
|
|
2011-07-12 14:11:15 -04:00
|
|
|
# How to copy the lisp files and elc files to their destination.
|
2012-05-26 16:32:21 -04:00
|
|
|
# CP = cp -p # try this if you have no install
|
|
|
|
CP = install -m 644 -p
|
2011-07-12 13:45:59 -04:00
|
|
|
|
2012-01-31 14:44:37 -05:00
|
|
|
# How to obtain administrative privileges
|
2012-05-31 14:10:56 -04:00
|
|
|
# leave blank if you don't need this
|
|
|
|
# SUDO =
|
2012-01-31 14:44:37 -05:00
|
|
|
SUDO = sudo
|
|
|
|
|
2011-07-12 13:45:59 -04:00
|
|
|
# Name of the program to install info files
|
2012-01-05 14:54:52 -05:00
|
|
|
# INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
|
2011-07-12 14:11:15 -04:00
|
|
|
INSTALL_INFO = install-info
|
2012-08-19 06:20:47 -04:00
|
|
|
|
2012-08-19 06:21:33 -04:00
|
|
|
# target method for 'compile'
|
|
|
|
ORGCM = dirall
|
|
|
|
# ORGCM = dirall # 1x slowdown compared to default compilation method
|
|
|
|
# ORGCM = single # 4x one Emacs process per compilation
|
|
|
|
# ORGCM = source # 5x ditto, but remove compiled file immediately
|
|
|
|
# ORGCM = slint1 # 3x possibly elicit more warnings
|
|
|
|
# ORGCM = slint2 # 7x possibly elicit even more warnings
|