When moving items, keep the column position.
[org-mode.git] / Makefile
blob778e55e053a816d32f5fdabf3b6fecfc21db448e
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)/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-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-export-latex.el \
74 org-faces.el \
75 org-gnus.el \
76 org-id.el \
77 org-info.el \
78 org-jsinfo.el \
79 org-irc.el \
80 org-list.el \
81 org-mac-message.el \
82 org-macs.el \
83 org-mew.el \
84 org-mhe.el \
85 org-mouse.el \
86 org-publish.el \
87 org-plot.el \
88 org-remember.el \
89 org-rmail.el \
90 org-table.el \
91 org-vm.el \
92 org-wl.el
94 LISPFILES0 = $(LISPF:%=lisp/%)
95 LISPFILES = $(LISPFILES0) lisp/org-install.el
96 ELCFILES0 = $(LISPFILES0:.el=.elc)
97 ELCFILES = $(LISPFILES:.el=.elc)
98 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir
99 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
100 TEXIFILES = doc/org.texi
101 INFOFILES = doc/org
104 .SUFFIXES: .el .elc .texi
105 SHELL = /bin/sh
107 # Additional distribution files
108 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
109 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
111 default: $(ELCFILES)
113 all: $(ELCFILES) $(INFOFILES)
115 compile: $(ELCFILES0)
117 install: install-lisp
119 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
122 make pdf && open doc/org.pdf
125 make card && gv doc/orgcard.ps
127 install-lisp: $(LISPFILES) $(ELCFILES)
128 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
129 $(CP) $(LISPFILES) $(lispdir)
130 $(CP) $(ELCFILES) $(lispdir)
132 install-info: $(INFOFILES)
133 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
135 install-noutline: xemacs/noutline.elc
136 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
137 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
139 autoloads: lisp/org-install.el
141 lisp/org-install.el: $(LISPFILES0) Makefile
142 $(BATCH) --eval "(require 'autoload)" \
143 --eval '(find-file "org-install.el")' \
144 --eval '(erase-buffer)' \
145 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
146 --eval '(insert "\n(provide (quote org-install))\n")' \
147 --eval '(save-buffer)'
148 mv org-install.el lisp
150 xemacs/noutline.elc: xemacs/noutline.el
152 doc/org: doc/org.texi
153 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
155 doc/org.pdf: doc/org.texi
156 (cd doc; $(TEXI2PDF) org.texi)
158 doc/org.html: doc/org.texi
159 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
161 doc/orgcard.dvi: doc/orgcard.tex
162 (cd doc; tex orgcard.tex)
164 doc/orgcard.pdf: doc/orgcard.dvi
165 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
167 doc/orgcard.ps: doc/orgcard.dvi
168 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
170 doc/orgcard_letter.dvi: doc/orgcard.tex
171 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
172 (cd doc; tex orgcard_letter.tex)
174 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
175 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
177 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
178 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
180 # Below here are special targets for maintenance only
182 updateweb:
183 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
185 html: doc/org.html
187 html_manual: doc/org.texi
188 rm -rf doc/manual
189 mkdir doc/manual
190 $(TEXI2HTML) -o doc/manual doc/org.texi
192 info: doc/org
194 pdf: doc/org.pdf
196 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
198 distfile:
199 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
200 touch doc/org.texi doc/orgcard.tex # force update
201 make cleancontrib
202 make info
203 make doc
204 make lisp/org-install.el
205 rm -rf org-$(TAG) org-$(TAG).zip
206 $(MKDIR) org-$(TAG)
207 $(MKDIR) org-$(TAG)/xemacs
208 $(MKDIR) org-$(TAG)/doc
209 $(MKDIR) org-$(TAG)/lisp
210 cp -r $(LISPFILES) org-$(TAG)/lisp
211 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
212 cp -r $(DISTFILES_extra) org-$(TAG)/
213 cp -r README_DIST org-$(TAG)/README
214 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
215 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
216 zip -r org-$(TAG).zip org-$(TAG)
217 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
219 release:
220 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
221 make distfile
222 make doc
223 UTILITIES/gplmanual.pl
224 make html_manual
225 rm -rf RELEASEDIR
226 $(MKDIR) RELEASEDIR
227 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
228 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
229 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
230 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
232 upload_release:
233 (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
235 upload_manual:
236 lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
238 relup0:
239 make release
240 make upload_release
242 relup:
243 make release
244 make upload_release
245 make upload_manual
248 grep -e '(debug)' lisp/*el
250 cleancontrib:
251 find contrib -name \*~ -exec rm {} \;
253 cleanelc:
254 rm -f $(ELCFILES)
255 cleandoc:
256 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
257 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
258 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
259 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
260 (cd doc; rm -rf manual)
261 clean:
262 make cleanelc
263 make cleandoc
264 rm -f *~ */*~ */*/*~
265 rm -rf RELEASEDIR
266 rm -f lisp/org-install.el
268 .el.elc:
269 $(ELC) $<
272 push:
273 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
275 pushtag:
276 git-tag -m "Adding tag" -a $(TAG)
277 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
279 pushreleasetag:
280 git-tag -m "Adding release tag" -a release_$(TAG)
281 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
283 dummy:
284 echo ${prefix}
286 # Dependencies
288 lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc
289 lisp/org-agenda.elc: lisp/org.elc
290 lisp/org-archive.elc: lisp/org.elc
291 lisp/org-bbdb.elc: lisp/org.elc
292 lisp/org-bibtex.elc: lisp/org.elc
293 lisp/org-clock.elc: lisp/org.elc
294 lisp/org-colview.elc: lisp/org.elc
295 lisp/org-colview-xemacs.elc: lisp/org.elc
296 lisp/org-compat.elc: lisp/org-macs.elc
297 lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc
298 lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc
299 lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc
300 lisp/org-gnus.elc: lisp/org.elc
301 lisp/org-id.elc: lisp/org.elc
302 lisp/org-info.elc: lisp/org.elc
303 lisp/org-irc.elc: lisp/org.elc
304 lisp/org-jsinfo.elc: lisp/org.elc lisp/org-exp.elc
305 lisp/org-list.elc: lisp/org-macs.elc lisp/org-compat.elc
306 lisp/org-mac-message.elc: lisp/org.elc
307 lisp/org-macs.elc:
308 lisp/org-mew.elc: lisp/org.elc
309 lisp/org-mhe.elc: lisp/org.elc
310 lisp/org-mouse.elc: lisp/org.elc
311 lisp/org-plot.elc: lisp/org.elc lisp/org-exp.elc lisp/org-table.elc
312 lisp/org-publish.elc:
313 lisp/org-remember.elc: lisp/org.elc
314 lisp/org-rmail.elc: lisp/org.elc
315 lisp/org-table.elc: lisp/org.elc
316 lisp/org-vm.elc: lisp/org.elc
317 lisp/org-wl.elc: lisp/org.elc