Improve documentation of `org-directory'.
[org-mode.git] / Makefile
blob16c863cc7b3aca0ba4d3daa748fcb8a8e765b7ac
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.
30 # BATCH=$(EMACS) -batch -q
31 # BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
33 BATCH=$(EMACS) -batch -q -eval \
34 "(progn (add-to-list (quote load-path) (expand-file-name \"./lisp/\")) \
35 (add-to-list (quote load-path) \"$(lispdir)\"))"
37 # Specify the byte-compiler for compiling org-mode files
38 ELC= $(BATCH) -f batch-byte-compile
40 # How to make a pdf file from a texinfo file
41 TEXI2PDF = texi2pdf
43 # How to create directories
44 MKDIR = mkdir -p
46 # How to create the info files from the texinfo file
47 MAKEINFO = makeinfo
49 # How to create the HTML file
50 TEXI2HTML = makeinfo --html --number-sections
52 # How to copy the lisp files and elc files to their distination.
53 CP = cp -p
55 # Name of the program to install info files
56 INSTALL_INFO=install-info
58 ##----------------------------------------------------------------------
59 ## BELOW THIS LINE ON YOUR OWN RISK!
60 ##----------------------------------------------------------------------
62 # The following variables need to be defined by the maintainer
63 LISPF = org.el \
64 org-agenda.el \
65 org-attach.el \
66 org-archive.el \
67 org-bbdb.el \
68 org-bibtex.el \
69 org-clock.el \
70 org-colview.el \
71 org-colview-xemacs.el \
72 org-compat.el \
73 org-exp.el \
74 org-export-latex.el \
75 org-faces.el \
76 org-footnote.el \
77 org-gnus.el \
78 org-id.el \
79 org-info.el \
80 org-jsinfo.el \
81 org-irc.el \
82 org-list.el \
83 org-mac-message.el \
84 org-macs.el \
85 org-mew.el \
86 org-mhe.el \
87 org-mouse.el \
88 org-publish.el \
89 org-plot.el \
90 org-remember.el \
91 org-rmail.el \
92 org-table.el \
93 org-timer.el \
94 org-vm.el \
95 org-w3m.el \
96 org-wl.el
98 LISPFILES0 = $(LISPF:%=lisp/%)
99 LISPFILES = $(LISPFILES0) lisp/org-install.el
100 ELCFILES0 = $(LISPFILES0:.el=.elc)
101 ELCFILES = $(LISPFILES:.el=.elc)
102 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
103 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
104 TEXIFILES = doc/org.texi
105 INFOFILES = doc/org
108 .SUFFIXES: .el .elc .texi
109 SHELL = /bin/sh
111 # Additional distribution files
112 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
113 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
115 default: $(ELCFILES)
117 all: $(ELCFILES) $(INFOFILES)
119 compile: $(ELCFILES0)
121 install: install-lisp
123 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
126 make pdf && open doc/org.pdf
129 make card && gv doc/orgcard.ps
131 install-lisp: $(LISPFILES) $(ELCFILES)
132 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
133 $(CP) $(LISPFILES) $(lispdir)
134 $(CP) $(ELCFILES) $(lispdir)
136 install-info: $(INFOFILES)
137 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
138 $(CP) $(INFOFILES) $(infodir)
139 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
141 install-noutline: xemacs/noutline.elc
142 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
143 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
145 autoloads: lisp/org-install.el
147 lisp/org-install.el: $(LISPFILES0) Makefile
148 $(BATCH) --eval "(require 'autoload)" \
149 --eval '(find-file "org-install.el")' \
150 --eval '(erase-buffer)' \
151 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
152 --eval '(insert "\n(provide (quote org-install))\n")' \
153 --eval '(save-buffer)'
154 mv org-install.el lisp
156 xemacs/noutline.elc: xemacs/noutline.el
158 doc/org: doc/org.texi
159 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
161 doc/org.pdf: doc/org.texi
162 (cd doc; $(TEXI2PDF) org.texi)
164 doc/org.html: doc/org.texi
165 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
166 UTILITIES/manfull.pl doc/org.html
168 doc/orgcard.dvi: doc/orgcard.tex
169 (cd doc; tex orgcard.tex)
171 doc/orgcard.pdf: doc/orgcard.dvi
172 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
174 doc/orgcard.ps: doc/orgcard.dvi
175 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
177 doc/orgcard_letter.dvi: doc/orgcard.tex
178 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
179 (cd doc; tex orgcard_letter.tex)
181 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
182 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
184 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
185 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
187 # Below here are special targets for maintenance only
189 updateweb:
190 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
192 html: doc/org.html
194 html_manual: doc/org.texi
195 rm -rf doc/manual
196 mkdir doc/manual
197 $(TEXI2HTML) -o doc/manual doc/org.texi
198 UTILITIES/mansplit.pl doc/manual/*.html
200 info: doc/org
202 pdf: doc/org.pdf
204 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
206 distfile:
207 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
208 touch doc/org.texi doc/orgcard.tex # force update
209 make cleancontrib
210 make info
211 make doc
212 make lisp/org-install.el
213 rm -rf org-$(TAG) org-$(TAG).zip
214 $(MKDIR) org-$(TAG)
215 $(MKDIR) org-$(TAG)/xemacs
216 $(MKDIR) org-$(TAG)/doc
217 $(MKDIR) org-$(TAG)/lisp
218 cp -r $(LISPFILES) org-$(TAG)/lisp
219 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
220 cp -r $(DISTFILES_extra) org-$(TAG)/
221 cp -r README_DIST org-$(TAG)/README
222 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
223 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
224 zip -r org-$(TAG).zip org-$(TAG)
225 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
227 release:
228 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
229 make distfile
230 make doc
231 UTILITIES/gplmanual.pl
232 make html_manual
233 rm -rf RELEASEDIR
234 $(MKDIR) RELEASEDIR
235 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
236 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
237 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
238 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
240 upload_release:
241 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
243 upload_manual:
244 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
246 snap:
247 make release TAG=snapshot
248 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
249 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
251 relup0:
252 make release
253 make upload_release
255 relup:
256 make release
257 make upload_release
258 make upload_manual
261 grep -e '(debug)' lisp/*el
263 cleancontrib:
264 find contrib -name \*~ -exec rm {} \;
266 cleanelc:
267 rm -f $(ELCFILES)
268 cleandoc:
269 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
270 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
271 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
272 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
273 (cd doc; rm -rf manual)
275 cleanrel:
276 rm -rf RELEASEDIR
277 rm -rf org-6.*
278 rm -rf org-6*zip org-6*tar.gz org-snapshot*
280 clean:
281 make cleanelc
282 make cleandoc
283 make cleanrel
284 rm -f *~ */*~ */*/*~
286 cleanall:
287 make clean
288 rm -f lisp/org-install.el
290 .el.elc:
291 $(ELC) $<
294 push:
295 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
297 pushtag:
298 git-tag -m "Adding tag" -a $(TAG)
299 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
301 pushreleasetag:
302 git-tag -m "Adding release tag" -a release_$(TAG)
303 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
305 dummy:
306 echo ${prefix}
308 # Dependencies
310 lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc
311 lisp/org-agenda.elc: lisp/org.elc
312 lisp/org-attach.elc: lisp/org.elc lisp/org-id.elc
313 lisp/org-archive.elc: lisp/org.elc
314 lisp/org-bbdb.elc: lisp/org.elc
315 lisp/org-bibtex.elc: lisp/org.elc
316 lisp/org-clock.elc: lisp/org.elc
317 lisp/org-colview.elc: lisp/org.elc
318 lisp/org-colview-xemacs.elc: lisp/org.elc
319 lisp/org-compat.elc: lisp/org-macs.elc
320 lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc
321 lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc
322 lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc
323 lisp/org-footnotes.elc: lisp/org-macs.elc lisp/org-compat.elc
324 lisp/org-gnus.elc: lisp/org.elc
325 lisp/org-id.elc: lisp/org.elc
326 lisp/org-info.elc: lisp/org.elc
327 lisp/org-irc.elc: lisp/org.elc
328 lisp/org-jsinfo.elc: lisp/org.elc lisp/org-exp.elc
329 lisp/org-list.elc: lisp/org-macs.elc lisp/org-compat.elc
330 lisp/org-mac-message.elc: lisp/org.elc
331 lisp/org-macs.elc:
332 lisp/org-mew.elc: lisp/org.elc
333 lisp/org-mhe.elc: lisp/org.elc
334 lisp/org-mouse.elc: lisp/org.elc
335 lisp/org-plot.elc: lisp/org.elc lisp/org-exp.elc lisp/org-table.elc
336 lisp/org-publish.elc:
337 lisp/org-remember.elc: lisp/org.elc
338 lisp/org-rmail.elc: lisp/org.elc
339 lisp/org-table.elc: lisp/org.elc
340 lisp/org-timer.el: lisp/org.elc
341 lisp/org-vm.elc: lisp/org.elc
342 lisp/org-w3m.elc: lisp/org.elc
343 lisp/org-wl.elc: lisp/org.elc