Preserving line breaks for export no longer works
[org-mode.git] / Makefile
blob6f5f579443d9fec49b5961c750e7ef2f283bd3fa
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)\") (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
34 # Specify the byte-compiler for compiling org-mode files
35 ELC= $(BATCH) -f batch-byte-compile
37 # How to make a pdf file from a texinfo file
38 TEXI2PDF = texi2pdf
40 # How to create directories
41 MKDIR = mkdir -p
43 # How to create the info files from the texinfo file
44 MAKEINFO = makeinfo
46 # How to create the HTML file
47 TEXI2HTML = makeinfo --html --number-sections
49 # How to copy the lisp files and elc files to their distination.
50 CP = cp -p
52 # Name of the program to install info files
53 INSTALL_INFO=install-info
55 ##----------------------------------------------------------------------
56 ## BELOW THIS LINE ON YOUR OWN RISK!
57 ##----------------------------------------------------------------------
59 # The following variables need to be defined by the maintainer
60 LISPF = org.el \
61 org-agenda.el \
62 org-ascii.el \
63 org-attach.el \
64 org-archive.el \
65 org-bbdb.el \
66 org-bibtex.el \
67 org-clock.el \
68 org-colview.el \
69 org-colview-xemacs.el \
70 org-compat.el \
71 org-crypt.el \
72 org-datetree.el \
73 org-docview.el \
74 org-exp.el \
75 org-exp-blocks.el \
76 org-docbook.el \
77 org-faces.el \
78 org-feed.el \
79 org-footnote.el \
80 org-freemind.el \
81 org-gnus.el \
82 org-habit.el \
83 org-html.el \
84 org-icalendar.el \
85 org-id.el \
86 org-indent.el \
87 org-info.el \
88 org-inlinetask.el \
89 org-jsinfo.el \
90 org-irc.el \
91 org-latex.el \
92 org-list.el \
93 org-mac-message.el \
94 org-macs.el \
95 org-mew.el \
96 org-mhe.el \
97 org-mobile.el \
98 org-mouse.el \
99 org-publish.el \
100 org-plot.el \
101 org-protocol.el \
102 org-remember.el \
103 org-rmail.el \
104 org-src.el \
105 org-table.el \
106 org-timer.el \
107 org-vm.el \
108 org-w3m.el \
109 org-wl.el \
110 org-xoxo.el
112 LISPFILES0 = $(LISPF:%=lisp/%)
113 LISPFILES = $(LISPFILES0) lisp/org-install.el
114 ELCFILES0 = $(LISPFILES0:.el=.elc)
115 ELCFILES = $(LISPFILES:.el=.elc)
116 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
117 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
118 TEXIFILES = doc/org.texi
119 INFOFILES = doc/org
122 .SUFFIXES: .el .elc .texi
123 SHELL = /bin/sh
125 # Additional distribution files
126 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
127 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
129 default: $(ELCFILES)
131 all: $(ELCFILES) $(INFOFILES)
133 up2: update
134 sudo ${MAKE} install
136 update:
137 git pull
138 ${MAKE} clean
139 ${MAKE} all
141 compile: $(ELCFILES0)
143 install: install-lisp
145 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
148 ${MAKE} pdf && open doc/org.pdf
151 ${MAKE} card && gv doc/orgcard.ps
153 install-lisp: $(LISPFILES) $(ELCFILES)
154 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
155 $(CP) $(LISPFILES) $(lispdir)
156 $(CP) $(ELCFILES) $(lispdir)
158 install-info: $(INFOFILES)
159 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
160 $(CP) $(INFOFILES) $(infodir)
161 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
163 install-info-debian: $(INFOFILES)
164 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
166 install-noutline: xemacs/noutline.elc
167 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
168 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
170 autoloads: lisp/org-install.el
172 lisp/org-install.el: $(LISPFILES0) Makefile
173 $(BATCH) --eval "(require 'autoload)" \
174 --eval '(find-file "org-install.el")' \
175 --eval '(erase-buffer)' \
176 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
177 --eval '(insert "\n(provide (quote org-install))\n")' \
178 --eval '(save-buffer)'
179 mv org-install.el lisp
181 xemacs/noutline.elc: xemacs/noutline.el
183 doc/org: doc/org.texi
184 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
186 doc/org.pdf: doc/org.texi
187 (cd doc; $(TEXI2PDF) org.texi)
189 doc/org.html: doc/org.texi
190 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
191 UTILITIES/manfull.pl doc/org.html
193 doc/orgcard.dvi: doc/orgcard.tex
194 (cd doc; tex orgcard.tex)
196 doc/orgcard.pdf: doc/orgcard.dvi
197 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
199 doc/orgcard.ps: doc/orgcard.dvi
200 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
202 doc/orgcard_letter.dvi: doc/orgcard.tex
203 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
204 (cd doc; tex orgcard_letter.tex)
206 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
207 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
209 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
210 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
212 # Below here are special targets for maintenance only
214 updateweb:
215 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
217 html: doc/org.html
219 html_manual: doc/org.texi
220 rm -rf doc/manual
221 mkdir doc/manual
222 $(TEXI2HTML) -o doc/manual doc/org.texi
223 UTILITIES/mansplit.pl doc/manual/*.html
225 info: doc/org
227 pdf: doc/org.pdf
229 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
231 distfile:
232 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
233 touch doc/org.texi doc/orgcard.tex # force update
234 ${MAKE} cleancontrib
235 ${MAKE} info
236 ${MAKE} doc
237 ${MAKE} lisp/org-install.el
238 rm -rf org-$(TAG) org-$(TAG).zip
239 $(MKDIR) org-$(TAG)
240 $(MKDIR) org-$(TAG)/xemacs
241 $(MKDIR) org-$(TAG)/doc
242 $(MKDIR) org-$(TAG)/lisp
243 cp -r $(LISPFILES) org-$(TAG)/lisp
244 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
245 cp -r $(DISTFILES_extra) org-$(TAG)/
246 cp -r README_DIST org-$(TAG)/README
247 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
248 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
249 zip -r org-$(TAG).zip org-$(TAG)
250 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
252 release:
253 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
254 ${MAKE} distfile
255 ${MAKE} doc
256 UTILITIES/gplmanual.pl
257 ${MAKE} html_manual
258 rm -rf RELEASEDIR
259 $(MKDIR) RELEASEDIR
260 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
261 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
262 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
263 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
265 upload_release:
266 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
268 upload_manual:
269 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
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
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-crypt.elc: lisp/org-crypt.el lisp/org.el
342 lisp/org-datetree.elc: lisp/org.el
343 lisp/org-docview.elc: lisp/org.el
344 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
345 lisp/org-exp-blocks.elc: lisp/org.el
346 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el
347 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
348 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
349 lisp/org-feed.elc: lisp/org.el
350 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
351 lisp/org-freemind.elc: lisp/org.el
352 lisp/org-gnus.elc: lisp/org.el
353 lisp/org-html.elc: lisp/org-exp.el
354 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
355 lisp/org-icalendar.elc: lisp/org-exp.el
356 lisp/org-id.elc: lisp/org.el
357 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
358 lisp/org-info.elc: lisp/org.el
359 lisp/org-inlinetask.elc:
360 lisp/org-irc.elc: lisp/org.el
361 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
362 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
363 lisp/org-mac-message.elc: lisp/org.el
364 lisp/org-macs.elc:
365 lisp/org-mew.elc: lisp/org.el
366 lisp/org-mhe.elc: lisp/org.el
367 lisp/org-mobile.elc: lisp/org.el
368 lisp/org-mouse.elc: lisp/org.el
369 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
370 lisp/org-publish.elc:
371 lisp/org-protocol.elc: lisp/org.el
372 lisp/org-remember.elc: lisp/org.el
373 lisp/org-rmail.elc: lisp/org.el
374 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
375 lisp/org-table.elc: lisp/org.el
376 lisp/org-timer.elc: lisp/org.el
377 lisp/org-vm.elc: lisp/org.el
378 lisp/org-w3m.elc: lisp/org.el
379 lisp/org-wl.elc: lisp/org.el
380 lisp/org-xoxo.elc: lisp/org-exp.el