Keep byte compiler happy
[org-mode.git] / Makefile
bloba1b74424348f58cbb0a9fc8b1edb468fd69c0f80
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
21 lispbdir = $(lispdir)/babel
22 lispbldir = $(lispbdir)/langs
24 # Where info files go.
25 infodir = $(prefix)/share/info
27 ##----------------------------------------------------------------------
28 ## YOU MAY NEED TO EDIT THESE
29 ##----------------------------------------------------------------------
31 # Using emacs in batch mode.
33 BATCH=$(EMACS) -batch -q -no-site-file -eval \
34 "(setq load-path (cons (expand-file-name\
35 \"langs\"\
36 (expand-file-name \"babel\" (expand-file-name \"./lisp/\")))\
37 (cons (expand-file-name \"babel\" (expand-file-name \"./lisp/\"))\
38 (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))))"
40 # Specify the byte-compiler for compiling org-mode files
41 ELC= $(BATCH) -f batch-byte-compile
43 # How to make a pdf file from a texinfo file
44 TEXI2PDF = texi2pdf
46 # How to create directories
47 MKDIR = mkdir -p
49 # How to create the info files from the texinfo file
50 MAKEINFO = makeinfo
52 # How to create the HTML file
53 TEXI2HTML = makeinfo --html --number-sections
54 TEXI2HTMLNOPSLIT = makeinfo --html --no-split --number-sections
56 # How to copy the lisp files and elc files to their distination.
57 CP = cp -p
59 # Name of the program to install info files
60 INSTALL_INFO=install-info
62 ##----------------------------------------------------------------------
63 ## BELOW THIS LINE ON YOUR OWN RISK!
64 ##----------------------------------------------------------------------
66 # The following variables need to be defined by the maintainer
67 LISPF = org.el \
68 org-agenda.el \
69 org-ascii.el \
70 org-attach.el \
71 org-archive.el \
72 org-bbdb.el \
73 org-beamer.el \
74 org-bibtex.el \
75 org-capture.el \
76 org-clock.el \
77 org-colview.el \
78 org-colview-xemacs.el \
79 org-compat.el \
80 org-crypt.el \
81 org-ctags.el \
82 org-datetree.el \
83 org-docview.el \
84 org-entities.el \
85 org-exp.el \
86 org-exp-blocks.el \
87 org-docbook.el \
88 org-faces.el \
89 org-feed.el \
90 org-footnote.el \
91 org-freemind.el \
92 org-gnus.el \
93 org-habit.el \
94 org-html.el \
95 org-icalendar.el \
96 org-id.el \
97 org-indent.el \
98 org-info.el \
99 org-inlinetask.el \
100 org-jsinfo.el \
101 org-irc.el \
102 org-latex.el \
103 org-list.el \
104 org-mac-message.el \
105 org-macs.el \
106 org-mew.el \
107 org-mhe.el \
108 org-mks.el \
109 org-mobile.el \
110 org-mouse.el \
111 org-publish.el \
112 org-plot.el \
113 org-protocol.el \
114 org-remember.el \
115 org-rmail.el \
116 org-src.el \
117 org-table.el \
118 org-taskjuggler.el \
119 org-timer.el \
120 org-vm.el \
121 org-w3m.el \
122 org-wl.el \
123 org-xoxo.el
125 LISPBF = ob.el \
126 ob-table.el \
127 ob-lob.el \
128 ob-ref.el \
129 ob-exp.el \
130 ob-tangle.el \
131 ob-comint.el \
132 ob-keys.el
134 LISPBLF = ob-C.el \
135 ob-ditaa.el \
136 ob-haskell.el \
137 ob-perl.el \
138 ob-sh.el \
139 ob-R.el \
140 ob-dot.el \
141 ob-latex.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
157 LISPFILES0 = $(LISPF:%=lisp/%)
158 LISPFILES = $(LISPFILES0) lisp/org-install.el
159 LISPBFILES = $(LISPBF:%=lisp/babel/%)
160 LISPBLFILES = $(LISPBLF:%=lisp/babel/langs/%)
161 ELCFILES0 = $(LISPFILES0:.el=.elc)
162 ELCFILES = $(LISPFILES:.el=.elc)
163 ELCBFILES = $(LISPBFILES:.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
172 .SUFFIXES: .el .elc .texi
173 SHELL = /bin/sh
175 # Additional distribution files
176 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
177 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
179 default: $(ELCFILES) $(ELCBFILES)
181 all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
183 up2: update
184 sudo ${MAKE} install
186 update:
187 git pull
188 ${MAKE} clean
189 ${MAKE} all
191 compile: $(ELCFILES0) $(ELCBFILES)
193 install: install-lisp
195 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf
198 ${MAKE} pdf && open doc/org.pdf
201 ${MAKE} pdf && open doc/orgguide.pdf
203 install-lisp: $(LISPFILES) $(LISPBFILES) $(ELCFILES)
204 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
205 if [ ! -d $(lispbdir) ]; then $(MKDIR) $(lispbdir); else true; fi ;
206 if [ ! -d $(lispbldir) ]; then $(MKDIR) $(lispbldir); else true; fi ;
207 $(CP) $(LISPFILES) $(lispdir)
208 $(CP) $(ELCFILES) $(lispdir)
209 $(CP) $(LISPBFILES) $(lispbdir)
210 $(CP) $(ELCBFILES) $(lispbdir)
211 $(CP) $(LISPBLFILES) $(lispbldir)
213 install-info: $(INFOFILES)
214 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
215 $(CP) $(INFOFILES) $(infodir)
216 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
218 install-info-debian: $(INFOFILES)
219 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
221 install-noutline: xemacs/noutline.elc
222 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
223 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
225 autoloads: lisp/org-install.el
227 lisp/org-install.el: $(LISPFILES0) $(LISPBFILES) Makefile
228 $(BATCH) --eval "(require 'autoload)" \
229 --eval '(find-file "org-install.el")' \
230 --eval '(erase-buffer)' \
231 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0) $(LISPBFILES))))' \
232 --eval "(insert \"(add-to-list 'load-path (expand-file-name \\\"babel\\\" (file-name-directory (or load-file-name (buffer-file-name)))))\")" \
233 --eval "(insert \"\n(add-to-list 'load-path (expand-file-name \\\"langs\\\" (expand-file-name \\\"babel\\\" (file-name-directory (or load-file-name (buffer-file-name))))))\")\n" \
234 --eval '(insert "\n(provide (quote org-install))\n")' \
235 --eval '(save-buffer)'
236 mv org-install.el lisp
238 xemacs/noutline.elc: xemacs/noutline.el
240 doc/org: doc/org.texi
241 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
243 doc/org.pdf: doc/org.texi
244 (cd doc; $(TEXI2PDF) org.texi)
246 doc/orgguide.pdf: doc/orgguide.texi
247 (cd doc; $(TEXI2PDF) orgguide.texi)
249 doc/org.html: doc/org.texi
250 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
251 UTILITIES/manfull.pl doc/org.html
253 doc/orgcard.pdf: doc/orgcard.tex
254 (cd doc; pdftex orgcard.tex)
256 doc/orgcard.txt: doc/orgcard.tex
257 (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
259 doc/orgcard_letter.tex: doc/orgcard.tex
260 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
261 doc/orgcard.tex > doc/orgcard_letter.tex
263 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
264 (cd doc; pdftex orgcard_letter.tex)
266 # Below here are special targets for maintenance only
268 updateweb:
269 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
271 html: doc/org.html
273 html_manual: doc/org.texi
274 rm -rf doc/manual
275 mkdir doc/manual
276 $(TEXI2HTML) -o doc/manual doc/org.texi
277 UTILITIES/mansplit.pl doc/manual/*.html
279 html_guide: doc/orgguide.texi
280 rm -rf doc/guide
281 mkdir doc/guide
282 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
283 UTILITIES/guidesplit.pl doc/guide/*.html
285 info: doc/org
287 pdf: doc/org.pdf doc/orgguide.pdf
289 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
291 distfile:
292 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
293 touch doc/org.texi doc/orgcard.tex # force update
294 ${MAKE} cleancontrib
295 ${MAKE} info
296 ${MAKE} doc
297 ${MAKE} lisp/org-install.el
298 rm -rf org-$(TAG) org-$(TAG).zip
299 $(MKDIR) org-$(TAG)
300 $(MKDIR) org-$(TAG)/xemacs
301 $(MKDIR) org-$(TAG)/doc
302 $(MKDIR) org-$(TAG)/lisp
303 cp -r $(LISPFILES) org-$(TAG)/lisp
304 cp -r $(LISPBFILES) org-$(TAG)/lisp/babel
305 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
306 cp -r $(DISTFILES_extra) org-$(TAG)/
307 cp -r README_DIST org-$(TAG)/README
308 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
309 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
310 zip -r org-$(TAG).zip org-$(TAG)
311 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
313 release:
314 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
315 ${MAKE} distfile
316 ${MAKE} doc
317 UTILITIES/gplmanual.pl
318 ${MAKE} html_manual
319 ${MAKE} html_guide
320 rm -rf RELEASEDIR
321 $(MKDIR) RELEASEDIR
322 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
323 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
324 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
325 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
326 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
328 upload_release:
329 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
331 upload_manual:
332 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
333 rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
335 relup0:
336 ${MAKE} release
337 ${MAKE} upload_release
339 relup:
340 ${MAKE} release
341 ${MAKE} upload_release
342 ${MAKE} upload_manual
345 grep -e '(debug)' lisp/*el
347 cleancontrib:
348 find contrib -name \*~ -exec rm {} \;
350 cleanelc:
351 rm -f $(ELCFILES)
352 cleandoc:
353 (cd doc; rm -f org.pdf org org.html orgcard.pdf)
354 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
355 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
356 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
357 (cd doc; rm -rf manual)
359 cleanrel:
360 rm -rf RELEASEDIR
361 rm -rf org-6.*
362 rm -rf org-6*zip org-6*tar.gz
364 clean:
365 ${MAKE} cleanelc
366 ${MAKE} cleandoc
367 ${MAKE} cleanrel
368 rm -f *~ */*~ */*/*~
370 cleanall:
371 ${MAKE} clean
372 rm -f lisp/org-install.el
374 .el.elc:
375 $(ELC) $<
378 push:
379 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
381 pushtag:
382 git-tag -m "Adding tag" -a $(TAG)
383 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
385 pushreleasetag:
386 git-tag -m "Adding release tag" -a release_$(TAG)
387 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
389 dummy:
390 echo ${prefix}
392 # Dependencies
394 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
395 lisp/org-agenda.elc: lisp/org.el
396 lisp/org-ascii.elc: lisp/org-exp.el
397 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
398 lisp/org-archive.elc: lisp/org.el
399 lisp/org-bbdb.elc: lisp/org.el
400 lisp/org-beamer.elc: lisp/org.el
401 lisp/org-bibtex.elc: lisp/org.el
402 lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
403 lisp/org-clock.elc: lisp/org.el
404 lisp/org-colview.elc: lisp/org.el
405 lisp/org-colview-xemacs.elc: lisp/org.el
406 lisp/org-compat.elc: lisp/org-macs.el
407 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
408 lisp/org-ctags.elc: lisp/org.el
409 lisp/org-datetree.elc: lisp/org.el
410 lisp/org-docview.elc: lisp/org.el
411 lisp/org-entities.elc:
412 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
413 lisp/org-exp-blocks.elc: lisp/org.el
414 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
415 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
416 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
417 lisp/org-feed.elc: lisp/org.el
418 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
419 lisp/org-freemind.elc: lisp/org.el
420 lisp/org-gnus.elc: lisp/org.el
421 lisp/org-html.elc: lisp/org-exp.el
422 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
423 lisp/org-icalendar.elc: lisp/org-exp.el
424 lisp/org-id.elc: lisp/org.el
425 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
426 lisp/org-info.elc: lisp/org.el
427 lisp/org-inlinetask.elc:
428 lisp/org-irc.elc: lisp/org.el
429 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
430 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
431 lisp/org-mac-message.elc: lisp/org.el
432 lisp/org-macs.elc:
433 lisp/org-mew.elc: lisp/org.el
434 lisp/org-mhe.elc: lisp/org.el
435 lisp/org-mks.elc:
436 lisp/org-mobile.elc: lisp/org.el
437 lisp/org-mouse.elc: lisp/org.el
438 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
439 lisp/org-publish.elc:
440 lisp/org-protocol.elc: lisp/org.el
441 lisp/org-remember.elc: lisp/org.el
442 lisp/org-rmail.elc: lisp/org.el
443 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
444 lisp/org-table.elc: lisp/org.el
445 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
446 lisp/org-timer.elc: lisp/org.el
447 lisp/org-vm.elc: lisp/org.el
448 lisp/org-w3m.elc: lisp/org.el
449 lisp/org-wl.elc: lisp/org.el
450 lisp/org-xoxo.elc: lisp/org-exp.el