Keep byte compiler happy
[rgr-org-mode.git] / Makefile
blob4ec504867b07651c64f0913c29c2e034acc0f9f7
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-ctags.el \
74 org-datetree.el \
75 org-docview.el \
76 org-exp.el \
77 org-exp-blocks.el \
78 org-docbook.el \
79 org-faces.el \
80 org-feed.el \
81 org-footnote.el \
82 org-freemind.el \
83 org-gnus.el \
84 org-habit.el \
85 org-html.el \
86 org-icalendar.el \
87 org-id.el \
88 org-indent.el \
89 org-info.el \
90 org-inlinetask.el \
91 org-jsinfo.el \
92 org-irc.el \
93 org-latex.el \
94 org-list.el \
95 org-mac-message.el \
96 org-macs.el \
97 org-mew.el \
98 org-mhe.el \
99 org-mobile.el \
100 org-mouse.el \
101 org-publish.el \
102 org-plot.el \
103 org-protocol.el \
104 org-remember.el \
105 org-rmail.el \
106 org-src.el \
107 org-table.el \
108 org-timer.el \
109 org-vm.el \
110 org-w3m.el \
111 org-wl.el \
112 org-xoxo.el
114 LISPFILES0 = $(LISPF:%=lisp/%)
115 LISPFILES = $(LISPFILES0) lisp/org-install.el
116 ELCFILES0 = $(LISPFILES0:.el=.elc)
117 ELCFILES = $(LISPFILES:.el=.elc)
118 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
119 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
120 TEXIFILES = doc/org.texi
121 INFOFILES = doc/org
124 .SUFFIXES: .el .elc .texi
125 SHELL = /bin/sh
127 # Additional distribution files
128 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
129 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
131 default: $(ELCFILES)
133 all: $(ELCFILES) $(INFOFILES)
135 up2: update
136 sudo ${MAKE} install
138 update:
139 git pull
140 ${MAKE} clean
141 ${MAKE} all
143 compile: $(ELCFILES0)
145 install: install-lisp
147 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
150 ${MAKE} pdf && open doc/org.pdf
153 ${MAKE} card && gv doc/orgcard.ps
155 install-lisp: $(LISPFILES) $(ELCFILES)
156 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
157 $(CP) $(LISPFILES) $(lispdir)
158 $(CP) $(ELCFILES) $(lispdir)
160 install-info: $(INFOFILES)
161 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
162 $(CP) $(INFOFILES) $(infodir)
163 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
165 install-info-debian: $(INFOFILES)
166 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
168 install-noutline: xemacs/noutline.elc
169 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
170 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
172 autoloads: lisp/org-install.el
174 lisp/org-install.el: $(LISPFILES0) Makefile
175 $(BATCH) --eval "(require 'autoload)" \
176 --eval '(find-file "org-install.el")' \
177 --eval '(erase-buffer)' \
178 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
179 --eval '(insert "\n(provide (quote org-install))\n")' \
180 --eval '(save-buffer)'
181 mv org-install.el lisp
183 xemacs/noutline.elc: xemacs/noutline.el
185 doc/org: doc/org.texi
186 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
188 doc/org.pdf: doc/org.texi
189 (cd doc; $(TEXI2PDF) org.texi)
191 doc/org.html: doc/org.texi
192 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
193 UTILITIES/manfull.pl doc/org.html
195 doc/orgcard.dvi: doc/orgcard.tex
196 (cd doc; tex orgcard.tex)
198 doc/orgcard.pdf: doc/orgcard.dvi
199 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
201 doc/orgcard.ps: doc/orgcard.dvi
202 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
204 doc/orgcard_letter.dvi: doc/orgcard.tex
205 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
206 (cd doc; tex orgcard_letter.tex)
208 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
209 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
211 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
212 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
214 # Below here are special targets for maintenance only
216 updateweb:
217 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
219 html: doc/org.html
221 html_manual: doc/org.texi
222 rm -rf doc/manual
223 mkdir doc/manual
224 $(TEXI2HTML) -o doc/manual doc/org.texi
225 UTILITIES/mansplit.pl doc/manual/*.html
227 info: doc/org
229 pdf: doc/org.pdf
231 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
233 distfile:
234 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
235 touch doc/org.texi doc/orgcard.tex # force update
236 ${MAKE} cleancontrib
237 ${MAKE} info
238 ${MAKE} doc
239 ${MAKE} lisp/org-install.el
240 rm -rf org-$(TAG) org-$(TAG).zip
241 $(MKDIR) org-$(TAG)
242 $(MKDIR) org-$(TAG)/xemacs
243 $(MKDIR) org-$(TAG)/doc
244 $(MKDIR) org-$(TAG)/lisp
245 cp -r $(LISPFILES) org-$(TAG)/lisp
246 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
247 cp -r $(DISTFILES_extra) org-$(TAG)/
248 cp -r README_DIST org-$(TAG)/README
249 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
250 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
251 zip -r org-$(TAG).zip org-$(TAG)
252 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
254 release:
255 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
256 ${MAKE} distfile
257 ${MAKE} doc
258 UTILITIES/gplmanual.pl
259 ${MAKE} html_manual
260 rm -rf RELEASEDIR
261 $(MKDIR) RELEASEDIR
262 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
263 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
264 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
265 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
267 upload_release:
268 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
270 upload_manual:
271 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
273 relup0:
274 ${MAKE} release
275 ${MAKE} upload_release
277 relup:
278 ${MAKE} release
279 ${MAKE} upload_release
280 ${MAKE} upload_manual
283 grep -e '(debug)' lisp/*el
285 cleancontrib:
286 find contrib -name \*~ -exec rm {} \;
288 cleanelc:
289 rm -f $(ELCFILES)
290 cleandoc:
291 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
292 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
293 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
294 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
295 (cd doc; rm -rf manual)
297 cleanrel:
298 rm -rf RELEASEDIR
299 rm -rf org-6.*
300 rm -rf org-6*zip org-6*tar.gz
302 clean:
303 ${MAKE} cleanelc
304 ${MAKE} cleandoc
305 ${MAKE} cleanrel
306 rm -f *~ */*~ */*/*~
308 cleanall:
309 ${MAKE} clean
310 rm -f lisp/org-install.el
312 .el.elc:
313 $(ELC) $<
316 push:
317 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
319 pushtag:
320 git-tag -m "Adding tag" -a $(TAG)
321 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
323 pushreleasetag:
324 git-tag -m "Adding release tag" -a release_$(TAG)
325 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
327 dummy:
328 echo ${prefix}
330 # Dependencies
332 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
333 lisp/org-agenda.elc: lisp/org.el
334 lisp/org-ascii.elc: lisp/org-exp.el
335 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
336 lisp/org-archive.elc: lisp/org.el
337 lisp/org-bbdb.elc: lisp/org.el
338 lisp/org-beamer.elc: lisp/org.el
339 lisp/org-bibtex.elc: lisp/org.el
340 lisp/org-clock.elc: lisp/org.el
341 lisp/org-colview.elc: lisp/org.el
342 lisp/org-colview-xemacs.elc: lisp/org.el
343 lisp/org-compat.elc: lisp/org-macs.el
344 lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
345 lisp/org-ctags.elc: lisp/org.el
346 lisp/org-datetree.elc: lisp/org.el
347 lisp/org-docview.elc: lisp/org.el
348 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
349 lisp/org-exp-blocks.elc: lisp/org.el
350 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
351 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
352 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
353 lisp/org-feed.elc: lisp/org.el
354 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
355 lisp/org-freemind.elc: lisp/org.el
356 lisp/org-gnus.elc: lisp/org.el
357 lisp/org-html.elc: lisp/org-exp.el
358 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
359 lisp/org-icalendar.elc: lisp/org-exp.el
360 lisp/org-id.elc: lisp/org.el
361 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
362 lisp/org-info.elc: lisp/org.el
363 lisp/org-inlinetask.elc:
364 lisp/org-irc.elc: lisp/org.el
365 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
366 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
367 lisp/org-mac-message.elc: lisp/org.el
368 lisp/org-macs.elc:
369 lisp/org-mew.elc: lisp/org.el
370 lisp/org-mhe.elc: lisp/org.el
371 lisp/org-mobile.elc: lisp/org.el
372 lisp/org-mouse.elc: lisp/org.el
373 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
374 lisp/org-publish.elc:
375 lisp/org-protocol.elc: lisp/org.el
376 lisp/org-remember.elc: lisp/org.el
377 lisp/org-rmail.elc: lisp/org.el
378 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
379 lisp/org-table.elc: lisp/org.el
380 lisp/org-timer.elc: lisp/org.el
381 lisp/org-vm.elc: lisp/org.el
382 lisp/org-w3m.elc: lisp/org.el
383 lisp/org-wl.elc: lisp/org.el
384 lisp/org-xoxo.elc: lisp/org-exp.el