Small bug fixes.
[org-mode/org-tableheadings.git] / Makefile
blobb0ee9199793d253f762589069993c37c1707fab1
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 = org.texi org.pdf org
74 CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
75 TEXIFILES = doc/org.texi
76 INFOFILES = doc/org
77 HG_RELEASES = ../org-mode-all-releases-hg/
80 .SUFFIXES: .el .elc .texi
81 SHELL = /bin/sh
83 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} \
84 Makefile dir ChangeLog request-assign-future.txt \
85 CONTRIB
86 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
88 default: $(ELCFILES)
89 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 -f org-publish-current-project)
161 web:
162 make webfiles
163 (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website)
165 html: doc/org.html
167 html_split: doc/org.texi
168 rm -rf doc/manual
169 mkdir doc/manual
170 $(TEXI2HTML) -o doc/manual doc/org.texi
172 info: doc/org
174 pdf: doc/org.pdf
176 card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
178 distfile:
179 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
180 touch org.texi orgcard.tex
181 make info
182 make doc
183 make org-install.el
184 rm -rf org-$(TAG) org-$(TAG).zip
185 $(MKDIR) org-$(TAG)
186 $(MKDIR) org-$(TAG)/xemacs
187 cp -r $(DISTFILES) org-$(TAG)/
188 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
189 zip -r org-$(TAG).zip org-$(TAG)
190 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
192 release:
193 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
194 make webfiles
195 make distfile
196 make doc
197 make html_split
198 rm -rf RELEASEDIR
199 $(MKDIR) RELEASEDIR
200 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
201 cp org.pdf orgcard.pdf org.texi org.html RELEASEDIR
202 cp ORGWEBPAGE/tmp/*.html RELEASEDIR
203 # cp ORGWEBPAGE/tmp/*.el RELEASEDIR
204 cp ORGWEBPAGE/tmp/*.txt RELEASEDIR
205 cp ORGWEBPAGE/tmp/*.css RELEASEDIR
206 # cp ORGWEBPAGE/tmp/*.jpg RELEASEDIR
207 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
208 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
209 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
210 cp -r org-$(TAG)/* $(HG_RELEASES)
211 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
213 trackrelease:
214 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
215 cp -r org-$(TAG)/* $(HG_RELEASES)
216 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
218 upload_release:
219 (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release)
221 upload_manual:
222 lftp -f ../org-mode-proprietary/ftp_upload_manual
224 relup:
225 make release
226 make upload_release
227 make upload_manual
229 cleanelc:
230 rm -f $(ELCFILES)
231 cleandoc:
232 (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
233 (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
234 (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
235 (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
236 (cd doc; rm -rf manual)
237 clean:
238 make cleanelc
239 make cleandoc
240 rm -f *~ */*~ */*/*~
241 rm -rf RELEASEDIR
243 .el.elc:
244 $(ELC) $<
247 push:
248 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
250 pushtag:
251 git-tag -m "Adding tag" -a $(TAG)
252 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)