Integrate changes from downstream Emacs.
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blob65abe543a9e08c1ee7f138c92ccc66004bb88bf0
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-attach.el \
66 org-archive.el \
67 org-bbdb.el \
68 org-bibtex.el \
69 org-clock.el \
70 org-colview.el \
71 org-colview-xemacs.el \
72 org-compat.el \
73 org-exp.el \
74 org-export-latex.el \
75 org-faces.el \
76 org-gnus.el \
77 org-id.el \
78 org-info.el \
79 org-jsinfo.el \
80 org-irc.el \
81 org-list.el \
82 org-mac-message.el \
83 org-macs.el \
84 org-mew.el \
85 org-mhe.el \
86 org-mouse.el \
87 org-publish.el \
88 org-plot.el \
89 org-remember.el \
90 org-rmail.el \
91 org-table.el \
92 org-timer.el \
93 org-vm.el \
94 org-w3m.el \
95 org-wl.el
97 LISPFILES0 = $(LISPF:%=lisp/%)
98 LISPFILES = $(LISPFILES0) lisp/org-install.el
99 ELCFILES0 = $(LISPFILES0:.el=.elc)
100 ELCFILES = $(LISPFILES:.el=.elc)
101 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir doc/.nosearch
102 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
103 TEXIFILES = doc/org.texi
104 INFOFILES = doc/org
107 .SUFFIXES: .el .elc .texi
108 SHELL = /bin/sh
110 # Additional distribution files
111 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
112 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
114 default: $(ELCFILES)
116 all: $(ELCFILES) $(INFOFILES)
118 compile: $(ELCFILES0)
120 install: install-lisp
122 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
125 make pdf && open doc/org.pdf
128 make card && gv doc/orgcard.ps
130 install-lisp: $(LISPFILES) $(ELCFILES)
131 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
132 $(CP) $(LISPFILES) $(lispdir)
133 $(CP) $(ELCFILES) $(lispdir)
135 install-info: $(INFOFILES)
136 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
137 $(CP) $(INFOFILES) $(infodir)
138 $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
140 install-noutline: xemacs/noutline.elc
141 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
142 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
144 autoloads: lisp/org-install.el
146 lisp/org-install.el: $(LISPFILES0) Makefile
147 $(BATCH) --eval "(require 'autoload)" \
148 --eval '(find-file "org-install.el")' \
149 --eval '(erase-buffer)' \
150 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
151 --eval '(insert "\n(provide (quote org-install))\n")' \
152 --eval '(save-buffer)'
153 mv org-install.el lisp
155 xemacs/noutline.elc: xemacs/noutline.el
157 doc/org: doc/org.texi
158 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
160 doc/org.pdf: doc/org.texi
161 (cd doc; $(TEXI2PDF) org.texi)
163 doc/org.html: doc/org.texi
164 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
166 doc/orgcard.dvi: doc/orgcard.tex
167 (cd doc; tex orgcard.tex)
169 doc/orgcard.pdf: doc/orgcard.dvi
170 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
172 doc/orgcard.ps: doc/orgcard.dvi
173 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
175 doc/orgcard_letter.dvi: doc/orgcard.tex
176 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
177 (cd doc; tex orgcard_letter.tex)
179 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
180 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
182 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
183 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
185 # Below here are special targets for maintenance only
187 updateweb:
188 ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
190 html: doc/org.html
192 html_manual: doc/org.texi
193 rm -rf doc/manual
194 mkdir doc/manual
195 $(TEXI2HTML) -o doc/manual doc/org.texi
197 info: doc/org
199 pdf: doc/org.pdf
201 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
203 distfile:
204 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
205 touch doc/org.texi doc/orgcard.tex # force update
206 make cleancontrib
207 make info
208 make doc
209 make lisp/org-install.el
210 rm -rf org-$(TAG) org-$(TAG).zip
211 $(MKDIR) org-$(TAG)
212 $(MKDIR) org-$(TAG)/xemacs
213 $(MKDIR) org-$(TAG)/doc
214 $(MKDIR) org-$(TAG)/lisp
215 cp -r $(LISPFILES) org-$(TAG)/lisp
216 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
217 cp -r $(DISTFILES_extra) org-$(TAG)/
218 cp -r README_DIST org-$(TAG)/README
219 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
220 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
221 zip -r org-$(TAG).zip org-$(TAG)
222 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
224 release:
225 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
226 make distfile
227 make doc
228 UTILITIES/gplmanual.pl
229 make html_manual
230 rm -rf RELEASEDIR
231 $(MKDIR) RELEASEDIR
232 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
233 cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
234 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
235 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
237 upload_release:
238 (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
240 upload_manual:
241 lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
243 relup0:
244 make release
245 make upload_release
247 relup:
248 make release
249 make upload_release
250 make upload_manual
253 grep -e '(debug)' lisp/*el
255 cleancontrib:
256 find contrib -name \*~ -exec rm {} \;
258 cleanelc:
259 rm -f $(ELCFILES)
260 cleandoc:
261 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
262 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
263 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
264 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
265 (cd doc; rm -rf manual)
267 cleanrel:
268 rm -rf RELEASEDIR
269 rm -rf org-6.*
270 rm -f org-6*zip org-6*tar.gz
272 clean:
273 make cleanelc
274 make cleandoc
275 make cleanrel
276 rm -f *~ */*~ */*/*~
278 cleanall:
279 make clean
280 rm -f lisp/org-install.el
282 .el.elc:
283 $(ELC) $<
286 push:
287 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
289 pushtag:
290 git-tag -m "Adding tag" -a $(TAG)
291 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
293 pushreleasetag:
294 git-tag -m "Adding release tag" -a release_$(TAG)
295 git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
297 dummy:
298 echo ${prefix}
300 # Dependencies
302 lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc
303 lisp/org-agenda.elc: lisp/org.elc
304 lisp/org-attach.elc: lisp/org.elc lisp/org-id.elc
305 lisp/org-archive.elc: lisp/org.elc
306 lisp/org-bbdb.elc: lisp/org.elc
307 lisp/org-bibtex.elc: lisp/org.elc
308 lisp/org-clock.elc: lisp/org.elc
309 lisp/org-colview.elc: lisp/org.elc
310 lisp/org-colview-xemacs.elc: lisp/org.elc
311 lisp/org-compat.elc: lisp/org-macs.elc
312 lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc
313 lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc
314 lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc
315 lisp/org-gnus.elc: lisp/org.elc
316 lisp/org-id.elc: lisp/org.elc
317 lisp/org-info.elc: lisp/org.elc
318 lisp/org-irc.elc: lisp/org.elc
319 lisp/org-jsinfo.elc: lisp/org.elc lisp/org-exp.elc
320 lisp/org-list.elc: lisp/org-macs.elc lisp/org-compat.elc
321 lisp/org-mac-message.elc: lisp/org.elc
322 lisp/org-macs.elc:
323 lisp/org-mew.elc: lisp/org.elc
324 lisp/org-mhe.elc: lisp/org.elc
325 lisp/org-mouse.elc: lisp/org.elc
326 lisp/org-plot.elc: lisp/org.elc lisp/org-exp.elc lisp/org-table.elc
327 lisp/org-publish.elc:
328 lisp/org-remember.elc: lisp/org.elc
329 lisp/org-rmail.elc: lisp/org.elc
330 lisp/org-table.elc: lisp/org.elc
331 lisp/org-timer.el: lisp/org.elc
332 lisp/org-vm.elc: lisp/org.elc
333 lisp/org-w3m.elc: lisp/org.elc
334 lisp/org-wl.elc: lisp/org.elc