Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
[org-mode/org-jambu.git] / Makefile
blobc767cbdb83c36a5a778ee15815e0d08a20c340e1
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\
33 \"langs\"\
34 (expand-file-name \"babel\" (expand-file-name \"./lisp/\")))\
35 (cons (expand-file-name \"babel\" (expand-file-name \"./lisp/\"))\
36 (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))))"
38 # Specify the byte-compiler for compiling org-mode files
39 ELC= $(BATCH) -f batch-byte-compile
41 # How to make a pdf file from a texinfo file
42 TEXI2PDF = texi2pdf
44 # How to create directories
45 MKDIR = mkdir -p
47 # How to create the info files from the texinfo file
48 MAKEINFO = makeinfo
50 # How to create the HTML file
51 TEXI2HTML = makeinfo --html --number-sections
52 TEXI2HTMLNOPSLIT = makeinfo --html --no-split --number-sections
54 # How to copy the lisp files and elc files to their distination.
55 CP = cp -p
57 # Name of the program to install info files
58 INSTALL_INFO=install-info
60 ##----------------------------------------------------------------------
61 ## BELOW THIS LINE ON YOUR OWN RISK!
62 ##----------------------------------------------------------------------
64 # The following variables need to be defined by the maintainer
65 LISPF = org.el \
66 org-agenda.el \
67 org-ascii.el \
68 org-attach.el \
69 org-archive.el \
70 org-bbdb.el \
71 org-beamer.el \
72 org-bibtex.el \
73 org-capture.el \
74 org-clock.el \
75 org-colview.el \
76 org-colview-xemacs.el \
77 org-compat.el \
78 org-crypt.el \
79 org-ctags.el \
80 org-datetree.el \
81 org-docview.el \
82 org-entities.el \
83 org-exp.el \
84 org-exp-blocks.el \
85 org-docbook.el \
86 org-faces.el \
87 org-feed.el \
88 org-footnote.el \
89 org-freemind.el \
90 org-gnus.el \
91 org-habit.el \
92 org-html.el \
93 org-icalendar.el \
94 org-id.el \
95 org-indent.el \
96 org-info.el \
97 org-inlinetask.el \
98 org-jsinfo.el \
99 org-irc.el \
100 org-latex.el \
101 org-list.el \
102 org-mac-message.el \
103 org-macs.el \
104 org-mew.el \
105 org-mhe.el \
106 org-mks.el \
107 org-mobile.el \
108 org-mouse.el \
109 org-publish.el \
110 org-plot.el \
111 org-protocol.el \
112 org-remember.el \
113 org-rmail.el \
114 org-src.el \
115 org-table.el \
116 org-taskjuggler.el \
117 org-timer.el \
118 org-vm.el \
119 org-w3m.el \
120 org-wl.el \
121 org-xoxo.el \
122 babel/ob.el \
123 babel/ob-table.el \
124 babel/ob-lob.el \
125 babel/ob-ref.el \
126 babel/ob-exp.el \
127 babel/ob-tangle.el \
128 babel/ob-comint.el \
129 babel/ob-keys.el \
130 babel/langs/ob-emacs-lisp.el
132 LISPFILES0 = $(LISPF:%=lisp/%)
133 LISPFILES = $(LISPFILES0) lisp/org-install.el
134 ELCFILES0 = $(LISPFILES0:.el=.elc)
135 ELCFILES = $(LISPFILES:.el=.elc)
136 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
137 doc/pdflayout.sty doc/.nosearch \
138 doc/orgguide.texi doc/orgguide.pdf
139 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
140 TEXIFILES = doc/org.texi
141 INFOFILES = doc/org
144 .SUFFIXES: .el .elc .texi
145 SHELL = /bin/sh
147 # Additional distribution files
148 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
149 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
151 default: $(ELCFILES)
153 all: $(ELCFILES) $(INFOFILES)
155 up2: update
156 sudo ${MAKE} install
158 update:
159 git pull
160 ${MAKE} clean
161 ${MAKE} all
163 compile: $(ELCFILES0)
165 install: install-lisp
167 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf
170 ${MAKE} pdf && open doc/org.pdf
173 ${MAKE} pdf && open doc/orgguide.pdf
175 install-lisp: $(LISPFILES) $(ELCFILES)
176 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
177 $(CP) $(LISPFILES) $(lispdir)
178 $(CP) $(ELCFILES) $(lispdir)
180 install-info: $(INFOFILES)
181 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
182 $(CP) $(INFOFILES) $(infodir)
183 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
185 install-info-debian: $(INFOFILES)
186 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
188 install-noutline: xemacs/noutline.elc
189 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
190 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
192 autoloads: lisp/org-install.el
194 lisp/org-install.el: $(LISPFILES0) Makefile
195 $(BATCH) --eval "(require 'autoload)" \
196 --eval '(find-file "org-install.el")' \
197 --eval '(erase-buffer)' \
198 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
199 --eval "(insert \"(add-to-list 'load-path (expand-file-name \\\"babel\\\" (file-name-directory (or (buffer-file-name) load-file-name))))\")" \
200 --eval "(insert \"\n(add-to-list 'load-path (expand-file-name \\\"langs\\\" (expand-file-name \\\"babel\\\" (file-name-directory (or (buffer-file-name) load-file-name)))))\")\n" \
201 --eval '(insert "\n(provide (quote org-install))\n")' \
202 --eval '(save-buffer)'
203 mv org-install.el lisp
205 xemacs/noutline.elc: xemacs/noutline.el
207 doc/org: doc/org.texi
208 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
210 doc/org.pdf: doc/org.texi
211 (cd doc; $(TEXI2PDF) org.texi)
213 doc/orgguide.pdf: doc/orgguide.texi
214 (cd doc; $(TEXI2PDF) orgguide.texi)
216 doc/org.html: doc/org.texi
217 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
218 UTILITIES/manfull.pl doc/org.html
220 doc/orgcard.pdf: doc/orgcard.tex
221 (cd doc; pdftex orgcard.tex)
223 doc/orgcard.txt: doc/orgcard.tex
224 (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
226 doc/orgcard_letter.tex: doc/orgcard.tex
227 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
228 doc/orgcard.tex > doc/orgcard_letter.tex
230 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
231 (cd doc; pdftex orgcard_letter.tex)
233 # Below here are special targets for maintenance only
235 updateweb:
236 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
238 html: doc/org.html
240 html_manual: doc/org.texi
241 rm -rf doc/manual
242 mkdir doc/manual
243 $(TEXI2HTML) -o doc/manual doc/org.texi
244 UTILITIES/mansplit.pl doc/manual/*.html
246 html_guide: doc/orgguide.texi
247 rm -rf doc/guide
248 mkdir doc/guide
249 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
250 UTILITIES/guidesplit.pl doc/guide/*.html
252 info: doc/org
254 pdf: doc/org.pdf doc/orgguide.pdf
256 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
258 distfile:
259 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
260 touch doc/org.texi doc/orgcard.tex # force update
261 ${MAKE} cleancontrib
262 ${MAKE} info
263 ${MAKE} doc
264 ${MAKE} lisp/org-install.el
265 rm -rf org-$(TAG) org-$(TAG).zip
266 $(MKDIR) org-$(TAG)
267 $(MKDIR) org-$(TAG)/xemacs
268 $(MKDIR) org-$(TAG)/doc
269 $(MKDIR) org-$(TAG)/lisp
270 cp -r $(LISPFILES) org-$(TAG)/lisp
271 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
272 cp -r $(DISTFILES_extra) org-$(TAG)/
273 cp -r README_DIST org-$(TAG)/README
274 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
275 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
276 zip -r org-$(TAG).zip org-$(TAG)
277 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
279 release:
280 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
281 ${MAKE} distfile
282 ${MAKE} doc
283 UTILITIES/gplmanual.pl
284 ${MAKE} html_manual
285 ${MAKE} html_guide
286 rm -rf RELEASEDIR
287 $(MKDIR) RELEASEDIR
288 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
289 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
290 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
291 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
292 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
294 upload_release:
295 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
297 upload_manual:
298 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
299 rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
301 relup0:
302 ${MAKE} release
303 ${MAKE} upload_release
305 relup:
306 ${MAKE} release
307 ${MAKE} upload_release
308 ${MAKE} upload_manual
311 grep -e '(debug)' lisp/*el
313 cleancontrib:
314 find contrib -name \*~ -exec rm {} \;
316 cleanelc:
317 rm -f $(ELCFILES)
318 cleandoc:
319 (cd doc; rm -f org.pdf org org.html orgcard.pdf)
320 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
321 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
322 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
323 (cd doc; rm -rf manual)
325 cleanrel:
326 rm -rf RELEASEDIR
327 rm -rf org-6.*
328 rm -rf org-6*zip org-6*tar.gz
330 clean:
331 ${MAKE} cleanelc
332 ${MAKE} cleandoc
333 ${MAKE} cleanrel
334 rm -f *~ */*~ */*/*~
336 cleanall:
337 ${MAKE} clean
338 rm -f lisp/org-install.el
340 .el.elc:
341 $(ELC) $<
344 push:
345 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
347 pushtag:
348 git-tag -m "Adding tag" -a $(TAG)
349 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
351 pushreleasetag:
352 git-tag -m "Adding release tag" -a release_$(TAG)
353 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
355 dummy:
356 echo ${prefix}
358 # Dependencies
360 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
361 lisp/org-agenda.elc: lisp/org.el
362 lisp/org-ascii.elc: lisp/org-exp.el
363 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
364 lisp/org-archive.elc: lisp/org.el
365 lisp/org-bbdb.elc: lisp/org.el
366 lisp/org-beamer.elc: lisp/org.el
367 lisp/org-bibtex.elc: lisp/org.el
368 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
369 lisp/org-clock.elc: lisp/org.el
370 lisp/org-colview.elc: lisp/org.el
371 lisp/org-colview-xemacs.elc: lisp/org.el
372 lisp/org-compat.elc: lisp/org-macs.el
373 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
374 lisp/org-ctags.elc: lisp/org.el
375 lisp/org-datetree.elc: lisp/org.el
376 lisp/org-docview.elc: lisp/org.el
377 lisp/org-entities.elc:
378 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
379 lisp/org-exp-blocks.elc: lisp/org.el
380 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
381 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
382 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
383 lisp/org-feed.elc: lisp/org.el
384 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
385 lisp/org-freemind.elc: lisp/org.el
386 lisp/org-gnus.elc: lisp/org.el
387 lisp/org-html.elc: lisp/org-exp.el
388 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
389 lisp/org-icalendar.elc: lisp/org-exp.el
390 lisp/org-id.elc: lisp/org.el
391 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
392 lisp/org-info.elc: lisp/org.el
393 lisp/org-inlinetask.elc:
394 lisp/org-irc.elc: lisp/org.el
395 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
396 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
397 lisp/org-mac-message.elc: lisp/org.el
398 lisp/org-macs.elc:
399 lisp/org-mew.elc: lisp/org.el
400 lisp/org-mhe.elc: lisp/org.el
401 lisp/org-mks.elc:
402 lisp/org-mobile.elc: lisp/org.el
403 lisp/org-mouse.elc: lisp/org.el
404 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
405 lisp/org-publish.elc:
406 lisp/org-protocol.elc: lisp/org.el
407 lisp/org-remember.elc: lisp/org.el
408 lisp/org-rmail.elc: lisp/org.el
409 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
410 lisp/org-table.elc: lisp/org.el
411 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
412 lisp/org-timer.elc: lisp/org.el
413 lisp/org-vm.elc: lisp/org.el
414 lisp/org-w3m.elc: lisp/org.el
415 lisp/org-wl.elc: lisp/org.el
416 lisp/org-xoxo.elc: lisp/org-exp.el