More copyright year fixes.
[org-mode/org-kjn.git] / Makefile
blob520b0fdb6ddf37b11ddafdee48d5652f0da8c0e0
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
174 LISPFILES0 = $(LISPF:%=lisp/%)
175 LISPFILES = $(LISPFILES0) lisp/org-install.el
176 ELCFILES0 = $(LISPFILES0:.el=.elc)
177 ELCFILES = $(LISPFILES:.el=.elc)
178 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
179 doc/pdflayout.sty doc/.nosearch \
180 doc/orgguide.texi doc/orgguide.pdf
181 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
182 TEXIFILES = doc/org.texi
183 INFOFILES = doc/org
185 # etc/styles contains OpenDocument style files. These files *must* be
186 # installed for the ODT exporter to function. These files are
187 # distirbuted with GNU ELPA as well as with stock Emacs >= 24.1.
189 # contrib/odt/etc/schema contains OpenDocument schema files. It is
190 # *desirable* but *not* mandatory that these files be installed.
191 # These files are not distributed with stock Emacs. This is because
192 # the terms under which OASIS distributes these files are not
193 # agreeable to FSF.
195 # BasicODConverter-x.y.z.oxt is a LibreOffice extension for converting
196 # OpenDocument files to numerous other formats. It is similar to
197 # unoconv and is implemented in StarBasic. It is *desirable* but
198 # *not* *mandatory* that the converter be installed. It is
199 # distributed under the same license as GNU Emacs. This file is *not*
200 # part of GNU Emacs.
201 DATAFILES = etc/styles \
202 # contrib/odt/BasicODConverter/BasicODConverter*.oxt \
203 # contrib/odt/etc/schema \
205 # Package Manager (ELPA)
206 PKG_TAG = $(shell date +%Y%m%d)
207 PKG_DOC = "Outline-based notes management and organizer"
208 PKG_REQ = "nil"
210 PKG_FILES = $(LISPFILES0) \
211 doc/dir doc/org \
212 doc/pdflayout.sty \
213 doc/org.pdf \
214 doc/orgguide.pdf \
215 doc/orgcard.tex \
216 doc/orgcard.pdf \
217 doc/orgcard_letter.pdf \
218 etc/
220 .SUFFIXES: .el .elc .texi
221 SHELL = /bin/sh
223 # Additional distribution files
224 DISTFILES_extra= Makefile request-assign-future.txt contrib etc
226 default: $(ELCFILES) $(ELCBFILES)
228 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
230 up2: update
231 sudo ${MAKE} install
233 update:
234 git pull
235 ${MAKE} clean
236 ${MAKE} all
238 compile: $(ELCFILES0) $(ELCBFILES)
240 install: install-lisp install-data
242 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
245 ${MAKE} pdf && open doc/org.pdf
248 ${MAKE} pdf && open doc/orgguide.pdf
250 # Always force re-compilation of org-odt
251 lisp/org-odt.elc: org-odt-data-dir
252 org-odt-data-dir:
254 # Sleight of hand to "hard code" the value of $(datadir) in
255 # org-odt.el. See variables `org-odt-styles-dir-list' and
256 # `org-odt-schema-dir-list'.
257 install-lisp: BATCH_EXTRA = -eval "(setq org-odt-data-dir (expand-file-name \"$(datadir)\"))"
259 install-lisp: $(LISPFILES) $(ELCFILES)
260 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
261 $(CP) $(LISPFILES) $(lispdir)
262 $(CP) $(ELCFILES) $(lispdir)
264 install-info: $(INFOFILES)
265 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
266 $(CP) $(INFOFILES) $(infodir)
267 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
269 install-data: $(DATAFILES)
270 if [ ! -d $(datadir) ]; then $(MKDIR) $(datadir); else true; fi ;
271 $(CP) $(DATAFILES) $(datadir)
273 autoloads: lisp/org-install.el
275 lisp/org-install.el: $(LISPFILES0) Makefile
276 $(BATCH) --eval "(require 'autoload)" \
277 --eval '(find-file "lisp/org-install.el")' \
278 --eval '(erase-buffer)' \
279 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
280 --eval '(insert "\n(provide (quote org-install))\n")' \
281 --eval '(save-buffer)'
283 doc/org: doc/org.texi
284 (cd doc && $(MAKEINFO) --no-split org.texi -o org)
286 doc/org.pdf: doc/org.texi
287 (cd doc && $(TEXI2PDF) org.texi)
289 doc/orgguide.pdf: doc/orgguide.texi
290 (cd doc && $(TEXI2PDF) orgguide.texi)
292 doc/org.html: doc/org.texi
293 (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
294 UTILITIES/manfull.pl doc/org.html
296 doc/orgcard.pdf: doc/orgcard.tex
297 (cd doc && pdftex orgcard.tex)
299 doc/orgcard.txt: doc/orgcard.tex
300 (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
302 doc/orgcard_letter.tex: doc/orgcard.tex
303 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
304 doc/orgcard.tex > doc/orgcard_letter.tex
306 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
307 (cd doc && pdftex orgcard_letter.tex)
309 # Below here are special targets for maintenance only
311 html: doc/org.html
313 html_manual: doc/org.texi
314 rm -rf doc/manual
315 mkdir doc/manual
316 $(TEXI2HTML) -o doc/manual doc/org.texi
317 UTILITIES/mansplit.pl doc/manual/*.html
319 html_guide: doc/orgguide.texi
320 rm -rf doc/guide
321 mkdir doc/guide
322 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
323 UTILITIES/guidesplit.pl doc/guide/*.html
325 info: doc/org
327 pdf: doc/org.pdf doc/orgguide.pdf
329 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
331 testrelease:
332 git checkout -b testrelease origin/maint
333 git merge -s recursive -X theirs master
334 UTILITIES/set-version.pl testing
335 git commit -a -m "Release testing"
336 make distfile TAG=testversion
337 make cleanrel
338 rm -rf org-testversion*
339 git reset --hard
340 git checkout master
341 git branch -D testrelease
343 # The following target makes a full release for the stuff that is
344 # currently on master. Do it like this:
346 # make release TAG=7.01
348 release:
349 git checkout maint
350 git merge -s recursive -X theirs master
351 UTILITIES/set-version.pl $(TAG)
352 git commit -a -m "Release $(TAG)"
353 make relup TAG=$(TAG)
354 make cleanrel
355 rm -rf org-$(TAG)
356 rm -f org-$(TAG)*.zip
357 rm -f org-$(TAG)*.tar.gz
358 make pushreleasetag TAG=$(TAG)
359 git push -f origin maint
360 git checkout master
361 git merge -s ours maint
362 UTILITIES/set-version.pl -a $(TAG)
363 git commit -a -m "Update website to show $(TAG) as current release"
364 git push
366 # The following target makes a release, but from the stuff that is on
367 # maint, not from the stuff that is on master. The idea is that it pushes
368 # out a minor fix into a minor update, while development on master
369 # already went full steam ahead. To make a micro-relesse, cherry-pick
370 # the necessary changes into maint, then run (with proper version number)
371 # This is just like release, but we skip the step which merges master
372 # into maint.
374 # make fixrelease TAG=7.01.02
376 fixrelease:
377 git checkout maint
378 git merge -s recursive -X theirs master
379 UTILITIES/set-version.pl $(TAG)
380 git commit -a -m "Release $(TAG)"
381 make relup TAG=$(TAG)
382 make cleanrel
383 rm -rf org-$(TAG)
384 rm org-$(TAG)*.zip
385 rm org-$(TAG)*.tar.gz
386 make pushreleasetag TAG=$(TAG)
387 git push -f origin maint
388 git checkout master
389 git merge -s ours maint
390 UTILITIES/set-version.pl -o $(TAG)
391 git commit -a -m "Update website to show $(TAG) as current release"
392 git push
394 # ~$ make relup only makes sense from orgmode.org server
395 # Don't call it from your computer!
396 relup:
397 ${MAKE} makerelease
398 ${MAKE} sync_release
399 ${MAKE} sync_manual
401 makerelease:
402 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
403 ${MAKE} distfile
404 ${MAKE} doc
405 UTILITIES/gplmanual.pl
406 ${MAKE} html_manual
407 ${MAKE} html_guide
408 rm -rf RELEASEDIR
409 $(MKDIR) RELEASEDIR
410 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
411 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
412 cp doc/org_dual_license.texi RELEASEDIR
413 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
414 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
415 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
417 # ~$ make sync_release only makes sense from orgmode.org server
418 # Don't call it from your computer!
419 sync_release:
420 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
422 # ~$ make sync_manual only makes sense from orgmode.org server
423 # Don't call it from your computer!
424 sync_manual:
425 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
426 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
428 distfile:
429 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
430 touch doc/org.texi doc/orgcard.tex # force update
431 ${MAKE} cleancontrib
432 ${MAKE} info
433 ${MAKE} doc
434 ${MAKE} lisp/org-install.el
435 rm -rf org-$(TAG) org-$(TAG).zip
436 $(MKDIR) org-$(TAG)
437 $(MKDIR) org-$(TAG)/doc
438 $(MKDIR) org-$(TAG)/lisp
439 cp -r $(LISPFILES) org-$(TAG)/lisp
440 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
441 cp -r $(DISTFILES_extra) org-$(TAG)/
442 cp -r README_DIST org-$(TAG)/README
443 zip -r org-$(TAG).zip org-$(TAG)
444 tar zcvf org-$(TAG).tar.gz org-$(TAG)
446 pkg:
447 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
448 touch doc/org.texi doc/orgcard.tex # force update
449 ${MAKE} info
450 ${MAKE} doc
451 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
452 $(MKDIR) org-$(PKG_TAG)
453 cp -r $(PKG_FILES) org-$(PKG_TAG)
454 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
455 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
457 cleanall:
458 ${MAKE} clean
459 rm -f lisp/org-install.el
461 clean:
462 ${MAKE} cleanelc
463 ${MAKE} cleandoc
464 ${MAKE} cleanrel
465 rm -f *~ */*~ */*/*~
467 cleancontrib:
468 find contrib -name \*~ -exec rm {} \;
470 cleanelc:
471 rm -f $(ELCFILES)
472 cleandoc:
473 -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
474 -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
475 -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
476 -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
477 -(cd doc && rm -rf manual)
479 cleanrel:
480 rm -rf RELEASEDIR
481 rm -rf org-7.*
482 rm -rf org-7*zip org-7*tar.gz
484 .el.elc:
485 $(ELC) $<
488 push:
489 git push orgmode@orgmode.org:org-mode.git master
491 pushtag:
492 git tag -m "Adding tag" -a $(TAG)
493 git push orgmode@orgmode.org:org-mode.git $(TAG)
495 pushreleasetag:
496 git tag -m "Adding release tag" -a release_$(TAG)
497 git push orgmode@orgmode.org:org-mode.git release_$(TAG)
499 # Dependencies
501 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
502 lisp/org-agenda.elc: lisp/org.el
503 lisp/org-ascii.elc: lisp/org-exp.el
504 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
505 lisp/org-archive.elc: lisp/org.el
506 lisp/org-bbdb.elc: lisp/org.el
507 lisp/org-beamer.elc: lisp/org.el
508 lisp/org-bibtex.elc: lisp/org.el
509 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
510 lisp/org-clock.elc: lisp/org.el
511 lisp/org-colview.elc: lisp/org.el
512 lisp/org-colview-xemacs.elc: lisp/org.el
513 lisp/org-compat.elc: lisp/org-macs.el
514 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
515 lisp/org-ctags.elc: lisp/org.el
516 lisp/org-datetree.elc: lisp/org.el
517 lisp/org-docview.elc: lisp/org.el
518 lisp/org-entities.elc:
519 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
520 lisp/org-exp-blocks.elc: lisp/org.el
521 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
522 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
523 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
524 lisp/org-feed.elc: lisp/org.el
525 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
526 lisp/org-freemind.elc: lisp/org.el
527 lisp/org-gnus.elc: lisp/org.el
528 lisp/org-html.elc: lisp/org-exp.el
529 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
530 lisp/org-icalendar.elc: lisp/org-exp.el
531 lisp/org-id.elc: lisp/org.el
532 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
533 lisp/org-info.elc: lisp/org.el
534 lisp/org-inlinetask.elc:
535 lisp/org-irc.elc: lisp/org.el
536 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
537 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
538 lisp/org-lparse.elc: lisp/org-exp.el
539 lisp/org-mac-message.elc: lisp/org.el
540 lisp/org-macs.elc:
541 lisp/org-mew.elc: lisp/org.el
542 lisp/org-mhe.elc: lisp/org.el
543 lisp/org-mks.elc:
544 lisp/org-mobile.elc: lisp/org.el
545 lisp/org-mouse.elc: lisp/org.el
546 lisp/org-odt.elc: lisp/org-lparse.el
547 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
548 lisp/org-publish.elc:
549 lisp/org-protocol.elc: lisp/org.el
550 lisp/org-remember.elc: lisp/org.el
551 lisp/org-rmail.elc: lisp/org.el
552 lisp/org-special-blocks.elc: lisp/org-compat.el
553 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
554 lisp/org-table.elc: lisp/org.el
555 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
556 lisp/org-timer.elc: lisp/org.el
557 lisp/org-vm.elc: lisp/org.el
558 lisp/org-w3m.elc: lisp/org.el
559 lisp/org-wl.elc: lisp/org.el
560 lisp/org-xoxo.elc: lisp/org-exp.el
562 # Describe valid make targets for org-mode.
563 targets help:
564 @echo "make - compile Org ELisp files"
565 @echo "make clean - clean Elisp and documentation files"
566 @echo "make all - compile Org ELisp files and documentation"
567 @echo ""
568 @echo "make doc - make all documentation"
569 @echo "make info - make Info documentation"
570 @echo "make html - make HTML documentation"
571 @echo "make pdf - make pdf documentation"
572 @echo "make card - make refcards documentation"
573 @echo ""
574 @echo "make install - install Org"
575 @echo "make install-lisp - install Org ELisp files"
576 @echo "make install-info - install Org Info file"