Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
[org-mode.git] / Makefile
blobcff1e46aa61a0a9b713b18b2a9b41f67222f7b7f
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 "(progn (add-to-list (quote load-path) \"$(lispdir)\") (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
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
49 # How to copy the lisp files and elc files to their distination.
50 CP = cp -p
52 # Name of the program to install info files
53 INSTALL_INFO=install-info
55 ##----------------------------------------------------------------------
56 ## BELOW THIS LINE ON YOUR OWN RISK!
57 ##----------------------------------------------------------------------
59 # The following variables need to be defined by the maintainer
60 LISPF = org.el \
61 org-agenda.el \
62 org-ascii.el \
63 org-attach.el \
64 org-archive.el \
65 org-bbdb.el \
66 org-beamer.el \
67 org-bibtex.el \
68 org-clock.el \
69 org-colview.el \
70 org-colview-xemacs.el \
71 org-compat.el \
72 org-crypt.el \
73 org-datetree.el \
74 org-docview.el \
75 org-exp.el \
76 org-exp-blocks.el \
77 org-docbook.el \
78 org-faces.el \
79 org-feed.el \
80 org-footnote.el \
81 org-freemind.el \
82 org-gnus.el \
83 org-habit.el \
84 org-html.el \
85 org-icalendar.el \
86 org-id.el \
87 org-indent.el \
88 org-info.el \
89 org-inlinetask.el \
90 org-jsinfo.el \
91 org-irc.el \
92 org-latex.el \
93 org-list.el \
94 org-mac-message.el \
95 org-macs.el \
96 org-mew.el \
97 org-mhe.el \
98 org-mobile.el \
99 org-mouse.el \
100 org-publish.el \
101 org-plot.el \
102 org-protocol.el \
103 org-remember.el \
104 org-rmail.el \
105 org-src.el \
106 org-table.el \
107 org-timer.el \
108 org-vm.el \
109 org-w3m.el \
110 org-wl.el \
111 org-xoxo.el
113 LISPFILES0 = $(LISPF:%=lisp/%)
114 LISPFILES = $(LISPFILES0) lisp/org-install.el
115 ELCFILES0 = $(LISPFILES0:.el=.elc)
116 ELCFILES = $(LISPFILES:.el=.elc)
117 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
118 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
119 TEXIFILES = doc/org.texi
120 INFOFILES = doc/org
123 .SUFFIXES: .el .elc .texi
124 SHELL = /bin/sh
126 # Additional distribution files
127 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
128 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
130 default: $(ELCFILES)
132 all: $(ELCFILES) $(INFOFILES)
134 up2: update
135 sudo ${MAKE} install
137 update:
138 git pull
139 ${MAKE} clean
140 ${MAKE} all
142 compile: $(ELCFILES0)
144 install: install-lisp
146 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
149 ${MAKE} pdf && open doc/org.pdf
152 ${MAKE} card && gv doc/orgcard.ps
154 install-lisp: $(LISPFILES) $(ELCFILES)
155 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
156 $(CP) $(LISPFILES) $(lispdir)
157 $(CP) $(ELCFILES) $(lispdir)
159 install-info: $(INFOFILES)
160 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
161 $(CP) $(INFOFILES) $(infodir)
162 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
164 install-info-debian: $(INFOFILES)
165 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
167 install-noutline: xemacs/noutline.elc
168 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
169 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
171 autoloads: lisp/org-install.el
173 lisp/org-install.el: $(LISPFILES0) Makefile
174 $(BATCH) --eval "(require 'autoload)" \
175 --eval '(find-file "org-install.el")' \
176 --eval '(erase-buffer)' \
177 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
178 --eval '(insert "\n(provide (quote org-install))\n")' \
179 --eval '(save-buffer)'
180 mv org-install.el lisp
182 xemacs/noutline.elc: xemacs/noutline.el
184 doc/org: doc/org.texi
185 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
187 doc/org.pdf: doc/org.texi
188 (cd doc; $(TEXI2PDF) org.texi)
190 doc/org.html: doc/org.texi
191 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
192 UTILITIES/manfull.pl doc/org.html
194 doc/orgcard.dvi: doc/orgcard.tex
195 (cd doc; tex orgcard.tex)
197 doc/orgcard.pdf: doc/orgcard.dvi
198 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
200 doc/orgcard.ps: doc/orgcard.dvi
201 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
203 doc/orgcard_letter.dvi: doc/orgcard.tex
204 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
205 (cd doc; tex orgcard_letter.tex)
207 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
208 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
210 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
211 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
213 # Below here are special targets for maintenance only
215 updateweb:
216 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
218 html: doc/org.html
220 html_manual: doc/org.texi
221 rm -rf doc/manual
222 mkdir doc/manual
223 $(TEXI2HTML) -o doc/manual doc/org.texi
224 UTILITIES/mansplit.pl doc/manual/*.html
226 info: doc/org
228 pdf: doc/org.pdf
230 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
232 distfile:
233 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
234 touch doc/org.texi doc/orgcard.tex # force update
235 ${MAKE} cleancontrib
236 ${MAKE} info
237 ${MAKE} doc
238 ${MAKE} lisp/org-install.el
239 rm -rf org-$(TAG) org-$(TAG).zip
240 $(MKDIR) org-$(TAG)
241 $(MKDIR) org-$(TAG)/xemacs
242 $(MKDIR) org-$(TAG)/doc
243 $(MKDIR) org-$(TAG)/lisp
244 cp -r $(LISPFILES) org-$(TAG)/lisp
245 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
246 cp -r $(DISTFILES_extra) org-$(TAG)/
247 cp -r README_DIST org-$(TAG)/README
248 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
249 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
250 zip -r org-$(TAG).zip org-$(TAG)
251 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
253 release:
254 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
255 ${MAKE} distfile
256 ${MAKE} doc
257 UTILITIES/gplmanual.pl
258 ${MAKE} html_manual
259 rm -rf RELEASEDIR
260 $(MKDIR) RELEASEDIR
261 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
262 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
263 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
264 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
266 upload_release:
267 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
269 upload_manual:
270 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
272 relup0:
273 ${MAKE} release
274 ${MAKE} upload_release
276 relup:
277 ${MAKE} release
278 ${MAKE} upload_release
279 ${MAKE} upload_manual
282 grep -e '(debug)' lisp/*el
284 cleancontrib:
285 find contrib -name \*~ -exec rm {} \;
287 cleanelc:
288 rm -f $(ELCFILES)
289 cleandoc:
290 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
291 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
292 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
293 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
294 (cd doc; rm -rf manual)
296 cleanrel:
297 rm -rf RELEASEDIR
298 rm -rf org-6.*
299 rm -rf org-6*zip org-6*tar.gz
301 clean:
302 ${MAKE} cleanelc
303 ${MAKE} cleandoc
304 ${MAKE} cleanrel
305 rm -f *~ */*~ */*/*~
307 cleanall:
308 ${MAKE} clean
309 rm -f lisp/org-install.el
311 .el.elc:
312 $(ELC) $<
315 push:
316 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
318 pushtag:
319 git-tag -m "Adding tag" -a $(TAG)
320 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
322 pushreleasetag:
323 git-tag -m "Adding release tag" -a release_$(TAG)
324 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
326 dummy:
327 echo ${prefix}
329 # Dependencies
331 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
332 lisp/org-agenda.elc: lisp/org.el
333 lisp/org-ascii.elc: lisp/org-exp.el
334 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
335 lisp/org-archive.elc: lisp/org.el
336 lisp/org-bbdb.elc: lisp/org.el
337 lisp/org-beamer.elc: lisp/org.el
338 lisp/org-bibtex.elc: lisp/org.el
339 lisp/org-clock.elc: lisp/org.el
340 lisp/org-colview.elc: lisp/org.el
341 lisp/org-colview-xemacs.elc: lisp/org.el
342 lisp/org-compat.elc: lisp/org-macs.el
343 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
344 lisp/org-datetree.elc: lisp/org.el
345 lisp/org-docview.elc: lisp/org.el
346 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
347 lisp/org-exp-blocks.elc: lisp/org.el
348 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
349 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
350 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
351 lisp/org-feed.elc: lisp/org.el
352 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
353 lisp/org-freemind.elc: lisp/org.el
354 lisp/org-gnus.elc: lisp/org.el
355 lisp/org-html.elc: lisp/org-exp.el
356 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
357 lisp/org-icalendar.elc: lisp/org-exp.el
358 lisp/org-id.elc: lisp/org.el
359 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
360 lisp/org-info.elc: lisp/org.el
361 lisp/org-inlinetask.elc:
362 lisp/org-irc.elc: lisp/org.el
363 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
364 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
365 lisp/org-mac-message.elc: lisp/org.el
366 lisp/org-macs.elc:
367 lisp/org-mew.elc: lisp/org.el
368 lisp/org-mhe.elc: lisp/org.el
369 lisp/org-mobile.elc: lisp/org.el
370 lisp/org-mouse.elc: lisp/org.el
371 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
372 lisp/org-publish.elc:
373 lisp/org-protocol.elc: lisp/org.el
374 lisp/org-remember.elc: lisp/org.el
375 lisp/org-rmail.elc: lisp/org.el
376 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
377 lisp/org-table.elc: lisp/org.el
378 lisp/org-timer.elc: lisp/org.el
379 lisp/org-vm.elc: lisp/org.el
380 lisp/org-w3m.elc: lisp/org.el
381 lisp/org-wl.elc: lisp/org.el
382 lisp/org-xoxo.elc: lisp/org-exp.el