org-bibtex: optionally fill in optional fields on bibtex headline creation
[org-mode/org-jambu.git] / Makefile
blobb3fa19fe33b7150a9221757ddc65fa38c2ab1f08
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-C.el \
130 ob-calc.el \
131 ob-ditaa.el \
132 ob-haskell.el \
133 ob-perl.el \
134 ob-sh.el \
135 ob-R.el \
136 ob-dot.el \
137 ob-mscgen.el \
138 ob-latex.el \
139 ob-lisp.el \
140 ob-ledger.el \
141 ob-python.el \
142 ob-sql.el \
143 ob-asymptote.el \
144 ob-emacs-lisp.el \
145 ob-matlab.el \
146 ob-ruby.el \
147 ob-sqlite.el \
148 ob-clojure.el \
149 ob-ocaml.el \
150 ob-sass.el \
151 ob-css.el \
152 ob-gnuplot.el \
153 ob-octave.el \
154 ob-screen.el \
155 ob-plantuml.el \
156 ob-org.el \
157 ob-js.el \
158 ob-scheme.el
160 LISPFILES0 = $(LISPF:%=lisp/%)
161 LISPFILES = $(LISPFILES0) lisp/org-install.el
162 ELCFILES0 = $(LISPFILES0:.el=.elc)
163 ELCFILES = $(LISPFILES:.el=.elc)
164 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
165 doc/pdflayout.sty doc/.nosearch \
166 doc/orgguide.texi doc/orgguide.pdf
167 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
168 TEXIFILES = doc/org.texi
169 INFOFILES = doc/org
171 # Package Manager (ELPA)
172 PKG_TAG = $(shell date +%Y%m%d)
173 PKG_DOC = "Outline-based notes management and organizer"
174 PKG_REQ = "nil"
176 PKG_FILES = $(LISPFILES0) \
177 doc/dir doc/org \
178 doc/pdflayout.sty \
179 doc/org.pdf \
180 doc/orgguide.pdf \
181 doc/orgcard.tex \
182 doc/orgcard.pdf \
183 doc/orgcard_letter.pdf
185 .SUFFIXES: .el .elc .texi
186 SHELL = /bin/sh
188 # Additional distribution files
189 DISTFILES_extra= Makefile request-assign-future.txt contrib
191 default: $(ELCFILES) $(ELCBFILES)
193 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
195 up2: update
196 sudo ${MAKE} install
198 update:
199 git pull
200 ${MAKE} clean
201 ${MAKE} all
203 compile: $(ELCFILES0) $(ELCBFILES)
205 install: install-lisp
207 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
210 ${MAKE} pdf && open doc/org.pdf
213 ${MAKE} pdf && open doc/orgguide.pdf
215 install-lisp: $(LISPFILES) $(ELCFILES)
216 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
217 $(CP) $(LISPFILES) $(lispdir)
218 $(CP) $(ELCFILES) $(lispdir)
220 install-info: $(INFOFILES)
221 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
222 $(CP) $(INFOFILES) $(infodir)
223 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
225 install-info-debian: $(INFOFILES)
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 "org-install.el")' \
233 --eval '(erase-buffer)' \
234 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
235 --eval '(insert "\n(provide (quote org-install))\n")' \
236 --eval '(save-buffer)'
237 mv org-install.el lisp
239 doc/org: doc/org.texi
240 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
242 doc/org.pdf: doc/org.texi
243 (cd doc; $(TEXI2PDF) org.texi)
245 doc/orgguide.pdf: doc/orgguide.texi
246 (cd doc; $(TEXI2PDF) orgguide.texi)
248 doc/org.html: doc/org.texi
249 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
250 UTILITIES/manfull.pl doc/org.html
252 doc/orgcard.pdf: doc/orgcard.tex
253 (cd doc; pdftex orgcard.tex)
255 doc/orgcard.txt: doc/orgcard.tex
256 (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
258 doc/orgcard_letter.tex: doc/orgcard.tex
259 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
260 doc/orgcard.tex > doc/orgcard_letter.tex
262 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
263 (cd doc; pdftex orgcard_letter.tex)
265 # Below here are special targets for maintenance only
267 html: doc/org.html
269 html_manual: doc/org.texi
270 rm -rf doc/manual
271 mkdir doc/manual
272 $(TEXI2HTML) -o doc/manual doc/org.texi
273 UTILITIES/mansplit.pl doc/manual/*.html
275 html_guide: doc/orgguide.texi
276 rm -rf doc/guide
277 mkdir doc/guide
278 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
279 UTILITIES/guidesplit.pl doc/guide/*.html
281 info: doc/org
283 pdf: doc/org.pdf doc/orgguide.pdf
285 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
287 testrelease:
288 git checkout -b testrelease maint
289 git merge -s recursive -X theirs master
290 UTILITIES/set-version.pl testing
291 git commit -a -m "Release testing"
292 make distfile TAG=testversion
293 make cleanrel
294 rm -rf org-testversion*
295 git reset --hard
296 git checkout master
297 git branch -D testrelease
299 # The following target makes a full release for the stuff that is
300 # currently on master. Do it like this:
302 # make release TAG=7.01
304 release:
305 git checkout maint
306 git merge -s recursive -X theirs master
307 UTILITIES/set-version.pl $(TAG)
308 git commit -a -m "Release $(TAG)"
309 make relup TAG=$(TAG)
310 make cleanrel
311 rm -rf org-$(TAG)
312 rm -f org-$(TAG)*.zip
313 rm -f org-$(TAG)*.tar.gz
314 make pushreleasetag TAG=$(TAG)
315 git push -f origin maint
316 git checkout master
317 git merge -s ours maint
318 UTILITIES/set-version.pl -a $(TAG)
319 git commit -a -m "Update website to show $(TAG) as current release"
320 git push
322 # The following target makes a release, but from the stuff that is on
323 # maint, not from the stuff that is on master. The idea is that it pushes
324 # out a minor fix into a minor update, while development on master
325 # already went full steam ahead. To make a micro-relesse, cherry-pick
326 # the necessary changes into maint, then run (with proper version number)
327 # This is just like release, but we skip the step which merges master
328 # into maint.
330 # make fixrelease TAG=7.01.02
332 fixrelease:
333 git checkout maint
334 git merge -s recursive -X theirs master
335 UTILITIES/set-version.pl $(TAG)
336 git commit -a -m "Release $(TAG)"
337 make relup TAG=$(TAG)
338 make cleanrel
339 rm -rf org-$(TAG)
340 rm org-$(TAG)*.zip
341 rm org-$(TAG)*.tar.gz
342 make pushreleasetag TAG=$(TAG)
343 git push -f origin maint
344 git checkout master
345 git merge -s ours maint
346 UTILITIES/set-version.pl -o $(TAG)
347 git commit -a -m "Update website to show $(TAG) as current release"
348 git push
350 # ~$ make relup only makes sense from orgmode.org server
351 # Don't call it from your computer!
352 relup:
353 ${MAKE} makerelease
354 ${MAKE} sync_release
355 ${MAKE} sync_manual
357 makerelease:
358 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
359 ${MAKE} distfile
360 ${MAKE} doc
361 UTILITIES/gplmanual.pl
362 ${MAKE} html_manual
363 ${MAKE} html_guide
364 rm -rf RELEASEDIR
365 $(MKDIR) RELEASEDIR
366 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
367 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
368 cp doc/org_dual_license.texi RELEASEDIR
369 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
370 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
371 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
373 # ~$ make sync_release only makes sense from orgmode.org server
374 # Don't call it from your computer!
375 sync_release:
376 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
378 # ~$ make sync_manual only makes sense from orgmode.org server
379 # Don't call it from your computer!
380 sync_manual:
381 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
382 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
384 distfile:
385 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
386 touch doc/org.texi doc/orgcard.tex # force update
387 ${MAKE} cleancontrib
388 ${MAKE} info
389 ${MAKE} doc
390 ${MAKE} lisp/org-install.el
391 rm -rf org-$(TAG) org-$(TAG).zip
392 $(MKDIR) org-$(TAG)
393 $(MKDIR) org-$(TAG)/doc
394 $(MKDIR) org-$(TAG)/lisp
395 cp -r $(LISPFILES) org-$(TAG)/lisp
396 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
397 cp -r $(DISTFILES_extra) org-$(TAG)/
398 cp -r README_DIST org-$(TAG)/README
399 zip -r org-$(TAG).zip org-$(TAG)
400 tar zcvf org-$(TAG).tar.gz org-$(TAG)
402 pkg:
403 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
404 touch doc/org.texi doc/orgcard.tex # force update
405 ${MAKE} info
406 ${MAKE} doc
407 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
408 $(MKDIR) org-$(PKG_TAG)
409 cp -r $(PKG_FILES) org-$(PKG_TAG)
410 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
411 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
413 cleanall:
414 ${MAKE} clean
415 rm -f lisp/org-install.el
417 clean:
418 ${MAKE} cleanelc
419 ${MAKE} cleandoc
420 ${MAKE} cleanrel
421 rm -f *~ */*~ */*/*~
423 cleancontrib:
424 find contrib -name \*~ -exec rm {} \;
426 cleanelc:
427 rm -f $(ELCFILES)
428 cleandoc:
429 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
430 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
431 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
432 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
433 (cd doc; rm -rf manual)
435 cleanrel:
436 rm -rf RELEASEDIR
437 rm -rf org-7.*
438 rm -rf org-7*zip org-7*tar.gz
440 .el.elc:
441 $(ELC) $<
444 push:
445 git-push orgmode@orgmode.org:org-mode.git master
447 pushtag:
448 git-tag -m "Adding tag" -a $(TAG)
449 git-push orgmode@orgmode.org:org-mode.git $(TAG)
451 pushreleasetag:
452 git-tag -m "Adding release tag" -a release_$(TAG)
453 git-push orgmode@orgmode.org:org-mode.git release_$(TAG)
455 # Dependencies
457 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
458 lisp/org-agenda.elc: lisp/org.el
459 lisp/org-ascii.elc: lisp/org-exp.el
460 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
461 lisp/org-archive.elc: lisp/org.el
462 lisp/org-bbdb.elc: lisp/org.el
463 lisp/org-beamer.elc: lisp/org.el
464 lisp/org-bibtex.elc: lisp/org.el
465 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
466 lisp/org-clock.elc: lisp/org.el
467 lisp/org-colview.elc: lisp/org.el
468 lisp/org-colview-xemacs.elc: lisp/org.el
469 lisp/org-compat.elc: lisp/org-macs.el
470 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
471 lisp/org-ctags.elc: lisp/org.el
472 lisp/org-datetree.elc: lisp/org.el
473 lisp/org-docview.elc: lisp/org.el
474 lisp/org-entities.elc:
475 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
476 lisp/org-exp-blocks.elc: lisp/org.el
477 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
478 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
479 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
480 lisp/org-feed.elc: lisp/org.el
481 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
482 lisp/org-freemind.elc: lisp/org.el
483 lisp/org-gnus.elc: lisp/org.el
484 lisp/org-html.elc: lisp/org-exp.el
485 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
486 lisp/org-icalendar.elc: lisp/org-exp.el
487 lisp/org-id.elc: lisp/org.el
488 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
489 lisp/org-info.elc: lisp/org.el
490 lisp/org-inlinetask.elc:
491 lisp/org-irc.elc: lisp/org.el
492 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
493 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
494 lisp/org-mac-message.elc: lisp/org.el
495 lisp/org-macs.elc:
496 lisp/org-mew.elc: lisp/org.el
497 lisp/org-mhe.elc: lisp/org.el
498 lisp/org-mks.elc:
499 lisp/org-mobile.elc: lisp/org.el
500 lisp/org-mouse.elc: lisp/org.el
501 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
502 lisp/org-publish.elc:
503 lisp/org-protocol.elc: lisp/org.el
504 lisp/org-remember.elc: lisp/org.el
505 lisp/org-rmail.elc: lisp/org.el
506 lisp/org-special-blocks.elc: lisp/org-compat.el
507 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
508 lisp/org-table.elc: lisp/org.el
509 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
510 lisp/org-timer.elc: lisp/org.el
511 lisp/org-vm.elc: lisp/org.el
512 lisp/org-w3m.elc: lisp/org.el
513 lisp/org-wl.elc: lisp/org.el
514 lisp/org-xoxo.elc: lisp/org-exp.el