Keep compiler happy
[org-mode/org-tableheadings.git] / Makefile
blob2093f2913393a990f58b8eab56519722175b7dd9
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-indent.el \
83 org-info.el \
84 org-inlinetask.el \
85 org-jsinfo.el \
86 org-irc.el \
87 org-latex.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-src.el \
100 org-table.el \
101 org-timer.el \
102 org-vm.el \
103 org-w3m.el \
104 org-wl.el \
105 org-xoxo.el
107 LISPFILES0 = $(LISPF:%=lisp/%)
108 LISPFILES = $(LISPFILES0) lisp/org-install.el
109 ELCFILES0 = $(LISPFILES0:.el=.elc)
110 ELCFILES = $(LISPFILES:.el=.elc)
111 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
112 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
113 TEXIFILES = doc/org.texi
114 INFOFILES = doc/org
117 .SUFFIXES: .el .elc .texi
118 SHELL = /bin/sh
120 # Additional distribution files
121 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
122 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
124 default: $(ELCFILES)
126 all: $(ELCFILES) $(INFOFILES)
128 up2: update
129 sudo ${MAKE} install
131 update:
132 git pull
133 ${MAKE} clean
134 ${MAKE} all
136 compile: $(ELCFILES0)
138 install: install-lisp
140 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
143 ${MAKE} pdf && open doc/org.pdf
146 ${MAKE} card && gv doc/orgcard.ps
148 install-lisp: $(LISPFILES) $(ELCFILES)
149 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
150 $(CP) $(LISPFILES) $(lispdir)
151 $(CP) $(ELCFILES) $(lispdir)
153 install-info: $(INFOFILES)
154 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
155 $(CP) $(INFOFILES) $(infodir)
156 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
158 install-info-debian: $(INFOFILES)
159 $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
161 install-noutline: xemacs/noutline.elc
162 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
163 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
165 autoloads: lisp/org-install.el
167 lisp/org-install.el: $(LISPFILES0) Makefile
168 $(BATCH) --eval "(require 'autoload)" \
169 --eval '(find-file "org-install.el")' \
170 --eval '(erase-buffer)' \
171 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
172 --eval '(insert "\n(provide (quote org-install))\n")' \
173 --eval '(save-buffer)'
174 mv org-install.el lisp
176 xemacs/noutline.elc: xemacs/noutline.el
178 doc/org: doc/org.texi
179 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
181 doc/org.pdf: doc/org.texi
182 (cd doc; $(TEXI2PDF) org.texi)
184 doc/org.html: doc/org.texi
185 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
186 UTILITIES/manfull.pl doc/org.html
188 doc/orgcard.dvi: doc/orgcard.tex
189 (cd doc; tex orgcard.tex)
191 doc/orgcard.pdf: doc/orgcard.dvi
192 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
194 doc/orgcard.ps: doc/orgcard.dvi
195 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
197 doc/orgcard_letter.dvi: doc/orgcard.tex
198 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
199 (cd doc; tex orgcard_letter.tex)
201 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
202 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
204 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
205 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
207 # Below here are special targets for maintenance only
209 updateweb:
210 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
212 html: doc/org.html
214 html_manual: doc/org.texi
215 rm -rf doc/manual
216 mkdir doc/manual
217 $(TEXI2HTML) -o doc/manual doc/org.texi
218 UTILITIES/mansplit.pl doc/manual/*.html
220 info: doc/org
222 pdf: doc/org.pdf
224 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
226 distfile:
227 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
228 touch doc/org.texi doc/orgcard.tex # force update
229 ${MAKE} cleancontrib
230 ${MAKE} info
231 ${MAKE} doc
232 ${MAKE} lisp/org-install.el
233 rm -rf org-$(TAG) org-$(TAG).zip
234 $(MKDIR) org-$(TAG)
235 $(MKDIR) org-$(TAG)/xemacs
236 $(MKDIR) org-$(TAG)/doc
237 $(MKDIR) org-$(TAG)/lisp
238 cp -r $(LISPFILES) org-$(TAG)/lisp
239 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
240 cp -r $(DISTFILES_extra) org-$(TAG)/
241 cp -r README_DIST org-$(TAG)/README
242 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
243 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
244 zip -r org-$(TAG).zip org-$(TAG)
245 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
247 release:
248 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
249 ${MAKE} distfile
250 ${MAKE} doc
251 UTILITIES/gplmanual.pl
252 ${MAKE} html_manual
253 rm -rf RELEASEDIR
254 $(MKDIR) RELEASEDIR
255 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
256 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
257 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
258 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
260 upload_release:
261 rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
263 upload_manual:
264 rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
266 snap:
267 ${MAKE} release TAG=snapshot
268 scp RELEASEDIR/org-snapshot.zip cdominik@orgmode.org:orgmode.org/
269 scp RELEASEDIR/org-snapshot.tar.gz cdominik@orgmode.org:orgmode.org/
270 ${MAKE} cleanrel
272 relup0:
273 ${MAKE} release
274 ${MAKE} upload_release
276 relup:
277 ${MAKE} release
278 ${MAKE} upload_release
279 ${MAKE} upload_manual
282 grep -e '(debug)' lisp/*el
284 cleancontrib:
285 find contrib -name \*~ -exec rm {} \;
287 cleanelc:
288 rm -f $(ELCFILES)
289 cleandoc:
290 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
291 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
292 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
293 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
294 (cd doc; rm -rf manual)
296 cleanrel:
297 rm -rf RELEASEDIR
298 rm -rf org-6.*
299 rm -rf org-6*zip org-6*tar.gz org-snapshot*
301 clean:
302 ${MAKE} cleanelc
303 ${MAKE} cleandoc
304 ${MAKE} cleanrel
305 rm -f *~ */*~ */*/*~
307 cleanall:
308 ${MAKE} clean
309 rm -f lisp/org-install.el
311 .el.elc:
312 $(ELC) $<
315 push:
316 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
318 pushtag:
319 git-tag -m "Adding tag" -a $(TAG)
320 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
322 pushreleasetag:
323 git-tag -m "Adding release tag" -a release_$(TAG)
324 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
326 dummy:
327 echo ${prefix}
329 # Dependencies
331 lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
332 lisp/org-agenda.elc: lisp/org.el
333 lisp/org-ascii.elc: lisp/org-exp.el
334 lisp/org-attach.elc: lisp/org.el lisp/org-id.el
335 lisp/org-archive.elc: lisp/org.el
336 lisp/org-bbdb.elc: lisp/org.el
337 lisp/org-bibtex.elc: lisp/org.el
338 lisp/org-clock.elc: lisp/org.el
339 lisp/org-colview.elc: lisp/org.el
340 lisp/org-colview-xemacs.elc: lisp/org.el
341 lisp/org-compat.elc: lisp/org-macs.el
342 lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
343 lisp/org-exp-blocks.elc: lisp/org.el
344 lisp/org-latex.elc: lisp/org.el lisp/org-exp.el
345 lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
346 lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
347 lisp/org-feed.elc: lisp/org.el
348 lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
349 lisp/org-gnus.elc: lisp/org.el
350 lisp/org-html.elc: lisp/org-exp.el
351 lisp/org-icalendar.elc: lisp/org-exp.el
352 lisp/org-id.elc: lisp/org.el
353 lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
354 lisp/org-info.elc: lisp/org.el
355 lisp/org-inlinetask.elc:
356 lisp/org-irc.elc: lisp/org.el
357 lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
358 lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
359 lisp/org-mac-message.elc: lisp/org.el
360 lisp/org-macs.elc:
361 lisp/org-mew.elc: lisp/org.el
362 lisp/org-mhe.elc: lisp/org.el
363 lisp/org-mouse.elc: lisp/org.el
364 lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
365 lisp/org-publish.elc:
366 lisp/org-protocol.elc: lisp/org.el
367 lisp/org-remember.elc: lisp/org.el
368 lisp/org-rmail.elc: lisp/org.el
369 lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
370 lisp/org-table.elc: lisp/org.el
371 lisp/org-timer.elc: lisp/org.el
372 lisp/org-vm.elc: lisp/org.el
373 lisp/org-w3m.elc: lisp/org.el
374 lisp/org-wl.elc: lisp/org.el
375 lisp/org-xoxo.elc: lisp/org-exp.el