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 \
112 org-special-blocks.el \
162 LISPFILES0
= $(LISPF
:%=lisp
/%)
163 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
164 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
165 ELCFILES
= $(LISPFILES
:.el
=.elc
)
166 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir \
167 doc
/pdflayout.sty doc
/.nosearch \
168 doc
/orgguide.texi doc
/orgguide.pdf
169 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
170 TEXIFILES
= doc
/org.texi
173 # Package Manager (ELPA)
177 # |---------------------------------------+----------------------+--------------|
178 # | Invocation | Output | Side-Effects |
179 # |---------------------------------------+----------------------+--------------|
180 # | make pkg | org-20110518.tar | |
181 # | make PKG_TAG=7.3 pkg | org-7.3.tar | |
182 # | make PKG_FLAVOUR=odt pkg | org-odt-20110518.tar | |
183 # |---------------------------------------+----------------------+--------------|
187 # make PKG_EL_DIR="~/elisp" PKG_UPLOAD_DIR="~/packages/" PKG_TAG=7.3 pkg
189 # Invocation shown above builds org-7.3.tar and uploads the same to
190 # "~/packages" using package-x.el in "~/elisp/".
195 PKG_TAG
= $(shell date
+%Y
%m
%d
)
203 PKG_QNAME
= $(PKG_BNAME
)$(PKG_SEP
)$(PKG_FLAVOUR
)
204 PKG_FNAME
= $(PKG_QNAME
)-$(PKG_TAG
)
206 PKG_DOC
= "OpenDocumentText exporter for Orgmode"
209 PKG_LISP_FILES
= $(LISPFILES0
)
210 PKG_INFO_FILES
= doc
/org doc
/dir
211 # PKG_DOC_FILES = doc/org.pdf \
216 # doc/orgcard_letter.pdf
218 PKG_DATA_DIRS
= contrib
/odt
219 PKG_README_ORG_FILE
= doc
/ReleaseNotes.org
220 PKG_README_HTML_FILE
= $(PKG_README_ORG_FILE
:.org
=.html
)
223 PKG_UPLOAD_DIR
= packages
226 BATCH_EXTRA
= -eval
"(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
229 .SUFFIXES
: .el .elc .texi
232 # Additional distribution files
233 DISTFILES_extra
= Makefile request-assign-future.txt contrib
235 default
: $(ELCFILES
) $(ELCBFILES
)
237 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
247 compile
: $(ELCFILES0
) $(ELCBFILES
)
249 install: install-lisp
251 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
254 ${MAKE} pdf
&& open doc
/org.pdf
257 ${MAKE} pdf
&& open doc
/orgguide.pdf
259 install-lisp
: $(LISPFILES
) $(ELCFILES
)
260 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
261 $(CP
) $(LISPFILES
) $(lispdir
)
262 $(CP
) $(ELCFILES
) $(lispdir
)
264 install-info
: $(INFOFILES
)
265 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
266 $(CP
) $(INFOFILES
) $(infodir)
267 $(INSTALL_INFO
) --info-file
=$(INFOFILES
) --info-dir
=$(infodir)
269 install-info-debian
: $(INFOFILES
)
270 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
272 autoloads
: lisp
/org-install.el
274 lisp
/org-install.el
: $(LISPFILES0
) Makefile
275 $(BATCH
) --eval
"(require 'autoload)" \
276 --eval
'(find-file "org-install.el")' \
277 --eval
'(erase-buffer)' \
278 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
279 --eval
'(insert "\n(provide (quote org-install))\n")' \
280 --eval
'(save-buffer)'
281 mv org-install.el lisp
283 doc
/org
: doc
/org.texi
284 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
286 doc
/org.pdf
: doc
/org.texi
287 (cd doc
&& $(TEXI2PDF
) org.texi
)
289 doc
/orgguide.pdf
: doc
/orgguide.texi
290 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
292 doc
/org.html
: doc
/org.texi
293 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
294 UTILITIES
/manfull.pl doc
/org.html
296 doc
/orgcard.pdf
: doc
/orgcard.
tex
297 (cd doc
&& pdftex orgcard.
tex)
299 doc
/orgcard.txt
: doc
/orgcard.
tex
300 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
302 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
303 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
304 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
306 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
307 (cd doc
&& pdftex orgcard_letter.
tex)
309 # Below here are special targets for maintenance only
313 html_manual
: doc
/org.texi
316 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
317 UTILITIES
/mansplit.pl doc
/manual
/*.html
319 html_guide
: doc
/orgguide.texi
322 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
323 UTILITIES
/guidesplit.pl doc
/guide
/*.html
327 pdf
: doc
/org.pdf doc
/orgguide.pdf
329 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
332 git checkout
-b testrelease maint
333 git merge
-s recursive
-X theirs master
334 UTILITIES
/set-version.pl testing
335 git commit
-a
-m
"Release testing"
336 make distfile TAG
=testversion
338 rm -rf org-testversion
*
341 git branch
-D testrelease
343 # The following target makes a full release for the stuff that is
344 # currently on master. Do it like this:
346 # make release TAG=7.01
350 git merge
-s recursive
-X theirs master
351 UTILITIES
/set-version.pl
$(TAG
)
352 git commit
-a
-m
"Release $(TAG)"
353 make relup TAG
=$(TAG
)
356 rm -f org-
$(TAG
)*.zip
357 rm -f org-
$(TAG
)*.
tar.gz
358 make pushreleasetag TAG
=$(TAG
)
359 git push
-f
origin maint
361 git merge
-s ours maint
362 UTILITIES
/set-version.pl
-a
$(TAG
)
363 git commit
-a
-m
"Update website to show $(TAG) as current release"
366 # The following target makes a release, but from the stuff that is on
367 # maint, not from the stuff that is on master. The idea is that it pushes
368 # out a minor fix into a minor update, while development on master
369 # already went full steam ahead. To make a micro-relesse, cherry-pick
370 # the necessary changes into maint, then run (with proper version number)
371 # This is just like release, but we skip the step which merges master
374 # make fixrelease TAG=7.01.02
378 git merge
-s recursive
-X theirs master
379 UTILITIES
/set-version.pl
$(TAG
)
380 git commit
-a
-m
"Release $(TAG)"
381 make relup TAG
=$(TAG
)
385 rm org-
$(TAG
)*.
tar.gz
386 make pushreleasetag TAG
=$(TAG
)
387 git push
-f
origin maint
389 git merge
-s ours maint
390 UTILITIES
/set-version.pl
-o
$(TAG
)
391 git commit
-a
-m
"Update website to show $(TAG) as current release"
394 # ~$ make relup only makes sense from orgmode.org server
395 # Don't call it from your computer!
402 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
405 UTILITIES
/gplmanual.pl
410 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
411 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
412 cp doc
/org_dual_license.texi RELEASEDIR
413 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
414 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
415 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
417 # ~$ make sync_release only makes sense from orgmode.org server
418 # Don't call it from your computer!
420 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
422 # ~$ make sync_manual only makes sense from orgmode.org server
423 # Don't call it from your computer!
425 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
426 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
429 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
430 touch doc
/org.texi doc
/orgcard.
tex # force update
434 ${MAKE} lisp
/org-install.el
435 rm -rf org-
$(TAG
) org-
$(TAG
).zip
437 $(MKDIR
) org-
$(TAG
)/doc
438 $(MKDIR
) org-
$(TAG
)/lisp
439 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
440 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
441 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
442 cp
-r README_DIST org-
$(TAG
)/README
443 zip
-r org-
$(TAG
).zip org-
$(TAG
)
444 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
447 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
448 echo
"Building $(PKG_FNAME).tar ..."
449 touch doc
/org.texi doc
/orgcard.
tex # force update
450 rm -rf
$(PKG_FNAME
) $(PKG_FNAME
).
tar
451 $(MKDIR
) $(PKG_FNAME
)
452 cp
-r
$(PKG_LISP_FILES
) $(PKG_FNAME
)
457 echo
"(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > $(PKG_FNAME
)/$(PKG_QNAME
)-pkg.el
458 tar cf
$(PKG_FNAME
).
tar $(PKG_FNAME
) --remove-files
461 pkg-data
: $(PKG_DATA_DIRS
)
462 @if
[ "X$(PKG_DATA_DIRS)" = "X" ]; \
463 then echo
"*** WARNING: PKG_DATA_DIRS not defined ***"; \
466 mkdir
-p
$(PKG_FNAME
)/$<; \
467 cp
-r
$</* $(PKG_FNAME
)/$<; \
470 pkg-info
: $(PKG_INFO_FILES
)
471 cp
-r
$(PKG_INFO_FILES
) $(PKG_FNAME
)
473 pkg-doc
: $(PKG_DOC_FILES
)
474 @if
[ "X$(PKG_DOC_FILES)" = "X" ]; \
475 then echo
"*** WARNING: PKG_DOC_FILES not defined ***"; \
477 $(MKDIR
) $(PKG_FNAME
)/doc
; \
478 cp
-r
$(PKG_DOC_FILES
) $(PKG_FNAME
)/doc
; \
482 $(MKDIR
) $(PKG_FNAME
)
483 cp
$(PKG_README_ORG_FILE
) $(PKG_FNAME
)/README.org
485 --eval
"(require 'org-ascii)" \
486 --visit
=$(PKG_FNAME
)/README.org \
487 --eval
"(org-export-as-ascii 3 t)"
488 cp
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README
489 rm -f
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README.org
492 @if
[ "X$(PKG_UPLOAD_DIR)" = "X" ]; \
493 then echo
"*** WARNING: Skipping Upload of $(PKG_FNAME).tar ***"; \
495 echo
"Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ..."; \
496 $(MKDIR
) $(PKG_UPLOAD_DIR
); \
497 rm -f
$(PKG_UPLOAD_DIR
)/archive-contents
; \
498 $(BATCH
) $(BATCH_EXTRA
) \
499 --eval
'(toggle-debug-on-error)' \
500 --eval
"(require 'package-x)" \
501 --eval
'(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")' \
502 --eval
'(setq package-update-news-on-upload nil)' \
503 --eval
'(package-upload-file (expand-file-name "$(PKG_FNAME).tar"))'; \
505 --eval
"(require 'org-html)" \
506 --visit
=$(PKG_README_ORG_FILE
) \
507 --eval
"(org-export-as-html 3 t)"; \
508 mv
$(PKG_README_HTML_FILE
) $(PKG_UPLOAD_DIR
)/README.html
; \
513 rm -f lisp
/org-install.el
522 find contrib
-name \
*~
-exec
rm {} \
;
527 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
528 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
529 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
530 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
531 -(cd doc
&& rm -rf manual
)
536 rm -rf org-7
*zip org-7
*tar.gz
543 git-push orgmode@orgmode.org
:org-mode.git master
546 git-tag
-m
"Adding tag" -a
$(TAG
)
547 git-push orgmode@orgmode.org
:org-mode.git
$(TAG
)
550 git-tag
-m
"Adding release tag" -a release_
$(TAG
)
551 git-push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
555 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
556 lisp
/org-agenda.elc
: lisp
/org.el
557 lisp
/org-ascii.elc
: lisp
/org-exp.el
558 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
559 lisp
/org-archive.elc
: lisp
/org.el
560 lisp
/org-bbdb.elc
: lisp
/org.el
561 lisp
/org-beamer.elc
: lisp
/org.el
562 lisp
/org-bibtex.elc
: lisp
/org.el
563 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
564 lisp
/org-clock.elc
: lisp
/org.el
565 lisp
/org-colview.elc
: lisp
/org.el
566 lisp
/org-colview-xemacs.elc
: lisp
/org.el
567 lisp
/org-compat.elc
: lisp
/org-macs.el
568 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
569 lisp
/org-ctags.elc
: lisp
/org.el
570 lisp
/org-datetree.elc
: lisp
/org.el
571 lisp
/org-docview.elc
: lisp
/org.el
572 lisp
/org-entities.elc
:
573 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
574 lisp
/org-exp-blocks.elc
: lisp
/org.el
575 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
576 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
577 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
578 lisp
/org-feed.elc
: lisp
/org.el
579 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
580 lisp
/org-freemind.elc
: lisp
/org.el
581 lisp
/org-gnus.elc
: lisp
/org.el
582 lisp
/org-html.elc
: lisp
/org-exp.el
583 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
584 lisp
/org-icalendar.elc
: lisp
/org-exp.el
585 lisp
/org-id.elc
: lisp
/org.el
586 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
587 lisp
/org-info.elc
: lisp
/org.el
588 lisp
/org-inlinetask.elc
:
589 lisp
/org-irc.elc
: lisp
/org.el
590 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
591 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
592 lisp
/org-mac-message.elc
: lisp
/org.el
594 lisp
/org-mew.elc
: lisp
/org.el
595 lisp
/org-mhe.elc
: lisp
/org.el
597 lisp
/org-mobile.elc
: lisp
/org.el
598 lisp
/org-mouse.elc
: lisp
/org.el
599 lisp
/org-odt.elc
: lisp
/org-html.el
600 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
601 lisp
/org-publish.elc
:
602 lisp
/org-protocol.elc
: lisp
/org.el
603 lisp
/org-remember.elc
: lisp
/org.el
604 lisp
/org-rmail.elc
: lisp
/org.el
605 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
606 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
607 lisp
/org-table.elc
: lisp
/org.el
608 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
609 lisp
/org-timer.elc
: lisp
/org.el
610 lisp
/org-vm.elc
: lisp
/org.el
611 lisp
/org-w3m.elc
: lisp
/org.el
612 lisp
/org-wl.elc
: lisp
/org.el
613 lisp
/org-xoxo.elc
: lisp
/org-exp.el