Release 5.16
[org-mode.git] / Makefile
bloba6f59d3beac55020d12364a3b987d1993404ee56
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 # Specify the byte-compiler for compiling org-mode files
34 ELC= $(BATCH) -f batch-byte-compile
36 # How to make a pdf file from a texinfo file
37 TEXI2PDF = texi2pdf
39 # How to create directories
40 MKDIR = mkdir -p
42 # How to create the info files from the texinfo file
43 MAKEINFO = makeinfo
45 # How to create the HTML file
46 TEXI2HTML = makeinfo --html --number-sections --no-split
48 # How to move the byte compiled files to their destination.
49 MV = mv
51 # How to copy the lisp files to their distination.
52 CP = cp -p
54 ##----------------------------------------------------------------------
55 ## BELOW THIS LINE ON YOUR OWN RISK!
56 ##----------------------------------------------------------------------
58 # The following variables need to be defined by the maintainer
59 LISPFILES1 = org.el org-publish.el org-mouse.el org-export-latex.el
60 LISPFILES = $(LISPFILES1) org-install.el
61 ELCFILES = $(LISPFILES:.el=.elc)
62 DOCFILES = org.texi org.pdf org
63 CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf
64 TEXIFILES = org.texi
65 INFOFILES = org
66 HTMLDIR = /home/dominik/public_html/Tools/org
67 HG_RELEASES = ../org-mode-all-releases-hg/
69 .SUFFIXES: .el .elc .texi
70 SHELL = /bin/sh
72 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} Makefile dir ChangeLog request-assign-future.txt
73 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
75 all: $(ELCFILES)
77 install: install-lisp
79 doc: org.html org.pdf orgcard.pdf
82 make pdf && open org.pdf
85 make card && gv orgcard.ps
87 install-lisp: $(LISPFILES) $(ELCFILES)
88 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
89 $(CP) $(LISPFILES) $(lispdir)
90 $(CP) $(ELCFILES) $(lispdir)
92 install-info: $(INFOFILES)
93 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
94 $(CP) $(INFOFILES) $(infodir)
96 install-noutline: xemacs/noutline.elc
97 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
98 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
100 org-install.el: $(LISPFILES)
101 $(BATCH) --eval "(require 'autoload)" \
102 --eval '(find-file "org-install.el")' \
103 --eval '(erase-buffer)' \
104 --eval '(generate-file-autoloads "org.el")' \
105 --eval '(generate-file-autoloads "org-mouse.el")' \
106 --eval '(generate-file-autoloads "org-publish.el")' \
107 --eval '(generate-file-autoloads "org-export-latex.el")' \
108 --eval '(insert "\n(provide (quote org-install))\n")' \
109 --eval '(save-buffer)'
111 org.elc: org.el
113 org-publish.elc: org-publish.el
115 org-install.elc: org-install.el
117 xemacs/noutline.elc: xemacs/noutline.el
119 org: org.texi
120 $(MAKEINFO) --no-split org.texi -o org
122 org.pdf: org.texi
123 $(TEXI2PDF) org.texi
125 org.html: org.texi
126 $(TEXI2HTML) -o org.html org.texi
128 orgcard.dvi: orgcard.tex
129 tex orgcard.tex
131 orgcard.pdf: orgcard.dvi
132 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
134 orgcard.ps: orgcard.dvi
135 dvips -t landscape -o orgcard.ps orgcard.dvi
137 orgcard_letter.dvi: orgcard.tex
138 perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
139 tex orgcard_letter.tex
141 orgcard_letter.pdf: orgcard_letter.dvi
142 dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
144 orgcard_letter.ps: orgcard_letter.dvi
145 dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
147 # Below here are special targets for maintenance only
149 info:
150 $(MAKEINFO) --no-split org.texi -o org
152 pdf: org.pdf
154 card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
156 xcompile:
157 xemacs -batch -q -f batch-byte-compile $(LISPFILES)
159 ecompile:
160 emacs -batch -q -f batch-byte-compile $(LISPFILES)
162 distfile:
163 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
164 touch org.texi orgcard.tex
165 make info
166 make doc
167 make org-install.el
168 rm -rf org-$(TAG) org-$(TAG).zip
169 $(MKDIR) org-$(TAG)
170 $(MKDIR) org-$(TAG)/xemacs
171 cp $(DISTFILES) org-$(TAG)/
172 cp $(DISTFILES_xemacs) org-$(TAG)/xemacs/
173 zip -r org-$(TAG).zip org-$(TAG)
174 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
176 release:
177 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
178 make distfile
179 make doc
180 rm -rf org-release
181 $(MKDIR) org-release
182 cp org-$(TAG).zip org-$(TAG).tar.gz org-release
183 cp org.pdf orgcard.pdf org.texi org.html org-release
184 cp ORGWEBPAGE/tmp/*.html org-release
185 cp ORGWEBPAGE/tmp/*.el org-release
186 cp ORGWEBPAGE/tmp/*.txt org-release
187 cp ORGWEBPAGE/tmp/*.css org-release
188 cp ORGWEBPAGE/tmp/*.jpg org-release
189 # cp ORGWEBPAGE/tmp/*.tar.gz org-release
190 # cp ORGWEBPAGE/tmp/*.zip org-release
191 cp org-release/org-$(TAG).zip org-release/org.zip
192 cp org-release/org-$(TAG).tar.gz org-release/org.tar.gz
193 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
194 cp -r org-$(TAG)/* $(HG_RELEASES)
195 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag -f $(TAG))
197 trackrelease:
198 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
199 cp -r org-$(TAG)/* $(HG_RELEASES)
200 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag -f $(TAG))
202 upload:
203 (cd org-release; lftp -f ../ftp_script)
205 relup:
206 make release
207 make upload
209 dist:
210 make distfile TAG=$(TAG)
211 cp org-$(TAG).zip org-$(TAG).tar.gz $(HTMLDIR)
212 rm -f $(HTMLDIR)/org.zip $(HTMLDIR)/org.tar.gz
213 (cd $(HTMLDIR); ln -s org-$(TAG).zip org.zip)
214 (cd $(HTMLDIR); ln -s org-$(TAG).tar.gz org.tar.gz)
215 make doc
216 cp org.pdf orgcard.pdf org.texi org.html $(HTMLDIR)
218 minidist:
219 rm -f org-$(TAG).zip
220 zip org-$(TAG).zip org.el
221 scp org-$(TAG).zip remote.science.uva.nl:public_html/Tools/org/
223 clean:
224 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
225 rm -f *~
226 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
227 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
229 .el.elc:
230 $(ELC) $<