1 # Makefile - for the org-mode distribution
3 # Maintainer: Carsten Dominik <dominik@science.uva.nl>
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
16 # Where local software is found
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
43 # How to create directories
46 # How to create the info files from the texinfo file
49 # How to create the HTML file
50 TEXI2HTML
= makeinfo --html
--number-sections
52 # How to move the byte compiled files to their destination.
55 # How to copy the lisp files to their distination.
58 ##----------------------------------------------------------------------
59 ## BELOW THIS LINE ON YOUR OWN RISK!
60 ##----------------------------------------------------------------------
62 # The following variables need to be defined by the maintainer
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
77 HG_RELEASES
= ..
/org-mode-all-releases-hg
/
80 .SUFFIXES
: .el .elc .texi
83 DISTFILES
= README
${LISPFILES} ${DOCFILES} ${CARDFILES} \
84 Makefile
dir ChangeLog request-assign-future.txt \
86 DISTFILES_xemacs
= xemacs
/noutline.el xemacs
/ps-print-invisible.el xemacs
/README
93 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf
96 make pdf
&& open doc
/org.pdf
99 make card
&& gv doc
/orgcard.ps
101 install-lisp
: $(LISPFILES
) $(ELCFILES
)
102 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
103 $(CP
) $(LISPFILES
) $(lispdir
)
104 $(CP
) $(ELCFILES
) $(lispdir
)
106 install-info
: $(INFOFILES
)
107 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
108 $(CP
) $(INFOFILES
) $(infodir)
110 install-noutline
: xemacs
/noutline.elc
111 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
112 $(CP
) xemacs
/noutline.el xemacs
/noutline.elc
$(lispdir
)
114 autoloads
: lisp
/org-install.el
116 lisp
/org-install.el
: $(LISPFILES0
) Makefile
117 $(BATCH
) --eval
"(require 'autoload)" \
118 --eval
'(find-file "org-install.el")' \
119 --eval
'(erase-buffer)' \
120 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
121 --eval
'(insert "\n(provide (quote org-install))\n")' \
122 --eval
'(save-buffer)'
123 mv org-install.el lisp
125 xemacs
/noutline.elc
: xemacs
/noutline.el
127 doc
/org
: doc
/org.texi
128 (cd doc
; $(MAKEINFO
) --no-split org.texi
-o org
)
130 doc
/org.pdf
: doc
/org.texi
131 (cd doc
; $(TEXI2PDF
) org.texi
)
133 doc
/org.html
: doc
/org.texi
134 (cd doc
; $(TEXI2HTML
) --no-split
-o org.html org.texi
)
136 doc
/orgcard.
dvi: doc
/orgcard.
tex
137 (cd doc
; tex orgcard.
tex)
139 doc
/orgcard.pdf
: doc
/orgcard.
dvi
140 dvips
-q
-f
-t landscape doc
/orgcard.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard.pdf
-c .setpdfwrite
-
142 doc
/orgcard.ps
: doc
/orgcard.
dvi
143 dvips
-t landscape
-o doc
/orgcard.ps doc
/orgcard.
dvi
145 doc
/orgcard_letter.
dvi: doc
/orgcard.
tex
146 perl
-pe
's/letterpaper=0/letterpaper=1/' doc
/orgcard.
tex > doc
/orgcard_letter.
tex
147 (cd doc
; tex orgcard_letter.
tex)
149 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
dvi
150 dvips
-q
-f
-t landscape doc
/orgcard_letter.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard_letter.pdf
-c .setpdfwrite
-
152 doc
/orgcard_letter.ps
: doc
/orgcard_letter.
dvi
153 dvips
-t landscape
-o doc
/orgcard_letter.ps doc
/orgcard_letter.
dvi
155 # Below here are special targets for maintenance only
158 (cd ORGWEBPAGE
; emacs
-batch
-l ~
/.emacs index.org
-f org-publish-current-project
)
162 (cd ORGWEBPAGE
/tmp
; lftp
-f ..
/..
/..
/org-mode-proprietary
/ftp_upload_website
)
166 html_split
: doc
/org.texi
169 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
175 card
: doc
/orgcard.pdf doc
/orgcard.ps doc
/orgcard_letter.pdf doc
/orgcard_letter.ps
178 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
179 touch org.texi orgcard.
tex
183 rm -rf org-
$(TAG
) org-
$(TAG
).zip
185 $(MKDIR
) org-
$(TAG
)/xemacs
186 cp
-r
$(DISTFILES
) org-
$(TAG
)/
187 cp
-r
$(DISTFILES_xemacs
) org-
$(TAG
)/xemacs
/
188 zip
-r org-
$(TAG
).zip org-
$(TAG
)
189 gtar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
192 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
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
))
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
))
218 (cd RELEASEDIR
; lftp
-f ..
/..
/org-mode-proprietary
/ftp_upload_release
)
221 lftp
-f ..
/org-mode-proprietary
/ftp_upload_manual
231 (cd doc
; rm -f org.pdf org org.html orgcard.pdf orgcard.ps
)
232 (cd doc
; rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
233 (cd doc
; rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
234 (cd doc
; rm -f orgcard_letter.
tex orgcard_letter.pdf
)
235 (cd doc
; rm -rf manual
)
247 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git master
250 git-tag
-m
"Adding tag" -a
$(TAG
)
251 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git
$(TAG
)