babel: some final compiler tweaks -- no more compiler warnings
[org-mode.git] / Makefile
blob436ed6af79072800470a071edd1426b2e1b30e68
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 \"babel\"\
34 (expand-file-name \"./lisp/\"))\
35 (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path))))"
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
51 TEXI2HTMLNOPSLIT = makeinfo --html --no-split --number-sections
53 # How to copy the lisp files and elc files to their distination.
54 CP = cp -p
56 # Name of the program to install info files
57 INSTALL_INFO=install-info
59 ##----------------------------------------------------------------------
60 ## BELOW THIS LINE ON YOUR OWN RISK!
61 ##----------------------------------------------------------------------
63 # The following variables need to be defined by the maintainer
64 LISPF = org.el \
65 org-agenda.el \
66 org-ascii.el \
67 org-attach.el \
68 org-archive.el \
69 org-bbdb.el \
70 org-beamer.el \
71 org-bibtex.el \
72 org-clock.el \
73 org-colview.el \
74 org-colview-xemacs.el \
75 org-compat.el \
76 org-crypt.el \
77 org-ctags.el \
78 org-datetree.el \
79 org-docview.el \
80 org-entities.el \
81 org-exp.el \
82 org-exp-blocks.el \
83 org-docbook.el \
84 org-faces.el \
85 org-feed.el \
86 org-footnote.el \
87 org-freemind.el \
88 org-gnus.el \
89 org-habit.el \
90 org-html.el \
91 org-icalendar.el \
92 org-id.el \
93 org-indent.el \
94 org-info.el \
95 org-inlinetask.el \
96 org-jsinfo.el \
97 org-irc.el \
98 org-latex.el \
99 org-list.el \
100 org-mac-message.el \
101 org-macs.el \
102 org-mew.el \
103 org-mhe.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-src.el \
112 org-table.el \
113 org-taskjuggler.el \
114 org-timer.el \
115 org-vm.el \
116 org-w3m.el \
117 org-wl.el \
118 org-xoxo.el \
119 babel/ob.el \
120 babel/ob-table.el \
121 babel/ob-lob.el \
122 babel/ob-ref.el \
123 babel/ob-exp.el \
124 babel/ob-tangle.el \
125 babel/ob-comint.el \
126 babel/ob-keys.el \
127 babel/langs/ob-emacs-lisp.el
129 LISPFILES0 = $(LISPF:%=lisp/%)
130 LISPFILES = $(LISPFILES0) lisp/org-install.el
131 ELCFILES0 = $(LISPFILES0:.el=.elc)
132 ELCFILES = $(LISPFILES:.el=.elc)
133 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
134 doc/pdflayout.sty doc/.nosearch \
135 doc/orgguide.texi doc/orgguide.pdf
136 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
137 TEXIFILES = doc/org.texi
138 INFOFILES = doc/org
141 .SUFFIXES: .el .elc .texi
142 SHELL = /bin/sh
144 # Additional distribution files
145 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
146 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
148 default: $(ELCFILES)
150 all: $(ELCFILES) $(INFOFILES)
152 up2: update
153 sudo ${MAKE} install
155 update:
156 git pull
157 ${MAKE} clean
158 ${MAKE} all
160 compile: $(ELCFILES0)
162 install: install-lisp
164 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf
167 ${MAKE} pdf && open doc/org.pdf
170 ${MAKE} pdf && open doc/orgguide.pdf
172 install-lisp: $(LISPFILES) $(ELCFILES)
173 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
174 $(CP) $(LISPFILES) $(lispdir)
175 $(CP) $(ELCFILES) $(lispdir)
177 install-info: $(INFOFILES)
178 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
179 $(CP) $(INFOFILES) $(infodir)
180 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
182 install-info-debian: $(INFOFILES)
183 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
185 install-noutline: xemacs/noutline.elc
186 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
187 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
189 autoloads: lisp/org-install.el
191 lisp/org-install.el: $(LISPFILES0) Makefile
192 $(BATCH) --eval "(require 'autoload)" \
193 --eval '(find-file "org-install.el")' \
194 --eval '(erase-buffer)' \
195 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
196 --eval '(insert "\n(provide (quote org-install))\n")' \
197 --eval '(save-buffer)'
198 mv org-install.el lisp
200 xemacs/noutline.elc: xemacs/noutline.el
202 doc/org: doc/org.texi
203 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
205 doc/org.pdf: doc/org.texi
206 (cd doc; $(TEXI2PDF) org.texi)
208 doc/orgguide.pdf: doc/orgguide.texi
209 (cd doc; $(TEXI2PDF) orgguide.texi)
211 doc/org.html: doc/org.texi
212 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
213 UTILITIES/manfull.pl doc/org.html
215 doc/orgcard.pdf: doc/orgcard.tex
216 (cd doc; pdftex orgcard.tex)
218 doc/orgcard.txt: doc/orgcard.tex
219 (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
221 doc/orgcard_letter.tex: doc/orgcard.tex
222 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
223 doc/orgcard.tex > doc/orgcard_letter.tex
225 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
226 (cd doc; pdftex orgcard_letter.tex)
228 # Below here are special targets for maintenance only
230 updateweb:
231 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
233 html: doc/org.html
235 html_manual: doc/org.texi
236 rm -rf doc/manual
237 mkdir doc/manual
238 $(TEXI2HTML) -o doc/manual doc/org.texi
239 UTILITIES/mansplit.pl doc/manual/*.html
241 html_guide: doc/orgguide.texi
242 rm -rf doc/guide
243 mkdir doc/guide
244 $(TEXI2HTML) -o doc/guide doc/orgguide.texi
245 UTILITIES/guidesplit.pl doc/guide/*.html
247 info: doc/org
249 pdf: doc/org.pdf doc/orgguide.pdf
251 card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
253 distfile:
254 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
255 touch doc/org.texi doc/orgcard.tex # force update
256 ${MAKE} cleancontrib
257 ${MAKE} info
258 ${MAKE} doc
259 ${MAKE} lisp/org-install.el
260 rm -rf org-$(TAG) org-$(TAG).zip
261 $(MKDIR) org-$(TAG)
262 $(MKDIR) org-$(TAG)/xemacs
263 $(MKDIR) org-$(TAG)/doc
264 $(MKDIR) org-$(TAG)/lisp
265 cp -r $(LISPFILES) org-$(TAG)/lisp
266 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
267 cp -r $(DISTFILES_extra) org-$(TAG)/
268 cp -r README_DIST org-$(TAG)/README
269 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
270 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
271 zip -r org-$(TAG).zip org-$(TAG)
272 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
274 release:
275 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
276 ${MAKE} distfile
277 ${MAKE} doc
278 UTILITIES/gplmanual.pl
279 ${MAKE} html_manual
280 ${MAKE} html_guide
281 rm -rf RELEASEDIR
282 $(MKDIR) RELEASEDIR
283 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
284 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
285 cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
286 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
287 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
289 upload_release:
290 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
292 upload_manual:
293 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
294 rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
296 relup0:
297 ${MAKE} release
298 ${MAKE} upload_release
300 relup:
301 ${MAKE} release
302 ${MAKE} upload_release
303 ${MAKE} upload_manual
306 grep -e '(debug)' lisp/*el
308 cleancontrib:
309 find contrib -name \*~ -exec rm {} \;
311 cleanelc:
312 rm -f $(ELCFILES)
313 cleandoc:
314 (cd doc; rm -f org.pdf org org.html orgcard.pdf)
315 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
316 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
317 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
318 (cd doc; rm -rf manual)
320 cleanrel:
321 rm -rf RELEASEDIR
322 rm -rf org-6.*
323 rm -rf org-6*zip org-6*tar.gz
325 clean:
326 ${MAKE} cleanelc
327 ${MAKE} cleandoc
328 ${MAKE} cleanrel
329 rm -f *~ */*~ */*/*~
331 cleanall:
332 ${MAKE} clean
333 rm -f lisp/org-install.el
335 .el.elc:
336 $(ELC) $<
339 push:
340 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
342 pushtag:
343 git-tag -m "Adding tag" -a $(TAG)
344 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
346 pushreleasetag:
347 git-tag -m "Adding release tag" -a release_$(TAG)
348 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
350 dummy:
351 echo ${prefix}
353 # Dependencies
355 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
356 lisp/org-agenda.elc: lisp/org.el
357 lisp/org-ascii.elc: lisp/org-exp.el
358 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
359 lisp/org-archive.elc: lisp/org.el
360 lisp/org-bbdb.elc: lisp/org.el
361 lisp/org-beamer.elc: lisp/org.el
362 lisp/org-bibtex.elc: lisp/org.el
363 lisp/org-clock.elc: lisp/org.el
364 lisp/org-colview.elc: lisp/org.el
365 lisp/org-colview-xemacs.elc: lisp/org.el
366 lisp/org-compat.elc: lisp/org-macs.el
367 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
368 lisp/org-ctags.elc: lisp/org.el
369 lisp/org-datetree.elc: lisp/org.el
370 lisp/org-docview.elc: lisp/org.el
371 lisp/org-entities.elc:
372 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
373 lisp/org-exp-blocks.elc: lisp/org.el
374 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
375 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
376 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
377 lisp/org-feed.elc: lisp/org.el
378 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
379 lisp/org-freemind.elc: lisp/org.el
380 lisp/org-gnus.elc: lisp/org.el
381 lisp/org-html.elc: lisp/org-exp.el
382 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
383 lisp/org-icalendar.elc: lisp/org-exp.el
384 lisp/org-id.elc: lisp/org.el
385 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
386 lisp/org-info.elc: lisp/org.el
387 lisp/org-inlinetask.elc:
388 lisp/org-irc.elc: lisp/org.el
389 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
390 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
391 lisp/org-mac-message.elc: lisp/org.el
392 lisp/org-macs.elc:
393 lisp/org-mew.elc: lisp/org.el
394 lisp/org-mhe.elc: lisp/org.el
395 lisp/org-mobile.elc: lisp/org.el
396 lisp/org-mouse.elc: lisp/org.el
397 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
398 lisp/org-publish.elc:
399 lisp/org-protocol.elc: lisp/org.el
400 lisp/org-remember.elc: lisp/org.el
401 lisp/org-rmail.elc: lisp/org.el
402 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
403 lisp/org-table.elc: lisp/org.el
404 lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
405 lisp/org-timer.elc: lisp/org.el
406 lisp/org-vm.elc: lisp/org.el
407 lisp/org-w3m.elc: lisp/org.el
408 lisp/org-wl.elc: lisp/org.el
409 lisp/org-xoxo.elc: lisp/org-exp.el