Better Org-mode initialization for batch tests.
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blobce419c1cc20784bb9b8cda1bcf18a9bdaff28e4a
1 # Makefile - for the org-mode distribution
3 # Maintainer: Carsten Dominik <dominik@science.uva.nl>
4 # Version: VERSIONTAG
6 # To install org-mode, edit the Makefile, type `make', then `make install'.
7 # To create the PDF and HTML documentation files, type `make doc'.
9 ##----------------------------------------------------------------------
10 ## YOU MUST EDIT THE FOLLOWING LINES
11 ##----------------------------------------------------------------------
13 # Name of your emacs binary
14 EMACS=emacs
16 # Where local software is found
17 prefix=/usr/local
19 # Where local lisp files go.
20 lispdir = $(prefix)/share/emacs/site-lisp
22 # Where info files go.
23 infodir = $(prefix)/share/info
25 ##----------------------------------------------------------------------
26 ## YOU MAY NEED TO EDIT THESE
27 ##----------------------------------------------------------------------
29 # Using emacs in batch mode.
31 BATCH=$(EMACS) -batch -q -no-site-file -eval \
32 "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))"
34 # Specify the byte-compiler for compiling org-mode files
35 ELC= $(BATCH) -f batch-byte-compile
37 # How to make a pdf file from a texinfo file
38 TEXI2PDF = texi2pdf
40 # How to create directories
41 MKDIR = mkdir -p
43 # How to create the info files from the texinfo file
44 MAKEINFO = makeinfo
46 # How to create the HTML file
47 TEXI2HTML = makeinfo --html --number-sections
48 TEXI2HTMLNOPSLIT = makeinfo --html --no-split --number-sections
50 # How to copy the lisp files and elc files to their distination.
51 CP = cp -p
53 # Name of the program to install info files
54 INSTALL_INFO=install-info
56 ##----------------------------------------------------------------------
57 ## BELOW THIS LINE ON YOUR OWN RISK!
58 ##----------------------------------------------------------------------
60 # The following variables need to be defined by the maintainer
61 LISPF = org.el \
62 org-agenda.el \
63 org-ascii.el \
64 org-attach.el \
65 org-archive.el \
66 org-bbdb.el \
67 org-beamer.el \
68 org-bibtex.el \
69 org-capture.el \
70 org-clock.el \
71 org-colview.el \
72 org-colview-xemacs.el \
73 org-compat.el \
74 org-pcomplete.el \
75 org-crypt.el \
76 org-ctags.el \
77 org-datetree.el \
78 org-docview.el \
79 org-entities.el \
80 org-exp.el \
81 org-exp-blocks.el \
82 org-docbook.el \
83 org-faces.el \
84 org-feed.el \
85 org-footnote.el \
86 org-freemind.el \
87 org-gnus.el \
88 org-habit.el \
89 org-html.el \
90 org-icalendar.el \
91 org-id.el \
92 org-indent.el \
93 org-info.el \
94 org-inlinetask.el \
95 org-jsinfo.el \
96 org-irc.el \
97 org-latex.el \
98 org-list.el \
99 org-mac-message.el \
100 org-macs.el \
101 org-mew.el \
102 org-mhe.el \
103 org-mks.el \
104 org-mobile.el \
105 org-mouse.el \
106 org-publish.el \
107 org-plot.el \
108 org-protocol.el \
109 org-remember.el \
110 org-rmail.el \
111 org-special-blocks.el \
112 org-src.el \
113 org-table.el \
114 org-taskjuggler.el \
115 org-timer.el \
116 org-vm.el \
117 org-w3m.el \
118 org-wl.el \
119 org-xoxo.el \
120 ob.el \
121 ob-table.el \
122 ob-lob.el \
123 ob-ref.el \
124 ob-exp.el \
125 ob-tangle.el \
126 ob-comint.el \
127 ob-eval.el \
128 ob-keys.el \
129 ob-awk.el \
130 ob-C.el \
131 ob-calc.el \
132 ob-ditaa.el \
133 ob-haskell.el \
134 ob-perl.el \
135 ob-sh.el \
136 ob-R.el \
137 ob-dot.el \
138 ob-mscgen.el \
139 ob-latex.el \
140 ob-lisp.el \
141 ob-ledger.el \
142 ob-python.el \
143 ob-sql.el \
144 ob-asymptote.el \
145 ob-emacs-lisp.el \
146 ob-matlab.el \
147 ob-ruby.el \
148 ob-sqlite.el \
149 ob-clojure.el \
150 ob-ocaml.el \
151 ob-sass.el \
152 ob-css.el \
153 ob-gnuplot.el \
154 ob-octave.el \
155 ob-screen.el \
156 ob-plantuml.el \
157 ob-org.el \
158 ob-js.el \
159 ob-scheme.el \
160 ob-lilypond.el \
161 ob-java.el
163 LISPFILES0 = $(LISPF:%=lisp/%)
164 LISPFILES = $(LISPFILES0) lisp/org-install.el
165 ELCFILES0 = $(LISPFILES0:.el=.elc)
166 ELCFILES = $(LISPFILES:.el=.elc)
167 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
168 doc/pdflayout.sty doc/.nosearch \
169 doc/orgguide.texi doc/orgguide.pdf
170 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
171 TEXIFILES = doc/org.texi
172 INFOFILES = doc/org
174 # Package Manager (ELPA)
175 PKG_TAG = $(shell date +%Y%m%d)
176 PKG_DOC = "Outline-based notes management and organizer"
177 PKG_REQ = "nil"
179 PKG_FILES = $(LISPFILES0) \
180 doc/dir doc/org \
181 doc/pdflayout.sty \
182 doc/org.pdf \
183 doc/orgguide.pdf \
184 doc/orgcard.tex \
185 doc/orgcard.pdf \
186 doc/orgcard_letter.pdf
188 .SUFFIXES: .el .elc .texi
189 SHELL = /bin/sh
191 # Additional distribution files
192 DISTFILES_extra= Makefile request-assign-future.txt contrib
194 default: $(ELCFILES) $(ELCBFILES)
196 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
198 up2: update
199 sudo ${MAKE} install
201 update:
202 git pull
203 ${MAKE} clean
204 ${MAKE} all
206 compile: $(ELCFILES0) $(ELCBFILES)
208 install: install-lisp
210 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
213 ${MAKE} pdf && open doc/org.pdf
216 ${MAKE} pdf && open doc/orgguide.pdf
218 install-lisp: $(LISPFILES) $(ELCFILES)
219 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
220 $(CP) $(LISPFILES) $(lispdir)
221 $(CP) $(ELCFILES) $(lispdir)
223 install-info: $(INFOFILES)
224 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
225 $(CP) $(INFOFILES) $(infodir)
226 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
228 autoloads: lisp/org-install.el
230 lisp/org-install.el: $(LISPFILES0) Makefile
231 $(BATCH) --eval "(require 'autoload)" \
232 --eval '(find-file "lisp/org-install.el")' \
233 --eval '(erase-buffer)' \
234 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
235 --eval '(insert "\n(provide (quote org-install))\n")' \
236 --eval '(save-buffer)'
238 doc/org: doc/org.texi
239 (cd doc && $(MAKEINFO) --no-split org.texi -o org)
241 doc/org.pdf: doc/org.texi
242 (cd doc && $(TEXI2PDF) org.texi)
244 doc/orgguide.pdf: doc/orgguide.texi
245 (cd doc && $(TEXI2PDF) orgguide.texi)
247 doc/org.html: doc/org.texi
248 (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
249 UTILITIES/manfull.pl doc/org.html
251 doc/orgcard.pdf: doc/orgcard.tex
252 (cd doc && pdftex orgcard.tex)
254 doc/orgcard.txt: doc/orgcard.tex
255 (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
257 doc/orgcard_letter.tex: doc/orgcard.tex
258 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
259 doc/orgcard.tex > doc/orgcard_letter.tex
261 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
262 (cd doc && pdftex orgcard_letter.tex)
264 # Below here are special targets for maintenance only
266 html: doc/org.html
268 html_manual: doc/org.texi
269 rm -rf doc/manual
270 mkdir doc/manual
271 $(TEXI2HTML) -o doc/manual doc/org.texi
272 UTILITIES/mansplit.pl doc/manual/*.html
274 html_guide: doc/orgguide.texi
275 rm -rf doc/guide
276 mkdir doc/guide
277 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
278 UTILITIES/guidesplit.pl doc/guide/*.html
280 info: doc/org
282 pdf: doc/org.pdf doc/orgguide.pdf
284 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
286 testrelease:
287 git checkout -b testrelease origin/maint
288 git merge -s recursive -X theirs master
289 UTILITIES/set-version.pl testing
290 git commit -a -m "Release testing"
291 make distfile TAG=testversion
292 make cleanrel
293 rm -rf org-testversion*
294 git reset --hard
295 git checkout master
296 git branch -D testrelease
298 # The following target makes a full release for the stuff that is
299 # currently on master. Do it like this:
301 # make release TAG=7.01
303 release:
304 git checkout maint
305 git merge -s recursive -X theirs master
306 UTILITIES/set-version.pl $(TAG)
307 git commit -a -m "Release $(TAG)"
308 make relup TAG=$(TAG)
309 make cleanrel
310 rm -rf org-$(TAG)
311 rm -f org-$(TAG)*.zip
312 rm -f org-$(TAG)*.tar.gz
313 make pushreleasetag TAG=$(TAG)
314 git push -f origin maint
315 git checkout master
316 git merge -s ours maint
317 UTILITIES/set-version.pl -a $(TAG)
318 git commit -a -m "Update website to show $(TAG) as current release"
319 git push
321 # The following target makes a release, but from the stuff that is on
322 # maint, not from the stuff that is on master. The idea is that it pushes
323 # out a minor fix into a minor update, while development on master
324 # already went full steam ahead. To make a micro-relesse, cherry-pick
325 # the necessary changes into maint, then run (with proper version number)
326 # This is just like release, but we skip the step which merges master
327 # into maint.
329 # make fixrelease TAG=7.01.02
331 fixrelease:
332 git checkout maint
333 git merge -s recursive -X theirs master
334 UTILITIES/set-version.pl $(TAG)
335 git commit -a -m "Release $(TAG)"
336 make relup TAG=$(TAG)
337 make cleanrel
338 rm -rf org-$(TAG)
339 rm org-$(TAG)*.zip
340 rm org-$(TAG)*.tar.gz
341 make pushreleasetag TAG=$(TAG)
342 git push -f origin maint
343 git checkout master
344 git merge -s ours maint
345 UTILITIES/set-version.pl -o $(TAG)
346 git commit -a -m "Update website to show $(TAG) as current release"
347 git push
349 # ~$ make relup only makes sense from orgmode.org server
350 # Don't call it from your computer!
351 relup:
352 ${MAKE} makerelease
353 ${MAKE} sync_release
354 ${MAKE} sync_manual
356 makerelease:
357 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
358 ${MAKE} distfile
359 ${MAKE} doc
360 UTILITIES/gplmanual.pl
361 ${MAKE} html_manual
362 ${MAKE} html_guide
363 rm -rf RELEASEDIR
364 $(MKDIR) RELEASEDIR
365 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
366 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
367 cp doc/org_dual_license.texi RELEASEDIR
368 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
369 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
370 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
372 # ~$ make sync_release only makes sense from orgmode.org server
373 # Don't call it from your computer!
374 sync_release:
375 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
377 # ~$ make sync_manual only makes sense from orgmode.org server
378 # Don't call it from your computer!
379 sync_manual:
380 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
381 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
383 distfile:
384 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
385 touch doc/org.texi doc/orgcard.tex # force update
386 ${MAKE} cleancontrib
387 ${MAKE} info
388 ${MAKE} doc
389 ${MAKE} lisp/org-install.el
390 rm -rf org-$(TAG) org-$(TAG).zip
391 $(MKDIR) org-$(TAG)
392 $(MKDIR) org-$(TAG)/doc
393 $(MKDIR) org-$(TAG)/lisp
394 cp -r $(LISPFILES) org-$(TAG)/lisp
395 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
396 cp -r $(DISTFILES_extra) org-$(TAG)/
397 cp -r README_DIST org-$(TAG)/README
398 zip -r org-$(TAG).zip org-$(TAG)
399 tar zcvf org-$(TAG).tar.gz org-$(TAG)
401 pkg:
402 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
403 touch doc/org.texi doc/orgcard.tex # force update
404 ${MAKE} info
405 ${MAKE} doc
406 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
407 $(MKDIR) org-$(PKG_TAG)
408 cp -r $(PKG_FILES) org-$(PKG_TAG)
409 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
410 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
412 cleanall:
413 ${MAKE} clean
414 rm -f lisp/org-install.el
416 clean:
417 ${MAKE} cleanelc
418 ${MAKE} cleandoc
419 ${MAKE} cleanrel
420 rm -f *~ */*~ */*/*~
422 cleancontrib:
423 find contrib -name \*~ -exec rm {} \;
425 cleanelc:
426 rm -f $(ELCFILES)
427 cleandoc:
428 -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
429 -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
430 -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
431 -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
432 -(cd doc && rm -rf manual)
434 cleanrel:
435 rm -rf RELEASEDIR
436 rm -rf org-7.*
437 rm -rf org-7*zip org-7*tar.gz
439 .el.elc:
440 $(ELC) $<
443 push:
444 git push orgmode@orgmode.org:org-mode.git master
446 pushtag:
447 git tag -m "Adding tag" -a $(TAG)
448 git push orgmode@orgmode.org:org-mode.git $(TAG)
450 pushreleasetag:
451 git tag -m "Adding release tag" -a release_$(TAG)
452 git push orgmode@orgmode.org:org-mode.git release_$(TAG)
454 # Dependencies
456 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
457 lisp/org-agenda.elc: lisp/org.el
458 lisp/org-ascii.elc: lisp/org-exp.el
459 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
460 lisp/org-archive.elc: lisp/org.el
461 lisp/org-bbdb.elc: lisp/org.el
462 lisp/org-beamer.elc: lisp/org.el
463 lisp/org-bibtex.elc: lisp/org.el
464 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
465 lisp/org-clock.elc: lisp/org.el
466 lisp/org-colview.elc: lisp/org.el
467 lisp/org-colview-xemacs.elc: lisp/org.el
468 lisp/org-compat.elc: lisp/org-macs.el
469 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
470 lisp/org-ctags.elc: lisp/org.el
471 lisp/org-datetree.elc: lisp/org.el
472 lisp/org-docview.elc: lisp/org.el
473 lisp/org-entities.elc:
474 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
475 lisp/org-exp-blocks.elc: lisp/org.el
476 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
477 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
478 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
479 lisp/org-feed.elc: lisp/org.el
480 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
481 lisp/org-freemind.elc: lisp/org.el
482 lisp/org-gnus.elc: lisp/org.el
483 lisp/org-html.elc: lisp/org-exp.el
484 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
485 lisp/org-icalendar.elc: lisp/org-exp.el
486 lisp/org-id.elc: lisp/org.el
487 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
488 lisp/org-info.elc: lisp/org.el
489 lisp/org-inlinetask.elc:
490 lisp/org-irc.elc: lisp/org.el
491 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
492 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
493 lisp/org-mac-message.elc: lisp/org.el
494 lisp/org-macs.elc:
495 lisp/org-mew.elc: lisp/org.el
496 lisp/org-mhe.elc: lisp/org.el
497 lisp/org-mks.elc:
498 lisp/org-mobile.elc: lisp/org.el
499 lisp/org-mouse.elc: lisp/org.el
500 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
501 lisp/org-publish.elc:
502 lisp/org-protocol.elc: lisp/org.el
503 lisp/org-remember.elc: lisp/org.el
504 lisp/org-rmail.elc: lisp/org.el
505 lisp/org-special-blocks.elc: lisp/org-compat.el
506 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
507 lisp/org-table.elc: lisp/org.el
508 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
509 lisp/org-timer.elc: lisp/org.el
510 lisp/org-vm.elc: lisp/org.el
511 lisp/org-w3m.elc: lisp/org.el
512 lisp/org-wl.elc: lisp/org.el
513 lisp/org-xoxo.elc: lisp/org-exp.el
515 # Describe valid make targets for org-mode.
516 targets help:
517 @echo "make - compile Org ELisp files"
518 @echo "make clean - clean Elisp and documentation files"
519 @echo "make all - compile Org ELisp files and documentation"
520 @echo ""
521 @echo "make doc - make all documentation"
522 @echo "make info - make Info documentation"
523 @echo "make html - make HTML documentation"
524 @echo "make pdf - make pdf documentation"
525 @echo "make card - make refcards documentation"
526 @echo ""
527 @echo "make install - install Org"
528 @echo "make install-lisp - install Org ELisp files"
529 @echo "make install-info - install Org Info file"