Export: Make sure all preprocessor functions see the whole buffer
[org-mode.git] / Makefile
blobdcde1ac7217f8734a683ab9a8d57ad51f1872874
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-ascii.el \
66 org-attach.el \
67 org-archive.el \
68 org-bbdb.el \
69 org-bibtex.el \
70 org-clock.el \
71 org-colview.el \
72 org-colview-xemacs.el \
73 org-compat.el \
74 org-exp.el \
75 org-export-latex.el \
76 org-docbook.el \
77 org-faces.el \
78 org-feed.el \
79 org-footnote.el \
80 org-gnus.el \
81 org-html.el \
82 org-icalendar.el \
83 org-id.el \
84 org-info.el \
85 org-inlinetask.el \
86 org-jsinfo.el \
87 org-irc.el \
88 org-list.el \
89 org-mac-message.el \
90 org-macs.el \
91 org-mew.el \
92 org-mhe.el \
93 org-mouse.el \
94 org-publish.el \
95 org-plot.el \
96 org-protocol.el \
97 org-remember.el \
98 org-rmail.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 compile: $(ELCFILES0)
129 install: install-lisp
131 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
134 make pdf && open doc/org.pdf
137 make card && gv doc/orgcard.ps
139 install-lisp: $(LISPFILES) $(ELCFILES)
140 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
141 $(CP) $(LISPFILES) $(lispdir)
142 $(CP) $(ELCFILES) $(lispdir)
144 install-info: $(INFOFILES)
145 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
146 $(CP) $(INFOFILES) $(infodir)
147 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
149 install-info-debian: $(INFOFILES)
150 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
152 install-noutline: xemacs/noutline.elc
153 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
154 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
156 autoloads: lisp/org-install.el
158 lisp/org-install.el: $(LISPFILES0) Makefile
159 $(BATCH) --eval "(require 'autoload)" \
160 --eval '(find-file "org-install.el")' \
161 --eval '(erase-buffer)' \
162 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
163 --eval '(insert "\n(provide (quote org-install))\n")' \
164 --eval '(save-buffer)'
165 mv org-install.el lisp
167 xemacs/noutline.elc: xemacs/noutline.el
169 doc/org: doc/org.texi
170 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
172 doc/org.pdf: doc/org.texi
173 (cd doc; $(TEXI2PDF) org.texi)
175 doc/org.html: doc/org.texi
176 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
177 UTILITIES/manfull.pl doc/org.html
179 doc/orgcard.dvi: doc/orgcard.tex
180 (cd doc; tex orgcard.tex)
182 doc/orgcard.pdf: doc/orgcard.dvi
183 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
185 doc/orgcard.ps: doc/orgcard.dvi
186 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
188 doc/orgcard_letter.dvi: doc/orgcard.tex
189 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
190 (cd doc; tex orgcard_letter.tex)
192 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
193 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
195 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
196 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
198 # Below here are special targets for maintenance only
200 updateweb:
201 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
203 html: doc/org.html
205 html_manual: doc/org.texi
206 rm -rf doc/manual
207 mkdir doc/manual
208 $(TEXI2HTML) -o doc/manual doc/org.texi
209 UTILITIES/mansplit.pl doc/manual/*.html
211 info: doc/org
213 pdf: doc/org.pdf
215 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
217 distfile:
218 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
219 touch doc/org.texi doc/orgcard.tex # force update
220 make cleancontrib
221 make info
222 make doc
223 make lisp/org-install.el
224 rm -rf org-$(TAG) org-$(TAG).zip
225 $(MKDIR) org-$(TAG)
226 $(MKDIR) org-$(TAG)/xemacs
227 $(MKDIR) org-$(TAG)/doc
228 $(MKDIR) org-$(TAG)/lisp
229 cp -r $(LISPFILES) org-$(TAG)/lisp
230 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
231 cp -r $(DISTFILES_extra) org-$(TAG)/
232 cp -r README_DIST org-$(TAG)/README
233 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
234 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
235 zip -r org-$(TAG).zip org-$(TAG)
236 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
238 release:
239 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
240 make distfile
241 make doc
242 UTILITIES/gplmanual.pl
243 make html_manual
244 rm -rf RELEASEDIR
245 $(MKDIR) RELEASEDIR
246 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
247 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
248 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
249 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
251 upload_release:
252 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
254 upload_manual:
255 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
257 snap:
258 make release TAG=snapshot
259 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
260 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
261 make cleanrel
263 relup0:
264 make release
265 make upload_release
267 relup:
268 make release
269 make upload_release
270 make upload_manual
273 grep -e '(debug)' lisp/*el
275 cleancontrib:
276 find contrib -name \*~ -exec rm {} \;
278 cleanelc:
279 rm -f $(ELCFILES)
280 cleandoc:
281 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
282 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
283 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
284 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
285 (cd doc; rm -rf manual)
287 cleanrel:
288 rm -rf RELEASEDIR
289 rm -rf org-6.*
290 rm -rf org-6*zip org-6*tar.gz org-snapshot*
292 clean:
293 make cleanelc
294 make cleandoc
295 make cleanrel
296 rm -f *~ */*~ */*/*~
298 cleanall:
299 make clean
300 rm -f lisp/org-install.el
302 .el.elc:
303 $(ELC) $<
306 push:
307 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
309 pushtag:
310 git-tag -m "Adding tag" -a $(TAG)
311 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
313 pushreleasetag:
314 git-tag -m "Adding release tag" -a release_$(TAG)
315 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
317 dummy:
318 echo ${prefix}
320 # Dependencies
322 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
323 lisp/org-agenda.elc: lisp/org.el
324 lisp/org-ascii.elc: lisp/org-exp.el
325 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
326 lisp/org-archive.elc: lisp/org.el
327 lisp/org-bbdb.elc: lisp/org.el
328 lisp/org-bibtex.elc: lisp/org.el
329 lisp/org-clock.elc: lisp/org.el
330 lisp/org-colview.elc: lisp/org.el
331 lisp/org-colview-xemacs.elc: lisp/org.el
332 lisp/org-compat.elc: lisp/org-macs.el
333 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
334 lisp/org-export-latex.elc: lisp/org.el lisp/org-exp.el
335 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
336 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
337 lisp/org-feed.elc: lisp/org.el
338 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
339 lisp/org-gnus.elc: lisp/org.el
340 lisp/org-html.elc: lisp/org-exp.el
341 lisp/org-icalendar.elc: lisp/org-exp.el
342 lisp/org-id.elc: lisp/org.el
343 lisp/org-info.elc: lisp/org.el
344 lisp/org-inlinetask.elc:
345 lisp/org-irc.elc: lisp/org.el
346 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
347 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
348 lisp/org-mac-message.elc: lisp/org.el
349 lisp/org-macs.elc:
350 lisp/org-mew.elc: lisp/org.el
351 lisp/org-mhe.elc: lisp/org.el
352 lisp/org-mouse.elc: lisp/org.el
353 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
354 lisp/org-publish.elc:
355 lisp/org-protocol.elc: lisp/org.el
356 lisp/org-remember.elc: lisp/org.el
357 lisp/org-rmail.elc: lisp/org.el
358 lisp/org-table.elc: lisp/org.el
359 lisp/org-timer.elc: lisp/org.el
360 lisp/org-vm.elc: lisp/org.el
361 lisp/org-w3m.elc: lisp/org.el
362 lisp/org-wl.elc: lisp/org.el
363 lisp/org-xoxo.elc: lisp/org-exp.el