Merge branch 'origin-maint'
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blobc99f05c9da62ce1663abdc9fa9a56f24e7d36bdc
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 data files go
23 # $(datadir) contains auxiliary files for use with ODT exporter.
24 # See comments under DATAFILES.
25 datadir = $(prefix)/share/emacs/etc
27 # Where info files go
28 infodir = $(prefix)/share/info
30 ##----------------------------------------------------------------------
31 ## YOU MAY NEED TO EDIT THESE
32 ##----------------------------------------------------------------------
34 # Using emacs in batch mode.
36 BATCH=$(EMACS) -batch -q -no-site-file -eval \
37 "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))" $(BATCH_EXTRA)
39 # Specify the byte-compiler for compiling org-mode files
40 ELC= $(BATCH) -f batch-byte-compile
42 # How to make a pdf file from a texinfo file
43 TEXI2PDF = texi2pdf
45 # How to create directories
46 MKDIR = mkdir -p
48 # How to create the info files from the texinfo file
49 MAKEINFO = makeinfo
51 # How to create the HTML file
52 TEXI2HTML = makeinfo --html --number-sections
53 TEXI2HTMLNOPSLIT = makeinfo --html --no-split --number-sections
55 # How to copy the lisp files and elc files to their distination.
56 CP = cp -pr
58 # Name of the program to install info files
59 INSTALL_INFO=install-info
61 ##----------------------------------------------------------------------
62 ## BELOW THIS LINE ON YOUR OWN RISK!
63 ##----------------------------------------------------------------------
65 # The following variables need to be defined by the maintainer
66 LISPF = org.el \
67 org-agenda.el \
68 org-ascii.el \
69 org-attach.el \
70 org-archive.el \
71 org-bbdb.el \
72 org-beamer.el \
73 org-bibtex.el \
74 org-capture.el \
75 org-clock.el \
76 org-colview.el \
77 org-colview-xemacs.el \
78 org-compat.el \
79 org-pcomplete.el \
80 org-crypt.el \
81 org-ctags.el \
82 org-datetree.el \
83 org-docview.el \
84 org-entities.el \
85 org-exp.el \
86 org-exp-blocks.el \
87 org-docbook.el \
88 org-faces.el \
89 org-feed.el \
90 org-footnote.el \
91 org-freemind.el \
92 org-gnus.el \
93 org-eshell.el \
94 org-habit.el \
95 org-html.el \
96 org-icalendar.el \
97 org-id.el \
98 org-indent.el \
99 org-info.el \
100 org-inlinetask.el \
101 org-jsinfo.el \
102 org-irc.el \
103 org-latex.el \
104 org-list.el \
105 org-lparse.el \
106 org-mac-message.el \
107 org-macs.el \
108 org-mew.el \
109 org-mhe.el \
110 org-mks.el \
111 org-mobile.el \
112 org-mouse.el \
113 org-odt.el \
114 org-publish.el \
115 org-plot.el \
116 org-protocol.el \
117 org-remember.el \
118 org-rmail.el \
119 org-special-blocks.el \
120 org-src.el \
121 org-table.el \
122 org-taskjuggler.el \
123 org-timer.el \
124 org-vm.el \
125 org-w3m.el \
126 org-wl.el \
127 org-xoxo.el \
128 ob.el \
129 ob-table.el \
130 ob-lob.el \
131 ob-ref.el \
132 ob-exp.el \
133 ob-tangle.el \
134 ob-comint.el \
135 ob-eval.el \
136 ob-keys.el \
137 ob-awk.el \
138 ob-C.el \
139 ob-calc.el \
140 ob-ditaa.el \
141 ob-haskell.el \
142 ob-perl.el \
143 ob-sh.el \
144 ob-R.el \
145 ob-dot.el \
146 ob-mscgen.el \
147 ob-latex.el \
148 ob-lisp.el \
149 ob-ledger.el \
150 ob-python.el \
151 ob-sql.el \
152 ob-asymptote.el \
153 ob-emacs-lisp.el \
154 ob-matlab.el \
155 ob-ruby.el \
156 ob-sqlite.el \
157 ob-clojure.el \
158 ob-ocaml.el \
159 ob-sass.el \
160 ob-css.el \
161 ob-gnuplot.el \
162 ob-octave.el \
163 ob-screen.el \
164 ob-plantuml.el \
165 ob-org.el \
166 ob-js.el \
167 ob-scheme.el \
168 ob-lilypond.el \
169 ob-java.el \
170 ob-shen.el \
171 ob-fortran.el \
172 ob-picolisp.el \
173 ob-maxima.el
175 LISPFILES0 = $(LISPF:%=lisp/%)
176 LISPFILES = $(LISPFILES0) lisp/org-install.el
177 ELCFILES0 = $(LISPFILES0:.el=.elc)
178 ELCFILES = $(LISPFILES:.el=.elc)
179 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
180 doc/pdflayout.sty doc/.nosearch \
181 doc/orgguide.texi doc/orgguide.pdf
182 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
183 TEXIFILES = doc/org.texi
184 INFOFILES = doc/org
186 # etc/styles contains OpenDocument style files. These files *must* be
187 # installed for the ODT exporter to function. These files are
188 # distirbuted with GNU ELPA as well as with stock Emacs >= 24.1.
190 # contrib/odt/etc/schema contains OpenDocument schema files. It is
191 # *desirable* but *not* mandatory that these files be installed.
192 # These files are not distributed with stock Emacs. This is because
193 # the terms under which OASIS distributes these files are not
194 # agreeable to FSF.
196 # BasicODConverter-x.y.z.oxt is a LibreOffice extension for converting
197 # OpenDocument files to numerous other formats. It is similar to
198 # unoconv and is implemented in StarBasic. It is *desirable* but
199 # *not* *mandatory* that the converter be installed. It is
200 # distributed under the same license as GNU Emacs. This file is *not*
201 # part of GNU Emacs.
202 DATAFILES = etc/styles \
203 # contrib/odt/BasicODConverter/BasicODConverter*.oxt \
204 # contrib/odt/etc/schema \
206 # Package Manager (ELPA)
207 PKG_TAG = $(shell date +%Y%m%d)
208 PKG_DOC = "Outline-based notes management and organizer"
209 PKG_REQ = "nil"
211 PKG_FILES = $(LISPFILES0) \
212 doc/dir doc/org \
213 doc/pdflayout.sty \
214 doc/org.pdf \
215 doc/orgguide.pdf \
216 doc/orgcard.tex \
217 doc/orgcard.pdf \
218 doc/orgcard_letter.pdf \
219 etc/
221 .SUFFIXES: .el .elc .texi
222 SHELL = /bin/sh
224 # Additional distribution files
225 DISTFILES_extra= Makefile request-assign-future.txt contrib etc
227 default: $(ELCFILES) $(ELCBFILES)
229 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
231 up2: update
232 sudo ${MAKE} install
234 update:
235 git pull
236 ${MAKE} clean
237 ${MAKE} all
239 compile: $(ELCFILES0) $(ELCBFILES)
241 install: install-lisp install-data
243 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
246 ${MAKE} pdf && open doc/org.pdf
249 ${MAKE} pdf && open doc/orgguide.pdf
251 # Always force re-compilation of org-odt
252 lisp/org-odt.elc: org-odt-data-dir
253 org-odt-data-dir:
255 # Sleight of hand to "hard code" the value of $(datadir) in
256 # org-odt.el. See variables `org-odt-styles-dir-list' and
257 # `org-odt-schema-dir-list'.
258 install-lisp: BATCH_EXTRA = -eval "(setq org-odt-data-dir (expand-file-name \"$(datadir)\"))"
260 install-lisp: $(LISPFILES) $(ELCFILES)
261 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
262 $(CP) $(LISPFILES) $(lispdir)
263 $(CP) $(ELCFILES) $(lispdir)
265 install-info: $(INFOFILES)
266 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
267 $(CP) $(INFOFILES) $(infodir)
268 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
270 install-data: $(DATAFILES)
271 if [ ! -d $(datadir) ]; then $(MKDIR) $(datadir); else true; fi ;
272 $(CP) $(DATAFILES) $(datadir)
274 autoloads: lisp/org-install.el
276 lisp/org-install.el: $(LISPFILES0) Makefile
277 $(BATCH) --eval "(require 'autoload)" \
278 --eval '(find-file "lisp/org-install.el")' \
279 --eval '(erase-buffer)' \
280 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
281 --eval '(insert "\n(provide (quote org-install))\n")' \
282 --eval '(save-buffer)'
284 doc/org: doc/org.texi
285 (cd doc && $(MAKEINFO) --no-split org.texi -o org)
287 doc/org.pdf: doc/org.texi
288 (cd doc && $(TEXI2PDF) org.texi)
290 doc/orgguide.pdf: doc/orgguide.texi
291 (cd doc && $(TEXI2PDF) orgguide.texi)
293 doc/org.html: doc/org.texi
294 (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
295 UTILITIES/manfull.pl doc/org.html
297 doc/orgcard.pdf: doc/orgcard.tex
298 (cd doc && pdftex orgcard.tex)
300 doc/orgcard.txt: doc/orgcard.tex
301 (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
303 doc/orgcard_letter.tex: doc/orgcard.tex
304 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
305 doc/orgcard.tex > doc/orgcard_letter.tex
307 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
308 (cd doc && pdftex orgcard_letter.tex)
310 # Below here are special targets for maintenance only
312 html: doc/org.html
314 html_manual: doc/org.texi
315 rm -rf doc/manual
316 mkdir doc/manual
317 $(TEXI2HTML) -o doc/manual doc/org.texi
318 UTILITIES/mansplit.pl doc/manual/*.html
320 html_guide: doc/orgguide.texi
321 rm -rf doc/guide
322 mkdir doc/guide
323 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
324 UTILITIES/guidesplit.pl doc/guide/*.html
326 info: doc/org
328 pdf: doc/org.pdf doc/orgguide.pdf
330 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
332 testrelease:
333 git checkout -b testrelease origin/maint
334 git merge -s recursive -X theirs master
335 UTILITIES/set-version.pl testing
336 git commit -a -m "Release testing"
337 make distfile TAG=testversion
338 make cleanrel
339 rm -rf org-testversion*
340 git reset --hard
341 git checkout master
342 git branch -D testrelease
344 # The following target makes a full release for the stuff that is
345 # currently on master. Do it like this:
347 # make release TAG=7.01
349 release:
350 git checkout maint
351 git merge -s recursive -X theirs master
352 UTILITIES/set-version.pl $(TAG)
353 git commit -a -m "Release $(TAG)"
354 make relup TAG=$(TAG)
355 make cleanrel
356 rm -rf org-$(TAG)
357 rm -f org-$(TAG)*.zip
358 rm -f org-$(TAG)*.tar.gz
359 make pushreleasetag TAG=$(TAG)
360 git push -f origin maint
361 git checkout master
362 git merge -s ours maint
363 UTILITIES/set-version.pl -a $(TAG)
364 git commit -a -m "Update website to show $(TAG) as current release"
365 git push
367 # The following target makes a release, but from the stuff that is on
368 # maint, not from the stuff that is on master. The idea is that it pushes
369 # out a minor fix into a minor update, while development on master
370 # already went full steam ahead. To make a micro-relesse, cherry-pick
371 # the necessary changes into maint, then run (with proper version number)
372 # This is just like release, but we skip the step which merges master
373 # into maint.
375 # make fixrelease TAG=7.01.02
377 fixrelease:
378 git checkout maint
379 git merge -s recursive -X theirs master
380 UTILITIES/set-version.pl $(TAG)
381 git commit -a -m "Release $(TAG)"
382 make relup TAG=$(TAG)
383 make cleanrel
384 rm -rf org-$(TAG)
385 rm org-$(TAG)*.zip
386 rm org-$(TAG)*.tar.gz
387 make pushreleasetag TAG=$(TAG)
388 git push -f origin maint
389 git checkout master
390 git merge -s ours maint
391 UTILITIES/set-version.pl -o $(TAG)
392 git commit -a -m "Update website to show $(TAG) as current release"
393 git push
395 # ~$ make relup only makes sense from orgmode.org server
396 # Don't call it from your computer!
397 relup:
398 ${MAKE} makerelease
399 ${MAKE} sync_release
400 ${MAKE} sync_manual
402 makerelease:
403 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
404 ${MAKE} distfile
405 ${MAKE} doc
406 UTILITIES/gplmanual.pl
407 ${MAKE} html_manual
408 ${MAKE} html_guide
409 rm -rf RELEASEDIR
410 $(MKDIR) RELEASEDIR
411 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
412 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
413 cp doc/org_dual_license.texi RELEASEDIR
414 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
415 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
416 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
418 # ~$ make sync_release only makes sense from orgmode.org server
419 # Don't call it from your computer!
420 sync_release:
421 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
423 # ~$ make sync_manual only makes sense from orgmode.org server
424 # Don't call it from your computer!
425 sync_manual:
426 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
427 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
429 distfile:
430 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
431 touch doc/org.texi doc/orgcard.tex # force update
432 ${MAKE} cleancontrib
433 ${MAKE} info
434 ${MAKE} doc
435 ${MAKE} lisp/org-install.el
436 rm -rf org-$(TAG) org-$(TAG).zip
437 $(MKDIR) org-$(TAG)
438 $(MKDIR) org-$(TAG)/doc
439 $(MKDIR) org-$(TAG)/lisp
440 cp -r $(LISPFILES) org-$(TAG)/lisp
441 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
442 cp -r $(DISTFILES_extra) org-$(TAG)/
443 cp -r README_DIST org-$(TAG)/README
444 zip -r org-$(TAG).zip org-$(TAG)
445 tar zcvf org-$(TAG).tar.gz org-$(TAG)
447 pkg:
448 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
449 touch doc/org.texi doc/orgcard.tex # force update
450 ${MAKE} info
451 ${MAKE} doc
452 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
453 $(MKDIR) org-$(PKG_TAG)
454 cp -r $(PKG_FILES) org-$(PKG_TAG)
455 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
456 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
458 cleanall:
459 ${MAKE} clean
460 rm -f lisp/org-install.el
462 clean:
463 ${MAKE} cleanelc
464 ${MAKE} cleandoc
465 ${MAKE} cleanrel
466 rm -f *~ */*~ */*/*~
468 cleancontrib:
469 find contrib -name \*~ -exec rm {} \;
471 cleanelc:
472 rm -f $(ELCFILES)
473 cleandoc:
474 -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
475 -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
476 -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
477 -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
478 -(cd doc && rm -rf manual)
480 cleanrel:
481 rm -rf RELEASEDIR
482 rm -rf org-7.*
483 rm -rf org-7*zip org-7*tar.gz
485 .el.elc:
486 $(ELC) $<
489 push:
490 git push orgmode@orgmode.org:org-mode.git master
492 pushtag:
493 git tag -m "Adding tag" -a $(TAG)
494 git push orgmode@orgmode.org:org-mode.git $(TAG)
496 pushreleasetag:
497 git tag -m "Adding release tag" -a release_$(TAG)
498 git push orgmode@orgmode.org:org-mode.git release_$(TAG)
500 # Dependencies
502 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
503 lisp/org-agenda.elc: lisp/org.el
504 lisp/org-ascii.elc: lisp/org-exp.el
505 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
506 lisp/org-archive.elc: lisp/org.el
507 lisp/org-bbdb.elc: lisp/org.el
508 lisp/org-beamer.elc: lisp/org.el
509 lisp/org-bibtex.elc: lisp/org.el
510 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
511 lisp/org-clock.elc: lisp/org.el
512 lisp/org-colview.elc: lisp/org.el
513 lisp/org-colview-xemacs.elc: lisp/org.el
514 lisp/org-compat.elc: lisp/org-macs.el
515 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
516 lisp/org-ctags.elc: lisp/org.el
517 lisp/org-datetree.elc: lisp/org.el
518 lisp/org-docview.elc: lisp/org.el
519 lisp/org-entities.elc:
520 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
521 lisp/org-exp-blocks.elc: lisp/org.el
522 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
523 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
524 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
525 lisp/org-feed.elc: lisp/org.el
526 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
527 lisp/org-freemind.elc: lisp/org.el
528 lisp/org-gnus.elc: lisp/org.el
529 lisp/org-html.elc: lisp/org-exp.el
530 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
531 lisp/org-icalendar.elc: lisp/org-exp.el
532 lisp/org-id.elc: lisp/org.el
533 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
534 lisp/org-info.elc: lisp/org.el
535 lisp/org-inlinetask.elc:
536 lisp/org-irc.elc: lisp/org.el
537 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
538 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
539 lisp/org-lparse.elc: lisp/org-exp.el
540 lisp/org-mac-message.elc: lisp/org.el
541 lisp/org-macs.elc:
542 lisp/org-mew.elc: lisp/org.el
543 lisp/org-mhe.elc: lisp/org.el
544 lisp/org-mks.elc:
545 lisp/org-mobile.elc: lisp/org.el
546 lisp/org-mouse.elc: lisp/org.el
547 lisp/org-odt.elc: lisp/org-lparse.el
548 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
549 lisp/org-publish.elc:
550 lisp/org-protocol.elc: lisp/org.el
551 lisp/org-remember.elc: lisp/org.el
552 lisp/org-rmail.elc: lisp/org.el
553 lisp/org-special-blocks.elc: lisp/org-compat.el
554 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
555 lisp/org-table.elc: lisp/org.el
556 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
557 lisp/org-timer.elc: lisp/org.el
558 lisp/org-vm.elc: lisp/org.el
559 lisp/org-w3m.elc: lisp/org.el
560 lisp/org-wl.elc: lisp/org.el
561 lisp/org-xoxo.elc: lisp/org-exp.el
563 # Describe valid make targets for org-mode.
564 targets help:
565 @echo "make - compile Org ELisp files"
566 @echo "make clean - clean Elisp and documentation files"
567 @echo "make all - compile Org ELisp files and documentation"
568 @echo ""
569 @echo "make doc - make all documentation"
570 @echo "make info - make Info documentation"
571 @echo "make html - make HTML documentation"
572 @echo "make pdf - make pdf documentation"
573 @echo "make card - make refcards documentation"
574 @echo ""
575 @echo "make install - install Org"
576 @echo "make install-lisp - install Org ELisp files"
577 @echo "make install-info - install Org Info file"