Release 5.22a.
[org-mode/org-tableheadings.git] / Makefile
blob0a80054d3cbbd9d2b5543b948675e0da5e67c750
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)\"))"
38 # Specify the byte-compiler for compiling org-mode files
39 ELC= $(BATCH) -f batch-byte-compile
41 # How to make a pdf file from a texinfo file
42 TEXI2PDF = texi2pdf
44 # How to create directories
45 MKDIR = mkdir -p
47 # How to create the info files from the texinfo file
48 MAKEINFO = makeinfo
50 # How to create the HTML file
51 TEXI2HTML = makeinfo --html --number-sections
53 # How to move the byte compiled files to their destination.
54 MV = mv
56 # How to copy the lisp files to their distination.
57 CP = cp -p
59 ##----------------------------------------------------------------------
60 ## BELOW THIS LINE ON YOUR OWN RISK!
61 ##----------------------------------------------------------------------
63 # The following variables need to be defined by the maintainer
64 LISPFILES0 = org.el org-publish.el org-mouse.el org-export-latex.el \
65 org-mac-message.el
66 LISPFILES = $(LISPFILES0) org-install.el
67 ELCFILES = $(LISPFILES:.el=.elc)
68 DOCFILES = org.texi org.pdf org
69 CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf
70 TEXIFILES = org.texi
71 INFOFILES = org
72 HG_RELEASES = ../org-mode-all-releases-hg/
75 .SUFFIXES: .el .elc .texi
76 SHELL = /bin/sh
78 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} \
79 Makefile dir ChangeLog request-assign-future.txt \
80 CONTRIB
81 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
83 all: $(ELCFILES)
85 install: install-lisp
87 doc: org.html org.pdf orgcard.pdf orgcard_letter.pdf
90 make pdf && open org.pdf
93 make card && gv orgcard.ps
95 install-lisp: $(LISPFILES) $(ELCFILES)
96 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
97 $(CP) $(LISPFILES) $(lispdir)
98 $(CP) $(ELCFILES) $(lispdir)
100 install-info: $(INFOFILES)
101 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
102 $(CP) $(INFOFILES) $(infodir)
104 install-noutline: xemacs/noutline.elc
105 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
106 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
108 org-install.el: $(LISPFILES0)
109 $(BATCH) --eval "(require 'autoload)" \
110 --eval '(find-file "org-install.el")' \
111 --eval '(erase-buffer)' \
112 --eval '(generate-file-autoloads "org.el")' \
113 --eval '(generate-file-autoloads "org-mouse.el")' \
114 --eval '(generate-file-autoloads "org-publish.el")' \
115 --eval '(generate-file-autoloads "org-export-latex.el")' \
116 --eval '(insert "\n(provide (quote org-install))\n")' \
117 --eval '(save-buffer)'
119 org.elc: org.el
121 org-publish.elc: org-publish.el
123 org-install.elc: org-install.el
125 xemacs/noutline.elc: xemacs/noutline.el
127 org: org.texi
128 $(MAKEINFO) --no-split org.texi -o org
130 org.pdf: org.texi
131 $(TEXI2PDF) org.texi
133 org.html: org.texi
134 $(TEXI2HTML) --no-split -o org.html org.texi
136 orgcard.dvi: orgcard.tex
137 tex orgcard.tex
139 orgcard.pdf: orgcard.dvi
140 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
142 orgcard.ps: orgcard.dvi
143 dvips -t landscape -o orgcard.ps orgcard.dvi
145 orgcard_letter.dvi: orgcard.tex
146 perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
147 tex orgcard_letter.tex
149 orgcard_letter.pdf: orgcard_letter.dvi
150 dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
152 orgcard_letter.ps: orgcard_letter.dvi
153 dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
155 # Below here are special targets for maintenance only
157 webfiles:
158 (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -f org-publish-current-project)
160 web:
161 make webfiles
162 (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website)
164 html: org.html
166 html_split: org.texi
167 rm -rf manual
168 mkdir manual
169 $(TEXI2HTML) -o manual org.texi
171 info:
172 $(MAKEINFO) --no-split org.texi -o org
174 pdf: org.pdf
176 card: orgcard.pdf orgcard.ps orgcard_letter.pdf 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 clean:
230 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
231 rm -f *~
232 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
233 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
234 rm -f orgcard_letter.tex orgcard_letter.pdf
235 rm -f org-install.el
236 rm -rf manual
237 rm -rf RELEASEDIR
239 .el.elc:
240 $(ELC) $<
243 push:
244 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
246 pushtag:
247 git-tag -m "Adding tag" -a $(TAG)
248 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)