Enhancement for the clocktable.
[org-mode.git] / Makefile
blob4de98d686e11670c4c57b5dd769165b13ab3b206
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)/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) \".\") \
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 move the byte compiled files to their destination.
53 MV = mv
55 # How to copy the lisp files to their distination.
56 CP = cp -p
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-compat.el org-macs.el \
65 org-table.el org-exp.el org-remember.el org-agenda.el\
66 org-publish.el org-mouse.el org-export-latex.el \
67 org-bbdb.el org-gnus.el org-info.el org-irc.el \
68 org-mac-message.el org-mhe.el org-rmail.el org-vm.el org-wl.el
69 LISPFILES0 = $(LISPF:%=lisp/%)
70 LISPFILES = $(LISPFILES0) lisp/org-install.el
71 ELCFILES0 = $(LISPFILES0:.el=.elc)
72 ELCFILES = $(LISPFILES:.el=.elc)
73 DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir
74 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
75 TEXIFILES = doc/org.texi
76 INFOFILES = doc/org
79 .SUFFIXES: .el .elc .texi
80 SHELL = /bin/sh
82 # Additional distribution files
83 DISTFILES_extra= Makefile ChangeLog request-assign-future.txt CONTRIB
84 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
86 default: $(ELCFILES)
88 all: $(ELCFILES) $(INFOFILES)
90 compile: $(ELCFILES0)
92 install: install-lisp
94 doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
97 make pdf && open doc/org.pdf
100 make card && gv doc/orgcard.ps
102 install-lisp: $(LISPFILES) $(ELCFILES)
103 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
104 $(CP) $(LISPFILES) $(lispdir)
105 $(CP) $(ELCFILES) $(lispdir)
107 install-info: $(INFOFILES)
108 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
109 $(CP) $(INFOFILES) $(infodir)
111 install-noutline: xemacs/noutline.elc
112 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
113 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
115 autoloads: lisp/org-install.el
117 lisp/org-install.el: $(LISPFILES0) Makefile
118 $(BATCH) --eval "(require 'autoload)" \
119 --eval '(find-file "org-install.el")' \
120 --eval '(erase-buffer)' \
121 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
122 --eval '(insert "\n(provide (quote org-install))\n")' \
123 --eval '(save-buffer)'
124 mv org-install.el lisp
126 xemacs/noutline.elc: xemacs/noutline.el
128 doc/org: doc/org.texi
129 (cd doc; $(MAKEINFO) --no-split org.texi -o org)
131 doc/org.pdf: doc/org.texi
132 (cd doc; $(TEXI2PDF) org.texi)
134 doc/org.html: doc/org.texi
135 (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
137 doc/orgcard.dvi: doc/orgcard.tex
138 (cd doc; tex orgcard.tex)
140 doc/orgcard.pdf: doc/orgcard.dvi
141 dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
143 doc/orgcard.ps: doc/orgcard.dvi
144 dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
146 doc/orgcard_letter.dvi: doc/orgcard.tex
147 perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
148 (cd doc; tex orgcard_letter.tex)
150 doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
151 dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
153 doc/orgcard_letter.ps: doc/orgcard_letter.dvi
154 dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
156 # Below here are special targets for maintenance only
158 webfiles:
159 (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -eval '(org-publish (assoc "orgwebpage" org-publish-project-alist))')
160 (cd ORGWEBPAGE/tmp; rm *~)
162 web:
163 make webfiles
164 (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website_legito)
166 html: doc/org.html
168 html_split: doc/org.texi
169 rm -rf doc/manual
170 mkdir doc/manual
171 $(TEXI2HTML) -o doc/manual doc/org.texi
173 info: doc/org
175 pdf: doc/org.pdf
177 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
179 distfile:
180 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
181 touch doc/org.texi doc/orgcard.tex # force update
182 make info
183 make doc
184 make lisp/org-install.el
185 rm -rf org-$(TAG) org-$(TAG).zip
186 $(MKDIR) org-$(TAG)
187 $(MKDIR) org-$(TAG)/xemacs
188 $(MKDIR) org-$(TAG)/doc
189 $(MKDIR) org-$(TAG)/lisp
190 cp -r $(LISPFILES) org-$(TAG)/lisp
191 cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
192 cp -r $(DISTFILES_extra) org-$(TAG)/
193 cp -r README_DIST org-$(TAG)/README
194 cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
195 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
196 zip -r org-$(TAG).zip org-$(TAG)
197 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
199 release:
200 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
201 make webfiles
202 make distfile
203 make doc
204 make html_split
205 rm -rf RELEASEDIR
206 $(MKDIR) RELEASEDIR
207 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
208 cp org.pdf orgcard.pdf org.texi org.html RELEASEDIR
209 cp ORGWEBPAGE/tmp/*.html RELEASEDIR
210 # cp ORGWEBPAGE/tmp/*.el RELEASEDIR
211 cp ORGWEBPAGE/tmp/*.txt RELEASEDIR
212 cp ORGWEBPAGE/tmp/*.css RELEASEDIR
213 # cp ORGWEBPAGE/tmp/*.jpg RELEASEDIR
214 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
215 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
217 upload_release:
218 (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
220 upload_manual:
221 lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
223 relup:
224 make release
225 make upload_release
226 make upload_manual
228 cleanelc:
229 rm -f $(ELCFILES)
230 cleandoc:
231 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
232 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
233 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
234 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
235 (cd doc; rm -rf manual)
236 clean:
237 make cleanelc
238 make cleandoc
239 rm -f *~ */*~ */*/*~
240 rm -rf RELEASEDIR
242 .el.elc:
243 $(ELC) $<
246 push:
247 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
249 pushtag:
250 git-tag -m "Adding tag" -a $(TAG)
251 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)