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