Release 6.28
[org-mode.git] / Makefile
blob6971f9e41c4143d393e55705b69173e2ab9bdb87
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)\") \
33 (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
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-exp-blocks.el \
74 org-docbook.el \
75 org-faces.el \
76 org-feed.el \
77 org-footnote.el \
78 org-gnus.el \
79 org-html.el \
80 org-icalendar.el \
81 org-id.el \
82 org-info.el \
83 org-inlinetask.el \
84 org-jsinfo.el \
85 org-irc.el \
86 org-latex.el \
87 org-list.el \
88 org-mac-message.el \
89 org-macs.el \
90 org-mew.el \
91 org-mhe.el \
92 org-mouse.el \
93 org-publish.el \
94 org-plot.el \
95 org-protocol.el \
96 org-remember.el \
97 org-rmail.el \
98 org-src.el \
99 org-table.el \
100 org-timer.el \
101 org-vm.el \
102 org-w3m.el \
103 org-wl.el \
104 org-xoxo.el
106 LISPFILES0 = $(LISPF:%=lisp/%)
107 LISPFILES = $(LISPFILES0) lisp/org-install.el
108 ELCFILES0 = $(LISPFILES0:.el=.elc)
109 ELCFILES = $(LISPFILES:.el=.elc)
110 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
111 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
112 TEXIFILES = doc/org.texi
113 INFOFILES = doc/org
116 .SUFFIXES: .el .elc .texi
117 SHELL = /bin/sh
119 # Additional distribution files
120 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
121 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
123 default: $(ELCFILES)
125 all: $(ELCFILES) $(INFOFILES)
127 up2: update
128 sudo ${MAKE} install
130 update:
131 git pull
132 ${MAKE} clean
133 ${MAKE} all
135 compile: $(ELCFILES0)
137 install: install-lisp
139 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
142 ${MAKE} pdf && open doc/org.pdf
145 ${MAKE} card && gv doc/orgcard.ps
147 install-lisp: $(LISPFILES) $(ELCFILES)
148 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
149 $(CP) $(LISPFILES) $(lispdir)
150 $(CP) $(ELCFILES) $(lispdir)
152 install-info: $(INFOFILES)
153 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
154 $(CP) $(INFOFILES) $(infodir)
155 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
157 install-info-debian: $(INFOFILES)
158 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
160 install-noutline: xemacs/noutline.elc
161 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
162 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
164 autoloads: lisp/org-install.el
166 lisp/org-install.el: $(LISPFILES0) Makefile
167 $(BATCH) --eval "(require 'autoload)" \
168 --eval '(find-file "org-install.el")' \
169 --eval '(erase-buffer)' \
170 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
171 --eval '(insert "\n(provide (quote org-install))\n")' \
172 --eval '(save-buffer)'
173 mv org-install.el lisp
175 xemacs/noutline.elc: xemacs/noutline.el
177 doc/org: doc/org.texi
178 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
180 doc/org.pdf: doc/org.texi
181 (cd doc; $(TEXI2PDF) org.texi)
183 doc/org.html: doc/org.texi
184 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
185 UTILITIES/manfull.pl doc/org.html
187 doc/orgcard.dvi: doc/orgcard.tex
188 (cd doc; tex orgcard.tex)
190 doc/orgcard.pdf: doc/orgcard.dvi
191 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
193 doc/orgcard.ps: doc/orgcard.dvi
194 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
196 doc/orgcard_letter.dvi: doc/orgcard.tex
197 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
198 (cd doc; tex orgcard_letter.tex)
200 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
201 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
203 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
204 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
206 # Below here are special targets for maintenance only
208 updateweb:
209 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
211 html: doc/org.html
213 html_manual: doc/org.texi
214 rm -rf doc/manual
215 mkdir doc/manual
216 $(TEXI2HTML) -o doc/manual doc/org.texi
217 UTILITIES/mansplit.pl doc/manual/*.html
219 info: doc/org
221 pdf: doc/org.pdf
223 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
225 distfile:
226 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
227 touch doc/org.texi doc/orgcard.tex # force update
228 ${MAKE} cleancontrib
229 ${MAKE} info
230 ${MAKE} doc
231 ${MAKE} lisp/org-install.el
232 rm -rf org-$(TAG) org-$(TAG).zip
233 $(MKDIR) org-$(TAG)
234 $(MKDIR) org-$(TAG)/xemacs
235 $(MKDIR) org-$(TAG)/doc
236 $(MKDIR) org-$(TAG)/lisp
237 cp -r $(LISPFILES) org-$(TAG)/lisp
238 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
239 cp -r $(DISTFILES_extra) org-$(TAG)/
240 cp -r README_DIST org-$(TAG)/README
241 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
242 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
243 zip -r org-$(TAG).zip org-$(TAG)
244 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
246 release:
247 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
248 ${MAKE} distfile
249 ${MAKE} doc
250 UTILITIES/gplmanual.pl
251 ${MAKE} html_manual
252 rm -rf RELEASEDIR
253 $(MKDIR) RELEASEDIR
254 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
255 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
256 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
257 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
259 upload_release:
260 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
262 upload_manual:
263 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
265 snap:
266 ${MAKE} release TAG=snapshot
267 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
268 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
269 ${MAKE} cleanrel
271 relup0:
272 ${MAKE} release
273 ${MAKE} upload_release
275 relup:
276 ${MAKE} release
277 ${MAKE} upload_release
278 ${MAKE} upload_manual
281 grep -e '(debug)' lisp/*el
283 cleancontrib:
284 find contrib -name \*~ -exec rm {} \;
286 cleanelc:
287 rm -f $(ELCFILES)
288 cleandoc:
289 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
290 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
291 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
292 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
293 (cd doc; rm -rf manual)
295 cleanrel:
296 rm -rf RELEASEDIR
297 rm -rf org-6.*
298 rm -rf org-6*zip org-6*tar.gz org-snapshot*
300 clean:
301 ${MAKE} cleanelc
302 ${MAKE} cleandoc
303 ${MAKE} cleanrel
304 rm -f *~ */*~ */*/*~
306 cleanall:
307 ${MAKE} clean
308 rm -f lisp/org-install.el
310 .el.elc:
311 $(ELC) $<
314 push:
315 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
317 pushtag:
318 git-tag -m "Adding tag" -a $(TAG)
319 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
321 pushreleasetag:
322 git-tag -m "Adding release tag" -a release_$(TAG)
323 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
325 dummy:
326 echo ${prefix}
328 # Dependencies
330 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
331 lisp/org-agenda.elc: lisp/org.el
332 lisp/org-ascii.elc: lisp/org-exp.el
333 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
334 lisp/org-archive.elc: lisp/org.el
335 lisp/org-bbdb.elc: lisp/org.el
336 lisp/org-bibtex.elc: lisp/org.el
337 lisp/org-clock.elc: lisp/org.el
338 lisp/org-colview.elc: lisp/org.el
339 lisp/org-colview-xemacs.elc: lisp/org.el
340 lisp/org-compat.elc: lisp/org-macs.el
341 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
342 lisp/org-exp-blocks.elc: lisp/org.el
343 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el
344 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
345 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
346 lisp/org-feed.elc: lisp/org.el
347 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
348 lisp/org-gnus.elc: lisp/org.el
349 lisp/org-html.elc: lisp/org-exp.el
350 lisp/org-icalendar.elc: lisp/org-exp.el
351 lisp/org-id.elc: lisp/org.el
352 lisp/org-info.elc: lisp/org.el
353 lisp/org-inlinetask.elc:
354 lisp/org-irc.elc: lisp/org.el
355 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
356 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
357 lisp/org-mac-message.elc: lisp/org.el
358 lisp/org-macs.elc:
359 lisp/org-mew.elc: lisp/org.el
360 lisp/org-mhe.elc: lisp/org.el
361 lisp/org-mouse.elc: lisp/org.el
362 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
363 lisp/org-publish.elc:
364 lisp/org-protocol.elc: lisp/org.el
365 lisp/org-remember.elc: lisp/org.el
366 lisp/org-rmail.elc: lisp/org.el
367 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
368 lisp/org-table.elc: lisp/org.el
369 lisp/org-timer.elc: lisp/org.el
370 lisp/org-vm.elc: lisp/org.el
371 lisp/org-w3m.elc: lisp/org.el
372 lisp/org-wl.elc: lisp/org.el
373 lisp/org-xoxo.elc: lisp/org-exp.el