Move contrib/odt/styles/*.xml to etc/styles
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blobe29ccb84c3bcdb7e7ee186cc7934843a4a5c9f5f
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 \
162 ob-shen.el \
163 ob-fortran.el \
164 ob-picolisp.el
166 LISPFILES0 = $(LISPF:%=lisp/%)
167 LISPFILES = $(LISPFILES0) lisp/org-install.el
168 ELCFILES0 = $(LISPFILES0:.el=.elc)
169 ELCFILES = $(LISPFILES:.el=.elc)
170 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
171 doc/pdflayout.sty doc/.nosearch \
172 doc/orgguide.texi doc/orgguide.pdf
173 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
174 TEXIFILES = doc/org.texi
175 INFOFILES = doc/org
177 # Package Manager (ELPA)
178 PKG_TAG = $(shell date +%Y%m%d)
179 PKG_DOC = "Outline-based notes management and organizer"
180 PKG_REQ = "nil"
182 PKG_FILES = $(LISPFILES0) \
183 doc/dir doc/org \
184 doc/pdflayout.sty \
185 doc/org.pdf \
186 doc/orgguide.pdf \
187 doc/orgcard.tex \
188 doc/orgcard.pdf \
189 doc/orgcard_letter.pdf
191 .SUFFIXES: .el .elc .texi
192 SHELL = /bin/sh
194 # Additional distribution files
195 DISTFILES_extra= Makefile request-assign-future.txt contrib
197 default: $(ELCFILES) $(ELCBFILES)
199 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
201 up2: update
202 sudo ${MAKE} install
204 update:
205 git pull
206 ${MAKE} clean
207 ${MAKE} all
209 compile: $(ELCFILES0) $(ELCBFILES)
211 install: install-lisp
213 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
216 ${MAKE} pdf && open doc/org.pdf
219 ${MAKE} pdf && open doc/orgguide.pdf
221 install-lisp: $(LISPFILES) $(ELCFILES)
222 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
223 $(CP) $(LISPFILES) $(lispdir)
224 $(CP) $(ELCFILES) $(lispdir)
226 install-info: $(INFOFILES)
227 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
228 $(CP) $(INFOFILES) $(infodir)
229 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
231 autoloads: lisp/org-install.el
233 lisp/org-install.el: $(LISPFILES0) Makefile
234 $(BATCH) --eval "(require 'autoload)" \
235 --eval '(find-file "lisp/org-install.el")' \
236 --eval '(erase-buffer)' \
237 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
238 --eval '(insert "\n(provide (quote org-install))\n")' \
239 --eval '(save-buffer)'
241 doc/org: doc/org.texi
242 (cd doc && $(MAKEINFO) --no-split org.texi -o org)
244 doc/org.pdf: doc/org.texi
245 (cd doc && $(TEXI2PDF) org.texi)
247 doc/orgguide.pdf: doc/orgguide.texi
248 (cd doc && $(TEXI2PDF) orgguide.texi)
250 doc/org.html: doc/org.texi
251 (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
252 UTILITIES/manfull.pl doc/org.html
254 doc/orgcard.pdf: doc/orgcard.tex
255 (cd doc && pdftex orgcard.tex)
257 doc/orgcard.txt: doc/orgcard.tex
258 (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
260 doc/orgcard_letter.tex: doc/orgcard.tex
261 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
262 doc/orgcard.tex > doc/orgcard_letter.tex
264 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
265 (cd doc && pdftex orgcard_letter.tex)
267 # Below here are special targets for maintenance only
269 html: doc/org.html
271 html_manual: doc/org.texi
272 rm -rf doc/manual
273 mkdir doc/manual
274 $(TEXI2HTML) -o doc/manual doc/org.texi
275 UTILITIES/mansplit.pl doc/manual/*.html
277 html_guide: doc/orgguide.texi
278 rm -rf doc/guide
279 mkdir doc/guide
280 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
281 UTILITIES/guidesplit.pl doc/guide/*.html
283 info: doc/org
285 pdf: doc/org.pdf doc/orgguide.pdf
287 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
289 testrelease:
290 git checkout -b testrelease origin/maint
291 git merge -s recursive -X theirs master
292 UTILITIES/set-version.pl testing
293 git commit -a -m "Release testing"
294 make distfile TAG=testversion
295 make cleanrel
296 rm -rf org-testversion*
297 git reset --hard
298 git checkout master
299 git branch -D testrelease
301 # The following target makes a full release for the stuff that is
302 # currently on master. Do it like this:
304 # make release TAG=7.01
306 release:
307 git checkout maint
308 git merge -s recursive -X theirs master
309 UTILITIES/set-version.pl $(TAG)
310 git commit -a -m "Release $(TAG)"
311 make relup TAG=$(TAG)
312 make cleanrel
313 rm -rf org-$(TAG)
314 rm -f org-$(TAG)*.zip
315 rm -f org-$(TAG)*.tar.gz
316 make pushreleasetag TAG=$(TAG)
317 git push -f origin maint
318 git checkout master
319 git merge -s ours maint
320 UTILITIES/set-version.pl -a $(TAG)
321 git commit -a -m "Update website to show $(TAG) as current release"
322 git push
324 # The following target makes a release, but from the stuff that is on
325 # maint, not from the stuff that is on master. The idea is that it pushes
326 # out a minor fix into a minor update, while development on master
327 # already went full steam ahead. To make a micro-relesse, cherry-pick
328 # the necessary changes into maint, then run (with proper version number)
329 # This is just like release, but we skip the step which merges master
330 # into maint.
332 # make fixrelease TAG=7.01.02
334 fixrelease:
335 git checkout maint
336 git merge -s recursive -X theirs master
337 UTILITIES/set-version.pl $(TAG)
338 git commit -a -m "Release $(TAG)"
339 make relup TAG=$(TAG)
340 make cleanrel
341 rm -rf org-$(TAG)
342 rm org-$(TAG)*.zip
343 rm org-$(TAG)*.tar.gz
344 make pushreleasetag TAG=$(TAG)
345 git push -f origin maint
346 git checkout master
347 git merge -s ours maint
348 UTILITIES/set-version.pl -o $(TAG)
349 git commit -a -m "Update website to show $(TAG) as current release"
350 git push
352 # ~$ make relup only makes sense from orgmode.org server
353 # Don't call it from your computer!
354 relup:
355 ${MAKE} makerelease
356 ${MAKE} sync_release
357 ${MAKE} sync_manual
359 makerelease:
360 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
361 ${MAKE} distfile
362 ${MAKE} doc
363 UTILITIES/gplmanual.pl
364 ${MAKE} html_manual
365 ${MAKE} html_guide
366 rm -rf RELEASEDIR
367 $(MKDIR) RELEASEDIR
368 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
369 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
370 cp doc/org_dual_license.texi RELEASEDIR
371 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
372 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
373 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
375 # ~$ make sync_release only makes sense from orgmode.org server
376 # Don't call it from your computer!
377 sync_release:
378 rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
380 # ~$ make sync_manual only makes sense from orgmode.org server
381 # Don't call it from your computer!
382 sync_manual:
383 rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
384 rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
386 distfile:
387 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
388 touch doc/org.texi doc/orgcard.tex # force update
389 ${MAKE} cleancontrib
390 ${MAKE} info
391 ${MAKE} doc
392 ${MAKE} lisp/org-install.el
393 rm -rf org-$(TAG) org-$(TAG).zip
394 $(MKDIR) org-$(TAG)
395 $(MKDIR) org-$(TAG)/doc
396 $(MKDIR) org-$(TAG)/lisp
397 cp -r $(LISPFILES) org-$(TAG)/lisp
398 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
399 cp -r $(DISTFILES_extra) org-$(TAG)/
400 cp -r README_DIST org-$(TAG)/README
401 zip -r org-$(TAG).zip org-$(TAG)
402 tar zcvf org-$(TAG).tar.gz org-$(TAG)
404 pkg:
405 @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
406 touch doc/org.texi doc/orgcard.tex # force update
407 ${MAKE} info
408 ${MAKE} doc
409 rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
410 $(MKDIR) org-$(PKG_TAG)
411 cp -r $(PKG_FILES) org-$(PKG_TAG)
412 echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
413 tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
415 cleanall:
416 ${MAKE} clean
417 rm -f lisp/org-install.el
419 clean:
420 ${MAKE} cleanelc
421 ${MAKE} cleandoc
422 ${MAKE} cleanrel
423 rm -f *~ */*~ */*/*~
425 cleancontrib:
426 find contrib -name \*~ -exec rm {} \;
428 cleanelc:
429 rm -f $(ELCFILES)
430 cleandoc:
431 -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
432 -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
433 -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
434 -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
435 -(cd doc && rm -rf manual)
437 cleanrel:
438 rm -rf RELEASEDIR
439 rm -rf org-7.*
440 rm -rf org-7*zip org-7*tar.gz
442 .el.elc:
443 $(ELC) $<
446 push:
447 git push orgmode@orgmode.org:org-mode.git master
449 pushtag:
450 git tag -m "Adding tag" -a $(TAG)
451 git push orgmode@orgmode.org:org-mode.git $(TAG)
453 pushreleasetag:
454 git tag -m "Adding release tag" -a release_$(TAG)
455 git push orgmode@orgmode.org:org-mode.git release_$(TAG)
457 # Dependencies
459 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
460 lisp/org-agenda.elc: lisp/org.el
461 lisp/org-ascii.elc: lisp/org-exp.el
462 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
463 lisp/org-archive.elc: lisp/org.el
464 lisp/org-bbdb.elc: lisp/org.el
465 lisp/org-beamer.elc: lisp/org.el
466 lisp/org-bibtex.elc: lisp/org.el
467 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
468 lisp/org-clock.elc: lisp/org.el
469 lisp/org-colview.elc: lisp/org.el
470 lisp/org-colview-xemacs.elc: lisp/org.el
471 lisp/org-compat.elc: lisp/org-macs.el
472 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
473 lisp/org-ctags.elc: lisp/org.el
474 lisp/org-datetree.elc: lisp/org.el
475 lisp/org-docview.elc: lisp/org.el
476 lisp/org-entities.elc:
477 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
478 lisp/org-exp-blocks.elc: lisp/org.el
479 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
480 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
481 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
482 lisp/org-feed.elc: lisp/org.el
483 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
484 lisp/org-freemind.elc: lisp/org.el
485 lisp/org-gnus.elc: lisp/org.el
486 lisp/org-html.elc: lisp/org-exp.el
487 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
488 lisp/org-icalendar.elc: lisp/org-exp.el
489 lisp/org-id.elc: lisp/org.el
490 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
491 lisp/org-info.elc: lisp/org.el
492 lisp/org-inlinetask.elc:
493 lisp/org-irc.elc: lisp/org.el
494 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
495 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
496 lisp/org-mac-message.elc: lisp/org.el
497 lisp/org-macs.elc:
498 lisp/org-mew.elc: lisp/org.el
499 lisp/org-mhe.elc: lisp/org.el
500 lisp/org-mks.elc:
501 lisp/org-mobile.elc: lisp/org.el
502 lisp/org-mouse.elc: lisp/org.el
503 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
504 lisp/org-publish.elc:
505 lisp/org-protocol.elc: lisp/org.el
506 lisp/org-remember.elc: lisp/org.el
507 lisp/org-rmail.elc: lisp/org.el
508 lisp/org-special-blocks.elc: lisp/org-compat.el
509 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
510 lisp/org-table.elc: lisp/org.el
511 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
512 lisp/org-timer.elc: lisp/org.el
513 lisp/org-vm.elc: lisp/org.el
514 lisp/org-w3m.elc: lisp/org.el
515 lisp/org-wl.elc: lisp/org.el
516 lisp/org-xoxo.elc: lisp/org-exp.el
518 # Describe valid make targets for org-mode.
519 targets help:
520 @echo "make - compile Org ELisp files"
521 @echo "make clean - clean Elisp and documentation files"
522 @echo "make all - compile Org ELisp files and documentation"
523 @echo ""
524 @echo "make doc - make all documentation"
525 @echo "make info - make Info documentation"
526 @echo "make html - make HTML documentation"
527 @echo "make pdf - make pdf documentation"
528 @echo "make card - make refcards documentation"
529 @echo ""
530 @echo "make install - install Org"
531 @echo "make install-lisp - install Org ELisp files"
532 @echo "make install-info - install Org Info file"