Declare some functions
[org-mode.git] / Makefile
blobb5f271cb5a422a1b586de90ced72a551d237d972
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) (expand-file-name \"./lisp/\")) \
33 (add-to-list (quote load-path) \"$(lispdir)\"))"
35 # Specify the byte-compiler for compiling org-mode files
36 ELC= $(BATCH) -f batch-byte-compile
38 # How to make a pdf file from a texinfo file
39 TEXI2PDF = texi2pdf
41 # How to create directories
42 MKDIR = mkdir -p
44 # How to create the info files from the texinfo file
45 MAKEINFO = makeinfo
47 # How to create the HTML file
48 TEXI2HTML = makeinfo --html --number-sections
50 # How to copy the lisp files and elc files to their distination.
51 CP = cp -p
53 # Name of the program to install info files
54 INSTALL_INFO=install-info
56 ##----------------------------------------------------------------------
57 ## BELOW THIS LINE ON YOUR OWN RISK!
58 ##----------------------------------------------------------------------
60 # The following variables need to be defined by the maintainer
61 LISPF = org.el \
62 org-agenda.el \
63 org-ascii.el \
64 org-attach.el \
65 org-archive.el \
66 org-bbdb.el \
67 org-bibtex.el \
68 org-clock.el \
69 org-colview.el \
70 org-colview-xemacs.el \
71 org-compat.el \
72 org-exp.el \
73 org-docbook.el \
74 org-faces.el \
75 org-feed.el \
76 org-footnote.el \
77 org-gnus.el \
78 org-html.el \
79 org-icalendar.el \
80 org-id.el \
81 org-info.el \
82 org-inlinetask.el \
83 org-jsinfo.el \
84 org-irc.el \
85 org-latex.el \
86 org-list.el \
87 org-mac-message.el \
88 org-macs.el \
89 org-mew.el \
90 org-mhe.el \
91 org-mouse.el \
92 org-publish.el \
93 org-plot.el \
94 org-protocol.el \
95 org-remember.el \
96 org-rmail.el \
97 org-table.el \
98 org-timer.el \
99 org-vm.el \
100 org-w3m.el \
101 org-wl.el \
102 org-xoxo.el
104 LISPFILES0 = $(LISPF:%=lisp/%)
105 LISPFILES = $(LISPFILES0) lisp/org-install.el
106 ELCFILES0 = $(LISPFILES0:.el=.elc)
107 ELCFILES = $(LISPFILES:.el=.elc)
108 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
109 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
110 TEXIFILES = doc/org.texi
111 INFOFILES = doc/org
114 .SUFFIXES: .el .elc .texi
115 SHELL = /bin/sh
117 # Additional distribution files
118 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
119 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
121 default: $(ELCFILES)
123 all: $(ELCFILES) $(INFOFILES)
125 compile: $(ELCFILES0)
127 install: install-lisp
129 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
132 make pdf && open doc/org.pdf
135 make card && gv doc/orgcard.ps
137 install-lisp: $(LISPFILES) $(ELCFILES)
138 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
139 $(CP) $(LISPFILES) $(lispdir)
140 $(CP) $(ELCFILES) $(lispdir)
142 install-info: $(INFOFILES)
143 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
144 $(CP) $(INFOFILES) $(infodir)
145 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
147 install-info-debian: $(INFOFILES)
148 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
150 install-noutline: xemacs/noutline.elc
151 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
152 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
154 autoloads: lisp/org-install.el
156 lisp/org-install.el: $(LISPFILES0) Makefile
157 $(BATCH) --eval "(require 'autoload)" \
158 --eval '(find-file "org-install.el")' \
159 --eval '(erase-buffer)' \
160 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
161 --eval '(insert "\n(provide (quote org-install))\n")' \
162 --eval '(save-buffer)'
163 mv org-install.el lisp
165 xemacs/noutline.elc: xemacs/noutline.el
167 doc/org: doc/org.texi
168 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
170 doc/org.pdf: doc/org.texi
171 (cd doc; $(TEXI2PDF) org.texi)
173 doc/org.html: doc/org.texi
174 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
175 UTILITIES/manfull.pl doc/org.html
177 doc/orgcard.dvi: doc/orgcard.tex
178 (cd doc; tex orgcard.tex)
180 doc/orgcard.pdf: doc/orgcard.dvi
181 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
183 doc/orgcard.ps: doc/orgcard.dvi
184 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
186 doc/orgcard_letter.dvi: doc/orgcard.tex
187 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
188 (cd doc; tex orgcard_letter.tex)
190 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
191 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
193 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
194 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
196 # Below here are special targets for maintenance only
198 updateweb:
199 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
201 html: doc/org.html
203 html_manual: doc/org.texi
204 rm -rf doc/manual
205 mkdir doc/manual
206 $(TEXI2HTML) -o doc/manual doc/org.texi
207 UTILITIES/mansplit.pl doc/manual/*.html
209 info: doc/org
211 pdf: doc/org.pdf
213 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
215 distfile:
216 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
217 touch doc/org.texi doc/orgcard.tex # force update
218 make cleancontrib
219 make info
220 make doc
221 make lisp/org-install.el
222 rm -rf org-$(TAG) org-$(TAG).zip
223 $(MKDIR) org-$(TAG)
224 $(MKDIR) org-$(TAG)/xemacs
225 $(MKDIR) org-$(TAG)/doc
226 $(MKDIR) org-$(TAG)/lisp
227 cp -r $(LISPFILES) org-$(TAG)/lisp
228 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
229 cp -r $(DISTFILES_extra) org-$(TAG)/
230 cp -r README_DIST org-$(TAG)/README
231 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
232 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
233 zip -r org-$(TAG).zip org-$(TAG)
234 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
236 release:
237 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
238 make distfile
239 make doc
240 UTILITIES/gplmanual.pl
241 make html_manual
242 rm -rf RELEASEDIR
243 $(MKDIR) RELEASEDIR
244 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
245 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
246 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
247 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
249 upload_release:
250 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
252 upload_manual:
253 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
255 snap:
256 make release TAG=snapshot
257 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
258 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
259 make cleanrel
261 relup0:
262 make release
263 make upload_release
265 relup:
266 make release
267 make upload_release
268 make upload_manual
271 grep -e '(debug)' lisp/*el
273 cleancontrib:
274 find contrib -name \*~ -exec rm {} \;
276 cleanelc:
277 rm -f $(ELCFILES)
278 cleandoc:
279 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
280 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
281 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
282 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
283 (cd doc; rm -rf manual)
285 cleanrel:
286 rm -rf RELEASEDIR
287 rm -rf org-6.*
288 rm -rf org-6*zip org-6*tar.gz org-snapshot*
290 clean:
291 make cleanelc
292 make cleandoc
293 make cleanrel
294 rm -f *~ */*~ */*/*~
296 cleanall:
297 make clean
298 rm -f lisp/org-install.el
300 .el.elc:
301 $(ELC) $<
304 push:
305 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
307 pushtag:
308 git-tag -m "Adding tag" -a $(TAG)
309 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
311 pushreleasetag:
312 git-tag -m "Adding release tag" -a release_$(TAG)
313 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
315 dummy:
316 echo ${prefix}
318 # Dependencies
320 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
321 lisp/org-agenda.elc: lisp/org.el
322 lisp/org-ascii.elc: lisp/org-exp.el
323 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
324 lisp/org-archive.elc: lisp/org.el
325 lisp/org-bbdb.elc: lisp/org.el
326 lisp/org-bibtex.elc: lisp/org.el
327 lisp/org-clock.elc: lisp/org.el
328 lisp/org-colview.elc: lisp/org.el
329 lisp/org-colview-xemacs.elc: lisp/org.el
330 lisp/org-compat.elc: lisp/org-macs.el
331 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
332 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el
333 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
334 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
335 lisp/org-feed.elc: lisp/org.el
336 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
337 lisp/org-gnus.elc: lisp/org.el
338 lisp/org-html.elc: lisp/org-exp.el
339 lisp/org-icalendar.elc: lisp/org-exp.el
340 lisp/org-id.elc: lisp/org.el
341 lisp/org-info.elc: lisp/org.el
342 lisp/org-inlinetask.elc:
343 lisp/org-irc.elc: lisp/org.el
344 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
345 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
346 lisp/org-mac-message.elc: lisp/org.el
347 lisp/org-macs.elc:
348 lisp/org-mew.elc: lisp/org.el
349 lisp/org-mhe.elc: lisp/org.el
350 lisp/org-mouse.elc: lisp/org.el
351 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
352 lisp/org-publish.elc:
353 lisp/org-protocol.elc: lisp/org.el
354 lisp/org-remember.elc: lisp/org.el
355 lisp/org-rmail.elc: lisp/org.el
356 lisp/org-table.elc: lisp/org.el
357 lisp/org-timer.elc: lisp/org.el
358 lisp/org-vm.elc: lisp/org.el
359 lisp/org-w3m.elc: lisp/org.el
360 lisp/org-wl.elc: lisp/org.el
361 lisp/org-xoxo.elc: lisp/org-exp.el