Credit to David Maus in the manual
[org-mode/org-jambu.git] / Makefile
blobf4cd9b5904ba2e92ba6efaab082db6458cb7a88c
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-crypt.el \
75 org-ctags.el \
76 org-datetree.el \
77 org-docview.el \
78 org-entities.el \
79 org-exp.el \
80 org-exp-blocks.el \
81 org-docbook.el \
82 org-faces.el \
83 org-feed.el \
84 org-footnote.el \
85 org-freemind.el \
86 org-gnus.el \
87 org-habit.el \
88 org-html.el \
89 org-icalendar.el \
90 org-id.el \
91 org-indent.el \
92 org-info.el \
93 org-inlinetask.el \
94 org-jsinfo.el \
95 org-irc.el \
96 org-latex.el \
97 org-list.el \
98 org-mac-message.el \
99 org-macs.el \
100 org-mew.el \
101 org-mhe.el \
102 org-mks.el \
103 org-mobile.el \
104 org-mouse.el \
105 org-publish.el \
106 org-plot.el \
107 org-protocol.el \
108 org-remember.el \
109 org-rmail.el \
110 org-src.el \
111 org-table.el \
112 org-taskjuggler.el \
113 org-timer.el \
114 org-vm.el \
115 org-w3m.el \
116 org-wl.el \
117 org-xoxo.el \
118 ob.el \
119 ob-table.el \
120 ob-lob.el \
121 ob-ref.el \
122 ob-exp.el \
123 ob-tangle.el \
124 ob-comint.el \
125 ob-eval.el \
126 ob-keys.el \
127 ob-C.el \
128 ob-ditaa.el \
129 ob-haskell.el \
130 ob-perl.el \
131 ob-sh.el \
132 ob-R.el \
133 ob-dot.el \
134 ob-mscgen.el \
135 ob-latex.el \
136 ob-python.el \
137 ob-sql.el \
138 ob-asymptote.el \
139 ob-emacs-lisp.el \
140 ob-matlab.el \
141 ob-ruby.el \
142 ob-sqlite.el \
143 ob-clojure.el \
144 ob-ocaml.el \
145 ob-sass.el \
146 ob-css.el \
147 ob-gnuplot.el \
148 ob-octave.el \
149 ob-screen.el
151 LISPFILES0 = $(LISPF:%=lisp/%)
152 LISPFILES = $(LISPFILES0) lisp/org-install.el
153 ELCFILES0 = $(LISPFILES0:.el=.elc)
154 ELCFILES = $(LISPFILES:.el=.elc)
155 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
156 doc/pdflayout.sty doc/.nosearch \
157 doc/orgguide.texi doc/orgguide.pdf
158 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
159 TEXIFILES = doc/org.texi
160 INFOFILES = doc/org
163 .SUFFIXES: .el .elc .texi
164 SHELL = /bin/sh
166 # Additional distribution files
167 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
168 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
170 default: $(ELCFILES) $(ELCBFILES)
172 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
174 up2: update
175 sudo ${MAKE} install
177 update:
178 git pull
179 ${MAKE} clean
180 ${MAKE} all
182 compile: $(ELCFILES0) $(ELCBFILES)
184 install: install-lisp
186 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf
189 ${MAKE} pdf && open doc/org.pdf
192 ${MAKE} pdf && open doc/orgguide.pdf
194 install-lisp: $(LISPFILES) $(ELCFILES)
195 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
196 $(CP) $(LISPFILES) $(lispdir)
197 $(CP) $(ELCFILES) $(lispdir)
199 install-info: $(INFOFILES)
200 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
201 $(CP) $(INFOFILES) $(infodir)
202 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
204 install-info-debian: $(INFOFILES)
205 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
207 install-noutline: xemacs/noutline.elc
208 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
209 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
211 autoloads: lisp/org-install.el
213 lisp/org-install.el: $(LISPFILES0) Makefile
214 $(BATCH) --eval "(require 'autoload)" \
215 --eval '(find-file "org-install.el")' \
216 --eval '(erase-buffer)' \
217 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
218 --eval '(insert "\n(provide (quote org-install))\n")' \
219 --eval '(save-buffer)'
220 mv org-install.el lisp
222 xemacs/noutline.elc: xemacs/noutline.el
224 doc/org: doc/org.texi
225 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
227 doc/org.pdf: doc/org.texi
228 (cd doc; $(TEXI2PDF) org.texi)
230 doc/orgguide.pdf: doc/orgguide.texi
231 (cd doc; $(TEXI2PDF) orgguide.texi)
233 doc/org.html: doc/org.texi
234 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
235 UTILITIES/manfull.pl doc/org.html
237 doc/orgcard.pdf: doc/orgcard.tex
238 (cd doc; pdftex orgcard.tex)
240 doc/orgcard.txt: doc/orgcard.tex
241 (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
243 doc/orgcard_letter.tex: doc/orgcard.tex
244 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
245 doc/orgcard.tex > doc/orgcard_letter.tex
247 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
248 (cd doc; pdftex orgcard_letter.tex)
250 # Below here are special targets for maintenance only
252 updateweb:
253 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
255 html: doc/org.html
257 html_manual: doc/org.texi
258 rm -rf doc/manual
259 mkdir doc/manual
260 $(TEXI2HTML) -o doc/manual doc/org.texi
261 UTILITIES/mansplit.pl doc/manual/*.html
263 html_guide: doc/orgguide.texi
264 rm -rf doc/guide
265 mkdir doc/guide
266 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
267 UTILITIES/guidesplit.pl doc/guide/*.html
269 info: doc/org
271 pdf: doc/org.pdf doc/orgguide.pdf
273 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
275 distfile:
276 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
277 touch doc/org.texi doc/orgcard.tex # force update
278 ${MAKE} cleancontrib
279 ${MAKE} info
280 ${MAKE} doc
281 ${MAKE} lisp/org-install.el
282 rm -rf org-$(TAG) org-$(TAG).zip
283 $(MKDIR) org-$(TAG)
284 $(MKDIR) org-$(TAG)/xemacs
285 $(MKDIR) org-$(TAG)/doc
286 $(MKDIR) org-$(TAG)/lisp
287 cp -r $(LISPFILES) org-$(TAG)/lisp
288 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
289 cp -r $(DISTFILES_extra) org-$(TAG)/
290 cp -r README_DIST org-$(TAG)/README
291 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
292 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
293 zip -r org-$(TAG).zip org-$(TAG)
294 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
296 release:
297 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
298 ${MAKE} distfile
299 ${MAKE} doc
300 UTILITIES/gplmanual.pl
301 ${MAKE} html_manual
302 ${MAKE} html_guide
303 rm -rf RELEASEDIR
304 $(MKDIR) RELEASEDIR
305 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
306 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
307 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
308 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
309 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
311 upload_release:
312 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
314 upload_manual:
315 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
316 rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
318 relup0:
319 ${MAKE} release
320 ${MAKE} upload_release
322 relup:
323 ${MAKE} release
324 ${MAKE} upload_release
325 ${MAKE} upload_manual
328 grep -e '(debug)' lisp/*el
330 cleancontrib:
331 find contrib -name \*~ -exec rm {} \;
333 cleanelc:
334 rm -f $(ELCFILES)
335 cleandoc:
336 (cd doc; rm -f org.pdf org org.html orgcard.pdf)
337 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
338 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
339 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
340 (cd doc; rm -rf manual)
342 cleanrel:
343 rm -rf RELEASEDIR
344 rm -rf org-6.*
345 rm -rf org-6*zip org-6*tar.gz
347 clean:
348 ${MAKE} cleanelc
349 ${MAKE} cleandoc
350 ${MAKE} cleanrel
351 rm -f *~ */*~ */*/*~
353 cleanall:
354 ${MAKE} clean
355 rm -f lisp/org-install.el
357 .el.elc:
358 $(ELC) $<
361 push:
362 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
364 pushtag:
365 git-tag -m "Adding tag" -a $(TAG)
366 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
368 pushreleasetag:
369 git-tag -m "Adding release tag" -a release_$(TAG)
370 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
372 dummy:
373 echo ${prefix}
375 # Dependencies
377 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
378 lisp/org-agenda.elc: lisp/org.el
379 lisp/org-ascii.elc: lisp/org-exp.el
380 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
381 lisp/org-archive.elc: lisp/org.el
382 lisp/org-bbdb.elc: lisp/org.el
383 lisp/org-beamer.elc: lisp/org.el
384 lisp/org-bibtex.elc: lisp/org.el
385 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
386 lisp/org-clock.elc: lisp/org.el
387 lisp/org-colview.elc: lisp/org.el
388 lisp/org-colview-xemacs.elc: lisp/org.el
389 lisp/org-compat.elc: lisp/org-macs.el
390 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
391 lisp/org-ctags.elc: lisp/org.el
392 lisp/org-datetree.elc: lisp/org.el
393 lisp/org-docview.elc: lisp/org.el
394 lisp/org-entities.elc:
395 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
396 lisp/org-exp-blocks.elc: lisp/org.el
397 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
398 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
399 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
400 lisp/org-feed.elc: lisp/org.el
401 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
402 lisp/org-freemind.elc: lisp/org.el
403 lisp/org-gnus.elc: lisp/org.el
404 lisp/org-html.elc: lisp/org-exp.el
405 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
406 lisp/org-icalendar.elc: lisp/org-exp.el
407 lisp/org-id.elc: lisp/org.el
408 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
409 lisp/org-info.elc: lisp/org.el
410 lisp/org-inlinetask.elc:
411 lisp/org-irc.elc: lisp/org.el
412 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
413 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
414 lisp/org-mac-message.elc: lisp/org.el
415 lisp/org-macs.elc:
416 lisp/org-mew.elc: lisp/org.el
417 lisp/org-mhe.elc: lisp/org.el
418 lisp/org-mks.elc:
419 lisp/org-mobile.elc: lisp/org.el
420 lisp/org-mouse.elc: lisp/org.el
421 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
422 lisp/org-publish.elc:
423 lisp/org-protocol.elc: lisp/org.el
424 lisp/org-remember.elc: lisp/org.el
425 lisp/org-rmail.elc: lisp/org.el
426 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
427 lisp/org-table.elc: lisp/org.el
428 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
429 lisp/org-timer.elc: lisp/org.el
430 lisp/org-vm.elc: lisp/org.el
431 lisp/org-w3m.elc: lisp/org.el
432 lisp/org-wl.elc: lisp/org.el
433 lisp/org-xoxo.elc: lisp/org-exp.el