Specify the position where the packages are inserted in the LaTeX header.
[org-mode/org-tableheadings.git] / Makefile
blob18b37d38b06fefdec6fb0f70620183ff1cb567d0
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-beamer.el \
67 org-bibtex.el \
68 org-clock.el \
69 org-colview.el \
70 org-colview-xemacs.el \
71 org-compat.el \
72 org-crypt.el \
73 org-ctags.el \
74 org-datetree.el \
75 org-docview.el \
76 org-entities.el \
77 org-exp.el \
78 org-exp-blocks.el \
79 org-docbook.el \
80 org-faces.el \
81 org-feed.el \
82 org-footnote.el \
83 org-freemind.el \
84 org-gnus.el \
85 org-habit.el \
86 org-html.el \
87 org-icalendar.el \
88 org-id.el \
89 org-indent.el \
90 org-info.el \
91 org-inlinetask.el \
92 org-jsinfo.el \
93 org-irc.el \
94 org-latex.el \
95 org-list.el \
96 org-mac-message.el \
97 org-macs.el \
98 org-mew.el \
99 org-mhe.el \
100 org-mobile.el \
101 org-mouse.el \
102 org-publish.el \
103 org-plot.el \
104 org-protocol.el \
105 org-remember.el \
106 org-rmail.el \
107 org-src.el \
108 org-table.el \
109 org-timer.el \
110 org-vm.el \
111 org-w3m.el \
112 org-wl.el \
113 org-xoxo.el
115 LISPFILES0 = $(LISPF:%=lisp/%)
116 LISPFILES = $(LISPFILES0) lisp/org-install.el
117 ELCFILES0 = $(LISPFILES0:.el=.elc)
118 ELCFILES = $(LISPFILES:.el=.elc)
119 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
120 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
121 TEXIFILES = doc/org.texi
122 INFOFILES = doc/org
125 .SUFFIXES: .el .elc .texi
126 SHELL = /bin/sh
128 # Additional distribution files
129 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
130 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
132 default: $(ELCFILES)
134 all: $(ELCFILES) $(INFOFILES)
136 up2: update
137 sudo ${MAKE} install
139 update:
140 git pull
141 ${MAKE} clean
142 ${MAKE} all
144 compile: $(ELCFILES0)
146 install: install-lisp
148 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
151 ${MAKE} pdf && open doc/org.pdf
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.pdf: doc/orgcard.tex
194 (cd doc; pdftex orgcard.tex)
196 doc/orgcard_letter.tex: doc/orgcard.tex
197 perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
198 doc/orgcard.tex > doc/orgcard_letter.tex
200 doc/orgcard_letter.pdf: doc/orgcard_letter.tex
201 (cd doc; pdftex orgcard_letter.tex)
203 # Below here are special targets for maintenance only
205 updateweb:
206 ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
208 html: doc/org.html
210 html_manual: doc/org.texi
211 rm -rf doc/manual
212 mkdir doc/manual
213 $(TEXI2HTML) -o doc/manual doc/org.texi
214 UTILITIES/mansplit.pl doc/manual/*.html
216 info: doc/org
218 pdf: doc/org.pdf
220 card: doc/orgcard.pdf doc/orgcard_letter.pdf
222 distfile:
223 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
224 touch doc/org.texi doc/orgcard.tex # force update
225 ${MAKE} cleancontrib
226 ${MAKE} info
227 ${MAKE} doc
228 ${MAKE} lisp/org-install.el
229 rm -rf org-$(TAG) org-$(TAG).zip
230 $(MKDIR) org-$(TAG)
231 $(MKDIR) org-$(TAG)/xemacs
232 $(MKDIR) org-$(TAG)/doc
233 $(MKDIR) org-$(TAG)/lisp
234 cp -r $(LISPFILES) org-$(TAG)/lisp
235 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
236 cp -r $(DISTFILES_extra) org-$(TAG)/
237 cp -r README_DIST org-$(TAG)/README
238 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
239 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
240 zip -r org-$(TAG).zip org-$(TAG)
241 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
243 release:
244 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
245 ${MAKE} distfile
246 ${MAKE} doc
247 UTILITIES/gplmanual.pl
248 ${MAKE} html_manual
249 rm -rf RELEASEDIR
250 $(MKDIR) RELEASEDIR
251 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
252 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
253 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
254 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
256 upload_release:
257 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
259 upload_manual:
260 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
262 relup0:
263 ${MAKE} release
264 ${MAKE} upload_release
266 relup:
267 ${MAKE} release
268 ${MAKE} upload_release
269 ${MAKE} upload_manual
272 grep -e '(debug)' lisp/*el
274 cleancontrib:
275 find contrib -name \*~ -exec rm {} \;
277 cleanelc:
278 rm -f $(ELCFILES)
279 cleandoc:
280 (cd doc; rm -f org.pdf org org.html orgcard.pdf)
281 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
282 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
283 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
284 (cd doc; rm -rf manual)
286 cleanrel:
287 rm -rf RELEASEDIR
288 rm -rf org-6.*
289 rm -rf org-6*zip org-6*tar.gz
291 clean:
292 ${MAKE} cleanelc
293 ${MAKE} cleandoc
294 ${MAKE} cleanrel
295 rm -f *~ */*~ */*/*~
297 cleanall:
298 ${MAKE} clean
299 rm -f lisp/org-install.el
301 .el.elc:
302 $(ELC) $<
305 push:
306 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
308 pushtag:
309 git-tag -m "Adding tag" -a $(TAG)
310 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
312 pushreleasetag:
313 git-tag -m "Adding release tag" -a release_$(TAG)
314 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
316 dummy:
317 echo ${prefix}
319 # Dependencies
321 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
322 lisp/org-agenda.elc: lisp/org.el
323 lisp/org-ascii.elc: lisp/org-exp.el
324 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
325 lisp/org-archive.elc: lisp/org.el
326 lisp/org-bbdb.elc: lisp/org.el
327 lisp/org-beamer.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-crypt.elc: lisp/org-crypt.el lisp/org.el
334 lisp/org-ctags.elc: lisp/org.el
335 lisp/org-datetree.elc: lisp/org.el
336 lisp/org-docview.elc: lisp/org.el
337 lisp/org-entities.elc:
338 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
339 lisp/org-exp-blocks.elc: lisp/org.el
340 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
341 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
342 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
343 lisp/org-feed.elc: lisp/org.el
344 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
345 lisp/org-freemind.elc: lisp/org.el
346 lisp/org-gnus.elc: lisp/org.el
347 lisp/org-html.elc: lisp/org-exp.el
348 lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
349 lisp/org-icalendar.elc: lisp/org-exp.el
350 lisp/org-id.elc: lisp/org.el
351 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.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-mobile.elc: lisp/org.el
362 lisp/org-mouse.elc: lisp/org.el
363 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
364 lisp/org-publish.elc:
365 lisp/org-protocol.elc: lisp/org.el
366 lisp/org-remember.elc: lisp/org.el
367 lisp/org-rmail.elc: lisp/org.el
368 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
369 lisp/org-table.elc: lisp/org.el
370 lisp/org-timer.elc: lisp/org.el
371 lisp/org-vm.elc: lisp/org.el
372 lisp/org-w3m.elc: lisp/org.el
373 lisp/org-wl.elc: lisp/org.el
374 lisp/org-xoxo.elc: lisp/org-exp.el