intermediate
[org-mode.git] / Makefile
blob41fa61d0c490f5d290acdc0d49300e92be960738
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-jsinfo.el \
82 org-irc.el \
83 org-list.el \
84 org-mac-message.el \
85 org-macs.el \
86 org-mew.el \
87 org-mhe.el \
88 org-mouse.el \
89 org-publish.el \
90 org-plot.el \
91 org-remember.el \
92 org-rmail.el \
93 org-table.el \
94 org-timer.el \
95 org-vm.el \
96 org-w3m.el \
97 org-wl.el
99 LISPFILES0 = $(LISPF:%=lisp/%)
100 LISPFILES = $(LISPFILES0) lisp/org-install.el
101 ELCFILES0 = $(LISPFILES0:.el=.elc)
102 ELCFILES = $(LISPFILES:.el=.elc)
103 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
104 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
105 TEXIFILES = doc/org.texi
106 INFOFILES = doc/org
109 .SUFFIXES: .el .elc .texi
110 SHELL = /bin/sh
112 # Additional distribution files
113 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
114 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
116 default: $(ELCFILES)
118 all: $(ELCFILES) $(INFOFILES)
120 compile: $(ELCFILES0)
122 install: install-lisp
124 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
127 make pdf && open doc/org.pdf
130 make card && gv doc/orgcard.ps
132 install-lisp: $(LISPFILES) $(ELCFILES)
133 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
134 $(CP) $(LISPFILES) $(lispdir)
135 $(CP) $(ELCFILES) $(lispdir)
137 install-info: $(INFOFILES)
138 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
139 $(CP) $(INFOFILES) $(infodir)
140 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
142 install-info-debian: $(INFOFILES)
143 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
145 install-noutline: xemacs/noutline.elc
146 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
147 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
149 autoloads: lisp/org-install.el
151 lisp/org-install.el: $(LISPFILES0) Makefile
152 $(BATCH) --eval "(require 'autoload)" \
153 --eval '(find-file "org-install.el")' \
154 --eval '(erase-buffer)' \
155 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
156 --eval '(insert "\n(provide (quote org-install))\n")' \
157 --eval '(save-buffer)'
158 mv org-install.el lisp
160 xemacs/noutline.elc: xemacs/noutline.el
162 doc/org: doc/org.texi
163 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
165 doc/org.pdf: doc/org.texi
166 (cd doc; $(TEXI2PDF) org.texi)
168 doc/org.html: doc/org.texi
169 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
170 UTILITIES/manfull.pl doc/org.html
172 doc/orgcard.dvi: doc/orgcard.tex
173 (cd doc; tex orgcard.tex)
175 doc/orgcard.pdf: doc/orgcard.dvi
176 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
178 doc/orgcard.ps: doc/orgcard.dvi
179 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
181 doc/orgcard_letter.dvi: doc/orgcard.tex
182 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
183 (cd doc; tex orgcard_letter.tex)
185 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
186 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
188 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
189 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
191 # Below here are special targets for maintenance only
193 updateweb:
194 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
196 html: doc/org.html
198 html_manual: doc/org.texi
199 rm -rf doc/manual
200 mkdir doc/manual
201 $(TEXI2HTML) -o doc/manual doc/org.texi
202 UTILITIES/mansplit.pl doc/manual/*.html
204 info: doc/org
206 pdf: doc/org.pdf
208 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
210 distfile:
211 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
212 touch doc/org.texi doc/orgcard.tex # force update
213 make cleancontrib
214 make info
215 make doc
216 make lisp/org-install.el
217 rm -rf org-$(TAG) org-$(TAG).zip
218 $(MKDIR) org-$(TAG)
219 $(MKDIR) org-$(TAG)/xemacs
220 $(MKDIR) org-$(TAG)/doc
221 $(MKDIR) org-$(TAG)/lisp
222 cp -r $(LISPFILES) org-$(TAG)/lisp
223 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
224 cp -r $(DISTFILES_extra) org-$(TAG)/
225 cp -r README_DIST org-$(TAG)/README
226 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
227 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
228 zip -r org-$(TAG).zip org-$(TAG)
229 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
231 release:
232 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
233 make distfile
234 make doc
235 UTILITIES/gplmanual.pl
236 make html_manual
237 rm -rf RELEASEDIR
238 $(MKDIR) RELEASEDIR
239 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
240 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
241 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
242 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
244 upload_release:
245 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
247 upload_manual:
248 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
250 snap:
251 make release TAG=snapshot
252 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
253 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
254 make cleanrel
256 relup0:
257 make release
258 make upload_release
260 relup:
261 make release
262 make upload_release
263 make upload_manual
266 grep -e '(debug)' lisp/*el
268 cleancontrib:
269 find contrib -name \*~ -exec rm {} \;
271 cleanelc:
272 rm -f $(ELCFILES)
273 cleandoc:
274 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
275 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
276 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
277 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
278 (cd doc; rm -rf manual)
280 cleanrel:
281 rm -rf RELEASEDIR
282 rm -rf org-6.*
283 rm -rf org-6*zip org-6*tar.gz org-snapshot*
285 clean:
286 make cleanelc
287 make cleandoc
288 make cleanrel
289 rm -f *~ */*~ */*/*~
291 cleanall:
292 make clean
293 rm -f lisp/org-install.el
295 .el.elc:
296 $(ELC) $<
299 push:
300 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
302 pushtag:
303 git-tag -m "Adding tag" -a $(TAG)
304 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
306 pushreleasetag:
307 git-tag -m "Adding release tag" -a release_$(TAG)
308 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
310 dummy:
311 echo ${prefix}
313 # Dependencies
315 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
316 lisp/org-agenda.elc: lisp/org.el
317 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
318 lisp/org-archive.elc: lisp/org.el
319 lisp/org-bbdb.elc: lisp/org.el
320 lisp/org-bibtex.elc: lisp/org.el
321 lisp/org-clock.elc: lisp/org.el
322 lisp/org-colview.elc: lisp/org.el
323 lisp/org-colview-xemacs.elc: lisp/org.el
324 lisp/org-compat.elc: lisp/org-macs.el
325 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
326 lisp/org-export-latex.elc: lisp/org.el lisp/org-exp.el
327 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
328 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
329 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
330 lisp/org-gnus.elc: lisp/org.el
331 lisp/org-id.elc: lisp/org.el
332 lisp/org-info.elc: lisp/org.el
333 lisp/org-irc.elc: lisp/org.el
334 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
335 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
336 lisp/org-mac-message.elc: lisp/org.el
337 lisp/org-macs.elc:
338 lisp/org-mew.elc: lisp/org.el
339 lisp/org-mhe.elc: lisp/org.el
340 lisp/org-mouse.elc: lisp/org.el
341 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
342 lisp/org-publish.elc:
343 lisp/org-remember.elc: lisp/org.el
344 lisp/org-rmail.elc: lisp/org.el
345 lisp/org-table.elc: lisp/org.el
346 lisp/org-timer.elc: lisp/org.el
347 lisp/org-vm.elc: lisp/org.el
348 lisp/org-w3m.elc: lisp/org.el
349 lisp/org-wl.elc: lisp/org.el