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
88 LISPFILES0
= $(LISPF
:%=lisp
/%)
89 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
90 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
91 ELCFILES
= $(LISPFILES
:.el
=.elc
)
92 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir
93 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
94 TEXIFILES
= doc
/org.texi
98 .SUFFIXES
: .el .elc .texi
101 # Additional distribution files
102 DISTFILES_extra
= Makefile ChangeLog request-assign-future.txt CONTRIB
103 DISTFILES_xemacs
= xemacs
/noutline.el xemacs
/ps-print-invisible.el xemacs
/README
107 all: $(ELCFILES
) $(INFOFILES
)
109 compile
: $(ELCFILES0
)
111 install: install-lisp
113 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf
116 make pdf
&& open doc
/org.pdf
119 make card
&& gv doc
/orgcard.ps
121 install-lisp
: $(LISPFILES
) $(ELCFILES
)
122 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
123 $(CP
) $(LISPFILES
) $(lispdir
)
124 $(CP
) $(ELCFILES
) $(lispdir
)
126 install-info
: $(INFOFILES
)
127 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
128 $(CP
) $(INFOFILES
) $(infodir)
130 install-noutline
: xemacs
/noutline.elc
131 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
132 $(CP
) xemacs
/noutline.el xemacs
/noutline.elc
$(lispdir
)
134 autoloads
: lisp
/org-install.el
136 lisp
/org-install.el
: $(LISPFILES0
) Makefile
137 $(BATCH
) --eval
"(require 'autoload)" \
138 --eval
'(find-file "org-install.el")' \
139 --eval
'(erase-buffer)' \
140 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
141 --eval
'(insert "\n(provide (quote org-install))\n")' \
142 --eval
'(save-buffer)'
143 mv org-install.el lisp
145 xemacs
/noutline.elc
: xemacs
/noutline.el
147 doc
/org
: doc
/org.texi
148 (cd doc
; $(MAKEINFO
) --no-split org.texi
-o org
)
150 doc
/org.pdf
: doc
/org.texi
151 (cd doc
; $(TEXI2PDF
) org.texi
)
153 doc
/org.html
: doc
/org.texi
154 (cd doc
; $(TEXI2HTML
) --no-split
-o org.html org.texi
)
156 doc
/orgcard.
dvi: doc
/orgcard.
tex
157 (cd doc
; tex orgcard.
tex)
159 doc
/orgcard.pdf
: doc
/orgcard.
dvi
160 dvips
-q
-f
-t landscape doc
/orgcard.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard.pdf
-c .setpdfwrite
-
162 doc
/orgcard.ps
: doc
/orgcard.
dvi
163 dvips
-t landscape
-o doc
/orgcard.ps doc
/orgcard.
dvi
165 doc
/orgcard_letter.
dvi: doc
/orgcard.
tex
166 perl
-pe
's/letterpaper=0/letterpaper=1/' doc
/orgcard.
tex > doc
/orgcard_letter.
tex
167 (cd doc
; tex orgcard_letter.
tex)
169 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
dvi
170 dvips
-q
-f
-t landscape doc
/orgcard_letter.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard_letter.pdf
-c .setpdfwrite
-
172 doc
/orgcard_letter.ps
: doc
/orgcard_letter.
dvi
173 dvips
-t landscape
-o doc
/orgcard_letter.ps doc
/orgcard_letter.
dvi
175 # Below here are special targets for maintenance only
178 (cd ORGWEBPAGE
; emacs
-batch
-l ~
/.emacs index.org
-eval
'(org-publish (assoc "orgwebpage" org-publish-project-alist))')
179 (cd ORGWEBPAGE
/tmp
; rm *~
)
183 (cd ORGWEBPAGE
/tmp
; lftp
-f ..
/..
/..
/org-mode-proprietary
/ftp_upload_website_legito
)
187 html_manual
: doc
/org.texi
190 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
196 card
: doc
/orgcard.pdf doc
/orgcard.ps doc
/orgcard_letter.pdf doc
/orgcard_letter.ps
199 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
200 touch doc
/org.texi doc
/orgcard.
tex # force update
203 make lisp
/org-install.el
204 rm -rf org-
$(TAG
) org-
$(TAG
).zip
206 $(MKDIR
) org-
$(TAG
)/xemacs
207 $(MKDIR
) org-
$(TAG
)/doc
208 $(MKDIR
) org-
$(TAG
)/lisp
209 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
210 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
211 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
212 cp
-r README_DIST org-
$(TAG
)/README
213 cp
-r ORGWEBPAGE
/Changes.org org-
$(TAG
)/
214 cp
-r
$(DISTFILES_xemacs
) org-
$(TAG
)/xemacs
/
215 zip
-r org-
$(TAG
).zip org-
$(TAG
)
216 gtar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
219 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
226 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
227 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
228 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
229 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
232 (cd RELEASEDIR
; lftp
-f ..
/..
/org-mode-proprietary
/ftp_upload_release_legito
)
235 lftp
-f ..
/org-mode-proprietary
/ftp_upload_manual_legito
245 (cd doc
; rm -f org.pdf org org.html orgcard.pdf orgcard.ps
)
246 (cd doc
; rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
247 (cd doc
; rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
248 (cd doc
; rm -f orgcard_letter.
tex orgcard_letter.pdf
)
249 (cd doc
; rm -rf manual
)
261 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git master
264 git-tag
-m
"Adding tag" -a
$(TAG
)
265 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git
$(TAG
)