make vanilla: run Emacs -Q with *this* Org loaded
[org-mode.git] / mk / default.mk
bloba635f006ea4ebfee820bd8662e285634e9a2504f
1 ##----------------------------------------------------------------------
2 ## NEVER EDIT THIS FILE, PUT ANY ADAPTATIONS INTO local.mk
3 ##-8<-------------------------------------------------------------------
4 ## CHECK AND ADAPT THE FOLLOWING DEFINITIONS
5 ##----------------------------------------------------------------------
7 # Name of your emacs binary
8 EMACS = emacs
10 # Where local software is found
11 prefix = /usr/share
13 # Where local lisp files go.
14 lispdir= $(prefix)/emacs/site-lisp/org
16 # Where local data files go.
17 datadir = $(prefix)/emacs/etc/org
19 # Where info files go.
20 infodir = $(prefix)/info
22 # Define if you only need info documentation, the default includes html and pdf
23 #ORG_MAKE_DOC = info # html pdf
25 # Define if you want to include some (or all) files from contrib/lisp
26 # just the filename please (no path prefix, no .el suffix), maybe with globbing
27 #ORG_ADD_CONTRIB = ox-* # e.g. the contributed exporter
29 # Where to create temporary files for the testsuite
30 # respect TMPDIR if it is already defined in the environment
31 TMPDIR ?= /tmp
32 testdir = $(TMPDIR)/tmp-orgtest
34 # Configuration for testing
35 # add options before standard load-path
36 BTEST_PRE =
37 # add options after standard load path
38 BTEST_POST =
39 # -L <path-to>/ert # needed for Emacs23, Emacs24 has ert built in
40 # -L <path-to>/ess # needed for running R tests
41 # -L <path-to>/htmlize # need at least version 1.34 for source code formatting
42 BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python
43 # R # requires ESS to be installed and configured
44 # ruby # requires inf-ruby to be installed and configured
45 # extra packages to require for testing
46 BTEST_EXTRA =
47 # ess-site # load ESS for R tests
48 ##->8-------------------------------------------------------------------
49 ## YOU MAY NEED TO ADAPT THESE DEFINITIONS
50 ##----------------------------------------------------------------------
52 # How to run tests
53 req-ob-lang = --eval '(require '"'"'ob-$(ob-lang))'
54 lst-ob-lang = ($(ob-lang) . t)
55 req-extra = --eval '(require '"'"'$(req))'
56 BTEST_RE ?= \\(org\\|ob\\)
57 BTEST_INIT = $(BATCH) \
58 $(BTEST_PRE) \
59 --eval '(add-to-list '"'"'load-path (concat default-directory "lisp"))' \
60 --eval '(add-to-list '"'"'load-path (concat default-directory "testing"))' \
61 $(BTEST_POST)
62 BTEST = $(BTEST_INIT) \
63 -l org-batch-test-init \
64 --eval '(setq \
65 org-batch-test t \
66 org-babel-load-languages \
67 (quote ($(foreach ob-lang,$(BTEST_OB_LANGUAGES) emacs-lisp shell org,$(lst-ob-lang)))) \
68 org-test-select-re "$(BTEST_RE)" \
69 )' \
70 -l org-loaddefs.el \
71 -l cl -l testing/org-test.el \
72 -l ert -l org -l ox \
73 $(foreach req,$(BTEST_EXTRA),$(req-extra)) \
74 --eval '(org-test-run-batch-tests org-test-select-re)'
76 # Running a plain emacs with no config and this Org-mode loaded. This
77 # should be useful for testing and for manually verrifying problems.
78 NOBATCH = $(filter-out -batch,$(BTEST_INIT)) -l org -f org-version
80 # Using emacs in batch mode.
81 # BATCH = $(EMACS) -batch -vanilla # XEmacs
82 BATCH = $(EMACS) -batch -Q \
83 --eval '(setq vc-handled-backends nil org-startup-folded nil)'
85 # Emacs must be started in toplevel directory
86 BATCHO = $(BATCH) \
87 --eval '(add-to-list '"'"'load-path "./lisp")'
89 # How to generate local.mk
90 MAKE_LOCAL_MK = $(BATCHO) \
91 --eval '(load "org-compat.el")' \
92 --eval '(load "../mk/org-fixup.el")' \
93 --eval '(org-make-local-mk)'
95 # Emacs must be started in lisp directory
96 BATCHL = $(BATCH) \
97 --eval '(add-to-list '"'"'load-path ".")'
99 # How to generate org-loaddefs.el
100 MAKE_ORG_INSTALL = $(BATCHL) \
101 --eval '(load "org-compat.el")' \
102 --eval '(load "../mk/org-fixup.el")' \
103 --eval '(org-make-org-loaddefs)'
105 # How to generate org-version.el
106 MAKE_ORG_VERSION = $(BATCHL) \
107 --eval '(load "org-compat.el")' \
108 --eval '(load "../mk/org-fixup.el")' \
109 --eval '(org-make-org-version "$(ORGVERSION)" "$(GITVERSION)" "'$(datadir)'")'
111 # How to byte-compile the whole source directory
112 ELCDIR = $(BATCHL) \
113 --eval '(batch-byte-recompile-directory 0)'
115 # How to byte-compile a single file
116 ELC = $(BATCHL) \
117 --eval '(batch-byte-compile)'
119 # How to make a pdf file from a texinfo file
120 TEXI2PDF = texi2pdf --batch --clean --expand
122 # How to make a pdf file from a tex file
123 PDFTEX = pdftex
125 # How to create directories with leading path components
126 # MKDIR = mkdir -m 755 -p # try this if you have no install
127 MKDIR = install -m 755 -d
129 # How to create the info files from the texinfo file
130 MAKEINFO = makeinfo
132 # How to create the HTML file
133 TEXI2HTML = makeinfo --html --number-sections
135 # How to find files
136 FIND = find
138 # How to remove files
139 RM = rm -f
141 # How to remove files recursively
142 RMR = rm -fr
144 # How to copy the lisp files and elc files to their destination.
145 # CP = cp -p # try this if you have no install
146 CP = install -m 644 -p
148 # How to obtain administrative privileges
149 # leave blank if you don't need this
150 # SUDO =
151 SUDO = sudo
153 # Name of the program to install info files
154 # INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message
155 INSTALL_INFO = install-info
157 # target method for 'compile'
158 ORGCM = dirall
159 # ORGCM = dirall # 1x slowdown compared to default compilation method
160 # ORGCM = single # 4x one Emacs process per compilation
161 # ORGCM = source # 5x ditto, but remove compiled file immediately
162 # ORGCM = slint1 # 3x possibly elicit more warnings
163 # ORGCM = slint2 # 7x possibly elicit even more warnings