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)/share
/info
25 ##----------------------------------------------------------------------
26 ## YOU MAY NEED TO EDIT THESE
27 ##----------------------------------------------------------------------
29 # Using emacs in batch mode.
31 BATCH
=$(EMACS
) -batch
-q
-no-site-file
-eval \
32 "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))"
34 # Specify the byte-compiler for compiling org-mode files
35 ELC
= $(BATCH
) -f batch-byte-compile
37 # How to make a pdf file from a texinfo file
40 # How to create directories
43 # How to create the info files from the texinfo file
46 # How to create the HTML file
47 TEXI2HTML
= makeinfo --html
--number-sections
48 TEXI2HTMLNOPSLIT
= makeinfo --html
--no-split
--number-sections
50 # How to copy the lisp files and elc files to their distination.
53 # Name of the program to install info files
54 INSTALL_INFO
=install-info
56 ##----------------------------------------------------------------------
57 ## BELOW THIS LINE ON YOUR OWN RISK!
58 ##----------------------------------------------------------------------
60 # The following variables need to be defined by the maintainer
72 org-colview-xemacs.el \
111 org-special-blocks.el \
165 LISPFILES0
= $(LISPF
:%=lisp
/%)
166 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
167 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
168 ELCFILES
= $(LISPFILES
:.el
=.elc
)
169 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir \
170 doc
/pdflayout.sty doc
/.nosearch \
171 doc
/orgguide.texi doc
/orgguide.pdf
172 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
173 TEXIFILES
= doc
/org.texi
176 # Package Manager (ELPA)
177 PKG_TAG
= $(shell date
+%Y
%m
%d
)
178 PKG_DOC
= "Outline-based notes management and organizer"
181 PKG_FILES
= $(LISPFILES0
) \
188 doc
/orgcard_letter.pdf
190 .SUFFIXES
: .el .elc .texi
193 # Additional distribution files
194 DISTFILES_extra
= Makefile request-assign-future.txt contrib
196 default
: $(ELCFILES
) $(ELCBFILES
)
198 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
208 compile
: $(ELCFILES0
) $(ELCBFILES
)
210 install: install-lisp
212 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
215 ${MAKE} pdf
&& open doc
/org.pdf
218 ${MAKE} pdf
&& open doc
/orgguide.pdf
220 install-lisp
: $(LISPFILES
) $(ELCFILES
)
221 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
222 $(CP
) $(LISPFILES
) $(lispdir
)
223 $(CP
) $(ELCFILES
) $(lispdir
)
225 install-info
: $(INFOFILES
)
226 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
227 $(CP
) $(INFOFILES
) $(infodir)
228 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
230 autoloads
: lisp
/org-install.el
232 lisp
/org-install.el
: $(LISPFILES0
) Makefile
233 $(BATCH
) --eval
"(require 'autoload)" \
234 --eval
'(find-file "lisp/org-install.el")' \
235 --eval
'(erase-buffer)' \
236 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
237 --eval
'(insert "\n(provide (quote org-install))\n")' \
238 --eval
'(save-buffer)'
240 doc
/org
: doc
/org.texi
241 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
243 doc
/org.pdf
: doc
/org.texi
244 (cd doc
&& $(TEXI2PDF
) org.texi
)
246 doc
/orgguide.pdf
: doc
/orgguide.texi
247 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
249 doc
/org.html
: doc
/org.texi
250 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
251 UTILITIES
/manfull.pl doc
/org.html
253 doc
/orgcard.pdf
: doc
/orgcard.
tex
254 (cd doc
&& pdftex orgcard.
tex)
256 doc
/orgcard.txt
: doc
/orgcard.
tex
257 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
259 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
260 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
261 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
263 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
264 (cd doc
&& pdftex orgcard_letter.
tex)
266 # Below here are special targets for maintenance only
270 html_manual
: doc
/org.texi
273 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
274 UTILITIES
/mansplit.pl doc
/manual
/*.html
276 html_guide
: doc
/orgguide.texi
279 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
280 UTILITIES
/guidesplit.pl doc
/guide
/*.html
284 pdf
: doc
/org.pdf doc
/orgguide.pdf
286 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
289 git checkout
-b testrelease
origin/maint
290 git merge
-s recursive
-X theirs master
291 UTILITIES
/set-version.pl testing
292 git commit
-a
-m
"Release testing"
293 make distfile TAG
=testversion
295 rm -rf org-testversion
*
298 git branch
-D testrelease
300 # The following target makes a full release for the stuff that is
301 # currently on master. Do it like this:
303 # make release TAG=7.01
307 git merge
-s recursive
-X theirs master
308 UTILITIES
/set-version.pl
$(TAG
)
309 git commit
-a
-m
"Release $(TAG)"
310 make relup TAG
=$(TAG
)
313 rm -f org-
$(TAG
)*.zip
314 rm -f org-
$(TAG
)*.
tar.gz
315 make pushreleasetag TAG
=$(TAG
)
316 git push
-f
origin maint
318 git merge
-s ours maint
319 UTILITIES
/set-version.pl
-a
$(TAG
)
320 git commit
-a
-m
"Update website to show $(TAG) as current release"
323 # The following target makes a release, but from the stuff that is on
324 # maint, not from the stuff that is on master. The idea is that it pushes
325 # out a minor fix into a minor update, while development on master
326 # already went full steam ahead. To make a micro-relesse, cherry-pick
327 # the necessary changes into maint, then run (with proper version number)
328 # This is just like release, but we skip the step which merges master
331 # make fixrelease TAG=7.01.02
335 git merge
-s recursive
-X theirs master
336 UTILITIES
/set-version.pl
$(TAG
)
337 git commit
-a
-m
"Release $(TAG)"
338 make relup TAG
=$(TAG
)
342 rm org-
$(TAG
)*.
tar.gz
343 make pushreleasetag TAG
=$(TAG
)
344 git push
-f
origin maint
346 git merge
-s ours maint
347 UTILITIES
/set-version.pl
-o
$(TAG
)
348 git commit
-a
-m
"Update website to show $(TAG) as current release"
351 # ~$ make relup only makes sense from orgmode.org server
352 # Don't call it from your computer!
359 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
362 UTILITIES
/gplmanual.pl
367 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
368 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
369 cp doc
/org_dual_license.texi RELEASEDIR
370 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
371 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
372 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
374 # ~$ make sync_release only makes sense from orgmode.org server
375 # Don't call it from your computer!
377 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
379 # ~$ make sync_manual only makes sense from orgmode.org server
380 # Don't call it from your computer!
382 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
383 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
386 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
387 touch doc
/org.texi doc
/orgcard.
tex # force update
391 ${MAKE} lisp
/org-install.el
392 rm -rf org-
$(TAG
) org-
$(TAG
).zip
394 $(MKDIR
) org-
$(TAG
)/doc
395 $(MKDIR
) org-
$(TAG
)/lisp
396 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
397 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
398 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
399 cp
-r README_DIST org-
$(TAG
)/README
400 zip
-r org-
$(TAG
).zip org-
$(TAG
)
401 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
404 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
405 touch doc
/org.texi doc
/orgcard.
tex # force update
408 rm -rf org-
$(PKG_TAG
) org-
$(PKG_TAG
).
tar
409 $(MKDIR
) org-
$(PKG_TAG
)
410 cp
-r
$(PKG_FILES
) org-
$(PKG_TAG
)
411 echo
"(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-
$(PKG_TAG
)/org-pkg.el
412 tar cf org-
$(PKG_TAG
).
tar org-
$(PKG_TAG
) --remove-files
416 rm -f lisp
/org-install.el
425 find contrib
-name \
*~
-exec
rm {} \
;
430 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
431 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
432 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
433 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
434 -(cd doc
&& rm -rf manual
)
439 rm -rf org-7
*zip org-7
*tar.gz
446 git push orgmode@orgmode.org
:org-mode.git master
449 git tag
-m
"Adding tag" -a
$(TAG
)
450 git push orgmode@orgmode.org
:org-mode.git
$(TAG
)
453 git tag
-m
"Adding release tag" -a release_
$(TAG
)
454 git push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
458 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
459 lisp
/org-agenda.elc
: lisp
/org.el
460 lisp
/org-ascii.elc
: lisp
/org-exp.el
461 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
462 lisp
/org-archive.elc
: lisp
/org.el
463 lisp
/org-bbdb.elc
: lisp
/org.el
464 lisp
/org-beamer.elc
: lisp
/org.el
465 lisp
/org-bibtex.elc
: lisp
/org.el
466 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
467 lisp
/org-clock.elc
: lisp
/org.el
468 lisp
/org-colview.elc
: lisp
/org.el
469 lisp
/org-colview-xemacs.elc
: lisp
/org.el
470 lisp
/org-compat.elc
: lisp
/org-macs.el
471 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
472 lisp
/org-ctags.elc
: lisp
/org.el
473 lisp
/org-datetree.elc
: lisp
/org.el
474 lisp
/org-docview.elc
: lisp
/org.el
475 lisp
/org-entities.elc
:
476 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
477 lisp
/org-exp-blocks.elc
: lisp
/org.el
478 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
479 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
480 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
481 lisp
/org-feed.elc
: lisp
/org.el
482 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
483 lisp
/org-freemind.elc
: lisp
/org.el
484 lisp
/org-gnus.elc
: lisp
/org.el
485 lisp
/org-html.elc
: lisp
/org-exp.el
486 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
487 lisp
/org-icalendar.elc
: lisp
/org-exp.el
488 lisp
/org-id.elc
: lisp
/org.el
489 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
490 lisp
/org-info.elc
: lisp
/org.el
491 lisp
/org-inlinetask.elc
:
492 lisp
/org-irc.elc
: lisp
/org.el
493 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
494 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
495 lisp
/org-mac-message.elc
: lisp
/org.el
497 lisp
/org-mew.elc
: lisp
/org.el
498 lisp
/org-mhe.elc
: lisp
/org.el
500 lisp
/org-mobile.elc
: lisp
/org.el
501 lisp
/org-mouse.elc
: lisp
/org.el
502 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
503 lisp
/org-publish.elc
:
504 lisp
/org-protocol.elc
: lisp
/org.el
505 lisp
/org-remember.elc
: lisp
/org.el
506 lisp
/org-rmail.elc
: lisp
/org.el
507 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
508 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
509 lisp
/org-table.elc
: lisp
/org.el
510 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
511 lisp
/org-timer.elc
: lisp
/org.el
512 lisp
/org-vm.elc
: lisp
/org.el
513 lisp
/org-w3m.elc
: lisp
/org.el
514 lisp
/org-wl.elc
: lisp
/org.el
515 lisp
/org-xoxo.elc
: lisp
/org-exp.el
517 # Describe valid make targets for org-mode.
519 @echo
"make - compile Org ELisp files"
520 @echo
"make clean - clean Elisp and documentation files"
521 @echo
"make all - compile Org ELisp files and documentation"
523 @echo
"make doc - make all documentation"
524 @echo
"make info - make Info documentation"
525 @echo
"make html - make HTML documentation"
526 @echo
"make pdf - make pdf documentation"
527 @echo
"make card - make refcards documentation"
529 @echo
"make install - install Org"
530 @echo
"make install-lisp - install Org ELisp files"
531 @echo
"make install-info - install Org Info file"