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 \
113 org-special-blocks.el \
168 LISPFILES0
= $(LISPF
:%=lisp
/%)
169 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
170 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
171 ELCFILES
= $(LISPFILES
:.el
=.elc
)
172 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir \
173 doc
/pdflayout.sty doc
/.nosearch \
174 doc
/orgguide.texi doc
/orgguide.pdf
175 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
176 TEXIFILES
= doc
/org.texi
179 # Package Manager (ELPA)
180 PKG_TAG
= $(shell date
+%Y
%m
%d
)
181 PKG_DOC
= "Outline-based notes management and organizer"
184 PKG_FILES
= $(LISPFILES0
) \
191 doc
/orgcard_letter.pdf \
194 .SUFFIXES
: .el .elc .texi
197 # Additional distribution files
198 DISTFILES_extra
= Makefile request-assign-future.txt contrib etc
200 default
: $(ELCFILES
) $(ELCBFILES
)
202 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
212 compile
: $(ELCFILES0
) $(ELCBFILES
)
214 install: install-lisp
216 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
219 ${MAKE} pdf
&& open doc
/org.pdf
222 ${MAKE} pdf
&& open doc
/orgguide.pdf
224 install-lisp
: $(LISPFILES
) $(ELCFILES
)
225 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
226 $(CP
) $(LISPFILES
) $(lispdir
)
227 $(CP
) $(ELCFILES
) $(lispdir
)
229 install-info
: $(INFOFILES
)
230 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
231 $(CP
) $(INFOFILES
) $(infodir)
232 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
234 autoloads
: lisp
/org-install.el
236 lisp
/org-install.el
: $(LISPFILES0
) Makefile
237 $(BATCH
) --eval
"(require 'autoload)" \
238 --eval
'(find-file "lisp/org-install.el")' \
239 --eval
'(erase-buffer)' \
240 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
241 --eval
'(insert "\n(provide (quote org-install))\n")' \
242 --eval
'(save-buffer)'
244 doc
/org
: doc
/org.texi
245 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
247 doc
/org.pdf
: doc
/org.texi
248 (cd doc
&& $(TEXI2PDF
) org.texi
)
250 doc
/orgguide.pdf
: doc
/orgguide.texi
251 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
253 doc
/org.html
: doc
/org.texi
254 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
255 UTILITIES
/manfull.pl doc
/org.html
257 doc
/orgcard.pdf
: doc
/orgcard.
tex
258 (cd doc
&& pdftex orgcard.
tex)
260 doc
/orgcard.txt
: doc
/orgcard.
tex
261 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
263 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
264 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
265 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
267 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
268 (cd doc
&& pdftex orgcard_letter.
tex)
270 # Below here are special targets for maintenance only
274 html_manual
: doc
/org.texi
277 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
278 UTILITIES
/mansplit.pl doc
/manual
/*.html
280 html_guide
: doc
/orgguide.texi
283 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
284 UTILITIES
/guidesplit.pl doc
/guide
/*.html
288 pdf
: doc
/org.pdf doc
/orgguide.pdf
290 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
293 git checkout
-b testrelease
origin/maint
294 git merge
-s recursive
-X theirs master
295 UTILITIES
/set-version.pl testing
296 git commit
-a
-m
"Release testing"
297 make distfile TAG
=testversion
299 rm -rf org-testversion
*
302 git branch
-D testrelease
304 # The following target makes a full release for the stuff that is
305 # currently on master. Do it like this:
307 # make release TAG=7.01
311 git merge
-s recursive
-X theirs master
312 UTILITIES
/set-version.pl
$(TAG
)
313 git commit
-a
-m
"Release $(TAG)"
314 make relup TAG
=$(TAG
)
317 rm -f org-
$(TAG
)*.zip
318 rm -f org-
$(TAG
)*.
tar.gz
319 make pushreleasetag TAG
=$(TAG
)
320 git push
-f
origin maint
322 git merge
-s ours maint
323 UTILITIES
/set-version.pl
-a
$(TAG
)
324 git commit
-a
-m
"Update website to show $(TAG) as current release"
327 # The following target makes a release, but from the stuff that is on
328 # maint, not from the stuff that is on master. The idea is that it pushes
329 # out a minor fix into a minor update, while development on master
330 # already went full steam ahead. To make a micro-relesse, cherry-pick
331 # the necessary changes into maint, then run (with proper version number)
332 # This is just like release, but we skip the step which merges master
335 # make fixrelease TAG=7.01.02
339 git merge
-s recursive
-X theirs master
340 UTILITIES
/set-version.pl
$(TAG
)
341 git commit
-a
-m
"Release $(TAG)"
342 make relup TAG
=$(TAG
)
346 rm org-
$(TAG
)*.
tar.gz
347 make pushreleasetag TAG
=$(TAG
)
348 git push
-f
origin maint
350 git merge
-s ours maint
351 UTILITIES
/set-version.pl
-o
$(TAG
)
352 git commit
-a
-m
"Update website to show $(TAG) as current release"
355 # ~$ make relup only makes sense from orgmode.org server
356 # Don't call it from your computer!
363 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
366 UTILITIES
/gplmanual.pl
371 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
372 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
373 cp doc
/org_dual_license.texi RELEASEDIR
374 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
375 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
376 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
378 # ~$ make sync_release only makes sense from orgmode.org server
379 # Don't call it from your computer!
381 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
383 # ~$ make sync_manual only makes sense from orgmode.org server
384 # Don't call it from your computer!
386 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
387 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
390 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
391 touch doc
/org.texi doc
/orgcard.
tex # force update
395 ${MAKE} lisp
/org-install.el
396 rm -rf org-
$(TAG
) org-
$(TAG
).zip
398 $(MKDIR
) org-
$(TAG
)/doc
399 $(MKDIR
) org-
$(TAG
)/lisp
400 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
401 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
402 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
403 cp
-r README_DIST org-
$(TAG
)/README
404 zip
-r org-
$(TAG
).zip org-
$(TAG
)
405 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
408 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
409 touch doc
/org.texi doc
/orgcard.
tex # force update
412 rm -rf org-
$(PKG_TAG
) org-
$(PKG_TAG
).
tar
413 $(MKDIR
) org-
$(PKG_TAG
)
414 cp
-r
$(PKG_FILES
) org-
$(PKG_TAG
)
415 echo
"(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-
$(PKG_TAG
)/org-pkg.el
416 tar cf org-
$(PKG_TAG
).
tar org-
$(PKG_TAG
) --remove-files
420 rm -f lisp
/org-install.el
429 find contrib
-name \
*~
-exec
rm {} \
;
434 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
435 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
436 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
437 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
438 -(cd doc
&& rm -rf manual
)
443 rm -rf org-7
*zip org-7
*tar.gz
450 git push orgmode@orgmode.org
:org-mode.git master
453 git tag
-m
"Adding tag" -a
$(TAG
)
454 git push orgmode@orgmode.org
:org-mode.git
$(TAG
)
457 git tag
-m
"Adding release tag" -a release_
$(TAG
)
458 git push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
462 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
463 lisp
/org-agenda.elc
: lisp
/org.el
464 lisp
/org-ascii.elc
: lisp
/org-exp.el
465 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
466 lisp
/org-archive.elc
: lisp
/org.el
467 lisp
/org-bbdb.elc
: lisp
/org.el
468 lisp
/org-beamer.elc
: lisp
/org.el
469 lisp
/org-bibtex.elc
: lisp
/org.el
470 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
471 lisp
/org-clock.elc
: lisp
/org.el
472 lisp
/org-colview.elc
: lisp
/org.el
473 lisp
/org-colview-xemacs.elc
: lisp
/org.el
474 lisp
/org-compat.elc
: lisp
/org-macs.el
475 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
476 lisp
/org-ctags.elc
: lisp
/org.el
477 lisp
/org-datetree.elc
: lisp
/org.el
478 lisp
/org-docview.elc
: lisp
/org.el
479 lisp
/org-entities.elc
:
480 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
481 lisp
/org-exp-blocks.elc
: lisp
/org.el
482 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
483 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
484 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
485 lisp
/org-feed.elc
: lisp
/org.el
486 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
487 lisp
/org-freemind.elc
: lisp
/org.el
488 lisp
/org-gnus.elc
: lisp
/org.el
489 lisp
/org-html.elc
: lisp
/org-exp.el
490 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
491 lisp
/org-icalendar.elc
: lisp
/org-exp.el
492 lisp
/org-id.elc
: lisp
/org.el
493 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
494 lisp
/org-info.elc
: lisp
/org.el
495 lisp
/org-inlinetask.elc
:
496 lisp
/org-irc.elc
: lisp
/org.el
497 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
498 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
499 lisp
/org-lparse.elc
: lisp
/org-exp.el
500 lisp
/org-mac-message.elc
: lisp
/org.el
502 lisp
/org-mew.elc
: lisp
/org.el
503 lisp
/org-mhe.elc
: lisp
/org.el
505 lisp
/org-mobile.elc
: lisp
/org.el
506 lisp
/org-mouse.elc
: lisp
/org.el
507 lisp
/org-odt.elc
: lisp
/org-lparse.el
508 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
509 lisp
/org-publish.elc
:
510 lisp
/org-protocol.elc
: lisp
/org.el
511 lisp
/org-remember.elc
: lisp
/org.el
512 lisp
/org-rmail.elc
: lisp
/org.el
513 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
514 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
515 lisp
/org-table.elc
: lisp
/org.el
516 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
517 lisp
/org-timer.elc
: lisp
/org.el
518 lisp
/org-vm.elc
: lisp
/org.el
519 lisp
/org-w3m.elc
: lisp
/org.el
520 lisp
/org-wl.elc
: lisp
/org.el
521 lisp
/org-xoxo.elc
: lisp
/org-exp.el
523 # Describe valid make targets for org-mode.
525 @echo
"make - compile Org ELisp files"
526 @echo
"make clean - clean Elisp and documentation files"
527 @echo
"make all - compile Org ELisp files and documentation"
529 @echo
"make doc - make all documentation"
530 @echo
"make info - make Info documentation"
531 @echo
"make html - make HTML documentation"
532 @echo
"make pdf - make pdf documentation"
533 @echo
"make card - make refcards documentation"
535 @echo
"make install - install Org"
536 @echo
"make install-lisp - install Org ELisp files"
537 @echo
"make install-info - install Org Info file"