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
84 LISPFILES0
= $(LISPF
:%=lisp
/%)
85 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
86 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
87 ELCFILES
= $(LISPFILES
:.el
=.elc
)
88 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir
89 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
90 TEXIFILES
= doc
/org.texi
94 .SUFFIXES
: .el .elc .texi
97 # Additional distribution files
98 DISTFILES_extra
= Makefile ChangeLog request-assign-future.txt CONTRIB
99 DISTFILES_xemacs
= xemacs
/noutline.el xemacs
/ps-print-invisible.el xemacs
/README
103 all: $(ELCFILES
) $(INFOFILES
)
105 compile
: $(ELCFILES0
)
107 install: install-lisp
109 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf
112 make pdf
&& open doc
/org.pdf
115 make card
&& gv doc
/orgcard.ps
117 install-lisp
: $(LISPFILES
) $(ELCFILES
)
118 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
119 $(CP
) $(LISPFILES
) $(lispdir
)
120 $(CP
) $(ELCFILES
) $(lispdir
)
122 install-info
: $(INFOFILES
)
123 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
124 $(CP
) $(INFOFILES
) $(infodir)
126 install-noutline
: xemacs
/noutline.elc
127 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
128 $(CP
) xemacs
/noutline.el xemacs
/noutline.elc
$(lispdir
)
130 autoloads
: lisp
/org-install.el
132 lisp
/org-install.el
: $(LISPFILES0
) Makefile
133 $(BATCH
) --eval
"(require 'autoload)" \
134 --eval
'(find-file "org-install.el")' \
135 --eval
'(erase-buffer)' \
136 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
137 --eval
'(insert "\n(provide (quote org-install))\n")' \
138 --eval
'(save-buffer)'
139 mv org-install.el lisp
141 xemacs
/noutline.elc
: xemacs
/noutline.el
143 doc
/org
: doc
/org.texi
144 (cd doc
; $(MAKEINFO
) --no-split org.texi
-o org
)
146 doc
/org.pdf
: doc
/org.texi
147 (cd doc
; $(TEXI2PDF
) org.texi
)
149 doc
/org.html
: doc
/org.texi
150 (cd doc
; $(TEXI2HTML
) --no-split
-o org.html org.texi
)
152 doc
/orgcard.
dvi: doc
/orgcard.
tex
153 (cd doc
; tex orgcard.
tex)
155 doc
/orgcard.pdf
: doc
/orgcard.
dvi
156 dvips
-q
-f
-t landscape doc
/orgcard.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard.pdf
-c .setpdfwrite
-
158 doc
/orgcard.ps
: doc
/orgcard.
dvi
159 dvips
-t landscape
-o doc
/orgcard.ps doc
/orgcard.
dvi
161 doc
/orgcard_letter.
dvi: doc
/orgcard.
tex
162 perl
-pe
's/letterpaper=0/letterpaper=1/' doc
/orgcard.
tex > doc
/orgcard_letter.
tex
163 (cd doc
; tex orgcard_letter.
tex)
165 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
dvi
166 dvips
-q
-f
-t landscape doc
/orgcard_letter.
dvi | gs
-q
-dNOPAUSE
-dBATCH
-sDEVICE
=pdfwrite
-sOutputFile
=doc
/orgcard_letter.pdf
-c .setpdfwrite
-
168 doc
/orgcard_letter.ps
: doc
/orgcard_letter.
dvi
169 dvips
-t landscape
-o doc
/orgcard_letter.ps doc
/orgcard_letter.
dvi
171 # Below here are special targets for maintenance only
174 (cd ORGWEBPAGE
; emacs
-batch
-l ~
/.emacs index.org
-eval
'(org-publish (assoc "orgwebpage" org-publish-project-alist))')
175 (cd ORGWEBPAGE
/tmp
; rm *~
)
179 (cd ORGWEBPAGE
/tmp
; lftp
-f ..
/..
/..
/org-mode-proprietary
/ftp_upload_website_legito
)
183 html_manual
: doc
/org.texi
186 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
192 card
: doc
/orgcard.pdf doc
/orgcard.ps doc
/orgcard_letter.pdf doc
/orgcard_letter.ps
195 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
196 touch doc
/org.texi doc
/orgcard.
tex # force update
199 make lisp
/org-install.el
200 rm -rf org-
$(TAG
) org-
$(TAG
).zip
202 $(MKDIR
) org-
$(TAG
)/xemacs
203 $(MKDIR
) org-
$(TAG
)/doc
204 $(MKDIR
) org-
$(TAG
)/lisp
205 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
206 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
207 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
208 cp
-r README_DIST org-
$(TAG
)/README
209 cp
-r ORGWEBPAGE
/Changes.org org-
$(TAG
)/
210 cp
-r
$(DISTFILES_xemacs
) org-
$(TAG
)/xemacs
/
211 zip
-r org-
$(TAG
).zip org-
$(TAG
)
212 gtar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
215 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
222 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
223 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
224 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
225 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
228 (cd RELEASEDIR
; lftp
-f ..
/..
/org-mode-proprietary
/ftp_upload_release_legito
)
231 lftp
-f ..
/org-mode-proprietary
/ftp_upload_manual_legito
241 (cd doc
; rm -f org.pdf org org.html orgcard.pdf orgcard.ps
)
242 (cd doc
; rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
243 (cd doc
; rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
244 (cd doc
; rm -f orgcard_letter.
tex orgcard_letter.pdf
)
245 (cd doc
; rm -rf manual
)
257 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git master
260 git-tag
-m
"Adding tag" -a
$(TAG
)
261 git-push git
+ssh
://repo.or.cz
/srv
/git
/org-mode.git
$(TAG
)