Make the new variable buffer-local.
[org-mode.git] / Makefile
blob22794e8fd07baa97721f8c2f0c8b14a9bd7fc3f0
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 LISPFILES0 = org.el org-publish.el org-mouse.el org-export-latex.el \
64 org-mac-message.el org-irc.el
65 LISPFILES = $(LISPFILES0) org-install.el
66 ELCFILES = $(LISPFILES:.el=.elc)
67 DOCFILES = org.texi org.pdf org
68 CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf
69 TEXIFILES = org.texi
70 INFOFILES = org
71 HG_RELEASES = ../org-mode-all-releases-hg/
74 .SUFFIXES: .el .elc .texi
75 SHELL = /bin/sh
77 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} \
78 Makefile dir ChangeLog request-assign-future.txt \
79 CONTRIB
80 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
82 all: $(ELCFILES)
84 install: install-lisp
86 doc: org.html org.pdf orgcard.pdf orgcard_letter.pdf
89 make pdf && open org.pdf
92 make card && gv orgcard.ps
94 install-lisp: $(LISPFILES) $(ELCFILES)
95 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
96 $(CP) $(LISPFILES) $(lispdir)
97 $(CP) $(ELCFILES) $(lispdir)
99 install-info: $(INFOFILES)
100 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
101 $(CP) $(INFOFILES) $(infodir)
103 install-noutline: xemacs/noutline.elc
104 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
105 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
107 org-install.el: $(LISPFILES) Makefile
108 $(BATCH) --eval "(require 'autoload)" \
109 --eval '(find-file "org-install.el")' \
110 --eval '(erase-buffer)' \
111 --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES))))' \
112 --eval '(insert "\n(provide (quote org-install))\n")' \
113 --eval '(save-buffer)'
115 org.elc: org.el
117 org-publish.elc: org-publish.el
119 org-install.elc: org-install.el
121 xemacs/noutline.elc: xemacs/noutline.el
123 org: org.texi
124 $(MAKEINFO) --no-split org.texi -o org
126 org.pdf: org.texi
127 $(TEXI2PDF) org.texi
129 org.html: org.texi
130 $(TEXI2HTML) --no-split -o org.html org.texi
132 orgcard.dvi: orgcard.tex
133 tex orgcard.tex
135 orgcard.pdf: orgcard.dvi
136 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
138 orgcard.ps: orgcard.dvi
139 dvips -t landscape -o orgcard.ps orgcard.dvi
141 orgcard_letter.dvi: orgcard.tex
142 perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
143 tex orgcard_letter.tex
145 orgcard_letter.pdf: orgcard_letter.dvi
146 dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
148 orgcard_letter.ps: orgcard_letter.dvi
149 dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
151 # Below here are special targets for maintenance only
153 webfiles:
154 (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -f org-publish-current-project)
156 web:
157 make webfiles
158 (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website)
160 html: org.html
162 html_split: org.texi
163 rm -rf manual
164 mkdir manual
165 $(TEXI2HTML) -o manual org.texi
167 info:
168 $(MAKEINFO) --no-split org.texi -o org
170 pdf: org.pdf
172 card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
174 distfile:
175 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
176 touch org.texi orgcard.tex
177 make info
178 make doc
179 make org-install.el
180 rm -rf org-$(TAG) org-$(TAG).zip
181 $(MKDIR) org-$(TAG)
182 $(MKDIR) org-$(TAG)/xemacs
183 cp -r $(DISTFILES) org-$(TAG)/
184 cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
185 zip -r org-$(TAG).zip org-$(TAG)
186 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
188 release:
189 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
190 make webfiles
191 make distfile
192 make doc
193 make html_split
194 rm -rf RELEASEDIR
195 $(MKDIR) RELEASEDIR
196 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
197 cp org.pdf orgcard.pdf org.texi org.html RELEASEDIR
198 cp ORGWEBPAGE/tmp/*.html RELEASEDIR
199 # cp ORGWEBPAGE/tmp/*.el RELEASEDIR
200 cp ORGWEBPAGE/tmp/*.txt RELEASEDIR
201 cp ORGWEBPAGE/tmp/*.css RELEASEDIR
202 # cp ORGWEBPAGE/tmp/*.jpg RELEASEDIR
203 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
204 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
205 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
206 cp -r org-$(TAG)/* $(HG_RELEASES)
207 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
209 trackrelease:
210 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
211 cp -r org-$(TAG)/* $(HG_RELEASES)
212 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
214 upload_release:
215 (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release)
217 upload_manual:
218 lftp -f ../org-mode-proprietary/ftp_upload_manual
220 relup:
221 make release
222 make upload_release
223 make upload_manual
225 clean:
226 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
227 rm -f *~ */*~ */*/*~
228 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
229 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
230 rm -f orgcard_letter.tex orgcard_letter.pdf
231 rm -rf manual
232 rm -rf RELEASEDIR
234 .el.elc:
235 $(ELC) $<
238 push:
239 git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
241 pushtag:
242 git-tag -m "Adding tag" -a $(TAG)
243 git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)