Release 5.19a
[org-mode/org-mode-NeilSmithlineMods.git] / Makefile
blob950e28178f132a09d844e690bcb5aa740c3ef420
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 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 HTMLDIR = /home/dominik/public_html/Tools/org
72 HG_RELEASES = ../org-mode-all-releases-hg/
74 .SUFFIXES: .el .elc .texi
75 SHELL = /bin/sh
77 DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} Makefile dir ChangeLog request-assign-future.txt
78 DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
80 all: $(ELCFILES)
82 install: install-lisp
84 doc: org.html org.pdf orgcard.pdf
87 make pdf && open org.pdf
90 make card && gv orgcard.ps
92 install-lisp: $(LISPFILES) $(ELCFILES)
93 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
94 $(CP) $(LISPFILES) $(lispdir)
95 $(CP) $(ELCFILES) $(lispdir)
97 install-info: $(INFOFILES)
98 if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
99 $(CP) $(INFOFILES) $(infodir)
101 install-noutline: xemacs/noutline.elc
102 if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
103 $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
105 org-install.el: $(LISPFILES0)
106 $(BATCH) --eval "(require 'autoload)" \
107 --eval '(find-file "org-install.el")' \
108 --eval '(erase-buffer)' \
109 --eval '(generate-file-autoloads "org.el")' \
110 --eval '(generate-file-autoloads "org-mouse.el")' \
111 --eval '(generate-file-autoloads "org-publish.el")' \
112 --eval '(generate-file-autoloads "org-export-latex.el")' \
113 --eval '(insert "\n(provide (quote org-install))\n")' \
114 --eval '(save-buffer)'
116 org.elc: org.el
118 org-publish.elc: org-publish.el
120 org-install.elc: org-install.el
122 xemacs/noutline.elc: xemacs/noutline.el
124 org: org.texi
125 $(MAKEINFO) --no-split org.texi -o org
127 org.pdf: org.texi
128 $(TEXI2PDF) org.texi
130 org.html: org.texi
131 $(TEXI2HTML) --no-split -o org.html org.texi
133 orgcard.dvi: orgcard.tex
134 tex orgcard.tex
136 orgcard.pdf: orgcard.dvi
137 dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
139 orgcard.ps: orgcard.dvi
140 dvips -t landscape -o orgcard.ps orgcard.dvi
142 orgcard_letter.dvi: orgcard.tex
143 perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
144 tex orgcard_letter.tex
146 orgcard_letter.pdf: orgcard_letter.dvi
147 dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
149 orgcard_letter.ps: orgcard_letter.dvi
150 dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
152 # Below here are special targets for maintenance only
154 webfiles:
155 (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -f org-publish-current-project)
157 html: org.html
159 html_split: org.texi
160 rm -rf manual
161 mkdir manual
162 $(TEXI2HTML) -o manual org.texi
164 info:
165 $(MAKEINFO) --no-split org.texi -o org
167 pdf: org.pdf
169 card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
171 xcompile:
172 xemacs -batch -q -f batch-byte-compile $(LISPFILES)
174 ecompile:
175 emacs -batch -q -f batch-byte-compile $(LISPFILES)
177 distfile:
178 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
179 touch org.texi orgcard.tex
180 make info
181 make doc
182 make org-install.el
183 rm -rf org-$(TAG) org-$(TAG).zip
184 $(MKDIR) org-$(TAG)
185 $(MKDIR) org-$(TAG)/xemacs
186 cp $(DISTFILES) org-$(TAG)/
187 cp $(DISTFILES_xemacs) org-$(TAG)/xemacs/
188 zip -r org-$(TAG).zip org-$(TAG)
189 gtar zcvf org-$(TAG).tar.gz org-$(TAG)
191 release:
192 @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
193 make webfiles
194 make distfile
195 make doc
196 make html_split
197 rm -rf RELEASEDIR
198 $(MKDIR) RELEASEDIR
199 cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
200 cp org.pdf orgcard.pdf org.texi org.html RELEASEDIR
201 cp ORGWEBPAGE/tmp/*.html RELEASEDIR
202 cp ORGWEBPAGE/tmp/*.el RELEASEDIR
203 cp ORGWEBPAGE/tmp/*.txt RELEASEDIR
204 cp ORGWEBPAGE/tmp/*.css RELEASEDIR
205 cp ORGWEBPAGE/tmp/*.jpg RELEASEDIR
206 cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
207 cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
208 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
209 cp -r org-$(TAG)/* $(HG_RELEASES)
210 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
212 trackrelease:
213 (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
214 cp -r org-$(TAG)/* $(HG_RELEASES)
215 (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
217 upload:
218 (cd RELEASEDIR; lftp -f ../ftp_script)
220 upload_manual:
221 lftp -f ftp_script2
223 relup:
224 make release
225 make upload
226 make upload_manual
228 clean:
229 rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
230 rm -f *~
231 rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
232 rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
234 .el.elc:
235 $(ELC) $<