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
39 TEXI2PDF
= texify
--pdf
41 # How to create directories
44 # How to create the info files from the texinfo file
47 # How to create the HTML file
48 TEXI2HTML
= makeinfo --html
--number-sections
49 TEXI2HTMLNOPSLIT
= makeinfo --html
--no-split
--number-sections
51 # How to copy the lisp files and elc files to their distination.
54 # Name of the program to install info files
55 INSTALL_INFO
=install-info
57 ##----------------------------------------------------------------------
58 ## BELOW THIS LINE ON YOUR OWN RISK!
59 ##----------------------------------------------------------------------
61 # The following variables need to be defined by the maintainer
73 org-colview-xemacs.el \
114 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)
183 # |---------------------------------------+----------------------+--------------|
184 # | Invocation | Output | Side-Effects |
185 # |---------------------------------------+----------------------+--------------|
186 # | make pkg | org-20110518.tar | |
187 # | make PKG_TAG=7.3 pkg | org-7.3.tar | |
188 # | make PKG_FLAVOUR=odt pkg | org-odt-20110518.tar | |
189 # |---------------------------------------+----------------------+--------------|
193 # make PKG_EL_DIR="~/elisp" PKG_UPLOAD_DIR="~/packages/" PKG_TAG=7.3 pkg
195 # Invocation shown above builds org-7.3.tar and uploads the same to
196 # "~/packages" using package-x.el in "~/elisp/".
201 PKG_TAG
= $(shell date
+%Y
%m
%d
)
209 PKG_QNAME
= $(PKG_BNAME
)$(PKG_SEP
)$(PKG_FLAVOUR
)
210 PKG_FNAME
= $(PKG_QNAME
)-$(PKG_TAG
)
212 PKG_DOC
= "OpenDocument Text exporter for Orgmode"
214 PKG_REQ
= ((org
\"20111031\"))
216 PKG_LISP_FILES
= contrib
/lisp
/org-lparse.el \
217 contrib
/lisp
/org-odt.el
219 ifndef PKG_LISP_FILES
220 PKG_LISP_FILES
= $(LISPFILES0
)
223 PKG_INFO_FILES
= doc
/org-odt doc
/dir
224 PKG_DOC_FILES
= doc
/org-odt.pdf
226 PKG_DATA_SRC_DIRS
= contrib
/odt
228 PKG_README_ORG_FILE
= contrib
/odt
/README.org
229 PKG_README_HTML_FILE
= $(PKG_README_ORG_FILE
:.org
=.html
)
232 PKG_UPLOAD_DIR
= packages
235 BATCH_EXTRA
= -eval
"(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
238 .SUFFIXES
: .el .elc .texi
241 # Additional distribution files
242 DISTFILES_extra
= Makefile request-assign-future.txt contrib
244 default
: $(ELCFILES
) $(ELCBFILES
)
246 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
256 compile
: $(ELCFILES0
) $(ELCBFILES
)
258 install: install-lisp
260 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
263 ${MAKE} pdf
&& open doc
/org.pdf
266 ${MAKE} pdf
&& open doc
/orgguide.pdf
268 install-lisp
: $(LISPFILES
) $(ELCFILES
)
269 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
270 $(CP
) $(LISPFILES
) $(lispdir
)
271 $(CP
) $(ELCFILES
) $(lispdir
)
273 install-info
: $(INFOFILES
)
274 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
275 $(CP
) $(INFOFILES
) $(infodir)
276 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
278 autoloads
: lisp
/org-install.el
280 lisp
/org-install.el
: $(LISPFILES0
) Makefile
281 $(BATCH
) --eval
"(require 'autoload)" \
282 --eval
'(find-file "lisp/org-install.el")' \
283 --eval
'(erase-buffer)' \
284 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
285 --eval
'(insert "\n(provide (quote org-install))\n")' \
286 --eval
'(save-buffer)'
288 doc
/org
: doc
/org.texi
289 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
291 doc
/org.pdf
: doc
/org.texi
292 (cd doc
&& $(TEXI2PDF
) org.texi
)
294 doc
/orgguide.pdf
: doc
/orgguide.texi
295 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
297 doc
/org.html
: doc
/org.texi
298 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
299 UTILITIES
/manfull.pl doc
/org.html
301 doc
/orgcard.pdf
: doc
/orgcard.
tex
302 (cd doc
&& pdftex orgcard.
tex)
304 doc
/orgcard.txt
: doc
/orgcard.
tex
305 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
307 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
308 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
309 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
311 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
312 (cd doc
&& pdftex orgcard_letter.
tex)
314 # Below here are special targets for maintenance only
318 html_manual
: doc
/org.texi
321 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
322 UTILITIES
/mansplit.pl doc
/manual
/*.html
324 html_guide
: doc
/orgguide.texi
327 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
328 UTILITIES
/guidesplit.pl doc
/guide
/*.html
332 pdf
: doc
/org.pdf doc
/orgguide.pdf
334 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
337 git checkout
-b testrelease
origin/maint
338 git merge
-s recursive
-X theirs master
339 UTILITIES
/set-version.pl testing
340 git commit
-a
-m
"Release testing"
341 make distfile TAG
=testversion
343 rm -rf org-testversion
*
346 git branch
-D testrelease
348 # The following target makes a full release for the stuff that is
349 # currently on master. Do it like this:
351 # make release TAG=7.01
355 git merge
-s recursive
-X theirs master
356 UTILITIES
/set-version.pl
$(TAG
)
357 git commit
-a
-m
"Release $(TAG)"
358 make relup TAG
=$(TAG
)
361 rm -f org-
$(TAG
)*.zip
362 rm -f org-
$(TAG
)*.
tar.gz
363 make pushreleasetag TAG
=$(TAG
)
364 git push
-f
origin maint
366 git merge
-s ours maint
367 UTILITIES
/set-version.pl
-a
$(TAG
)
368 git commit
-a
-m
"Update website to show $(TAG) as current release"
371 # The following target makes a release, but from the stuff that is on
372 # maint, not from the stuff that is on master. The idea is that it pushes
373 # out a minor fix into a minor update, while development on master
374 # already went full steam ahead. To make a micro-relesse, cherry-pick
375 # the necessary changes into maint, then run (with proper version number)
376 # This is just like release, but we skip the step which merges master
379 # make fixrelease TAG=7.01.02
383 git merge
-s recursive
-X theirs master
384 UTILITIES
/set-version.pl
$(TAG
)
385 git commit
-a
-m
"Release $(TAG)"
386 make relup TAG
=$(TAG
)
390 rm org-
$(TAG
)*.
tar.gz
391 make pushreleasetag TAG
=$(TAG
)
392 git push
-f
origin maint
394 git merge
-s ours maint
395 UTILITIES
/set-version.pl
-o
$(TAG
)
396 git commit
-a
-m
"Update website to show $(TAG) as current release"
399 # ~$ make relup only makes sense from orgmode.org server
400 # Don't call it from your computer!
407 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
410 UTILITIES
/gplmanual.pl
415 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
416 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
417 cp doc
/org_dual_license.texi RELEASEDIR
418 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
419 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
420 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
422 # ~$ make sync_release only makes sense from orgmode.org server
423 # Don't call it from your computer!
425 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
427 # ~$ make sync_manual only makes sense from orgmode.org server
428 # Don't call it from your computer!
430 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
431 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
434 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
435 touch doc
/org.texi doc
/orgcard.
tex # force update
439 ${MAKE} lisp
/org-install.el
440 rm -rf org-
$(TAG
) org-
$(TAG
).zip
442 $(MKDIR
) org-
$(TAG
)/doc
443 $(MKDIR
) org-
$(TAG
)/lisp
444 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
445 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
446 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
447 cp
-r README_DIST org-
$(TAG
)/README
448 zip
-r org-
$(TAG
).zip org-
$(TAG
)
449 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
452 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
453 echo
"Building $(PKG_FNAME).tar ..."
454 touch doc
/org-odt.texi doc
/orgcard.
tex # force update
455 rm -rf
$(PKG_FNAME
) $(PKG_FNAME
).
tar
456 $(MKDIR
) $(PKG_FNAME
)
457 cp
-r
$(PKG_LISP_FILES
) $(PKG_FNAME
)
462 echo
"(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" '$(PKG_REQ))" > $(PKG_FNAME
)/$(PKG_QNAME
)-pkg.el
463 tar cf
$(PKG_FNAME
).
tar $(PKG_FNAME
) --remove-files
466 pkg-data
: $(PKG_DATA_SRC_DIRS
)
467 @if
[ "X$(PKG_DATA_SRC_DIRS)" = "X" ]; \
468 then echo
"*** WARNING: PKG_DATA_SRC_DIRS not defined ***"; \
471 mkdir
-p
$(PKG_FNAME
)/$(PKG_DATA_DST_DIRS
); \
472 cp
-r
$</* $(PKG_FNAME
)/$(PKG_DATA_DST_DIRS
); \
475 doc
/org-odt
: doc
/org-odt.texi
476 (cd doc
&& $(MAKEINFO
) --no-split org-odt.texi
-o org-odt
)
478 doc
/org-odt.pdf
: doc
/org-odt.texi
479 (cd doc
&& $(TEXI2PDF
) org-odt.texi
)
481 pkg-info
: $(PKG_INFO_FILES
)
482 cp
-r
$(PKG_INFO_FILES
) $(PKG_FNAME
)
484 pkg-doc
: $(PKG_DOC_FILES
)
485 @if
[ "X$(PKG_DOC_FILES)" = "X" ]; \
486 then echo
"*** WARNING: PKG_DOC_FILES not defined ***"; \
488 $(MKDIR
) $(PKG_FNAME
)/doc
; \
489 cp
-r
$(PKG_DOC_FILES
) $(PKG_FNAME
)/doc
; \
493 $(MKDIR
) $(PKG_FNAME
)
494 cp
$(PKG_README_ORG_FILE
) $(PKG_FNAME
)/README.org
496 --eval
"(require 'org-ascii)" \
497 --visit
=$(PKG_FNAME
)/README.org \
498 --eval
"(org-export-as-ascii 3 t)"
499 cp
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README
500 rm -f
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README.org
503 @if
[ "X$(PKG_UPLOAD_DIR)" = "X" ]; \
504 then echo
"*** WARNING: Skipping Upload of $(PKG_FNAME).tar ***"; \
506 echo
"Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ..."; \
507 $(MKDIR
) $(PKG_UPLOAD_DIR
); \
508 rm -f
$(PKG_UPLOAD_DIR
)/archive-contents
; \
509 $(BATCH
) $(BATCH_EXTRA
) \
510 --eval
'(toggle-debug-on-error)' \
511 --eval
"(require 'package-x)" \
512 --eval
'(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")' \
513 --eval
'(setq package-update-news-on-upload nil)' \
514 --eval
'(package-upload-file (expand-file-name "$(PKG_FNAME).tar"))'; \
516 --eval
"(require 'org-html)" \
517 --visit
=$(PKG_README_ORG_FILE
) \
518 --eval
"(org-export-as-html 3 t)"; \
519 mv
$(PKG_README_HTML_FILE
) $(PKG_UPLOAD_DIR
)/README.html
; \
524 rm -f lisp
/org-install.el
533 find contrib
-name \
*~
-exec
rm {} \
;
538 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
539 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
540 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
541 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
542 -(cd doc
&& rm -rf manual
)
547 rm -rf org-7
*zip org-7
*tar.gz
554 git push orgmode@orgmode.org
:org-mode.git master
557 git tag
-m
"Adding tag" -a
$(TAG
)
558 git push orgmode@orgmode.org
:org-mode.git
$(TAG
)
561 git tag
-m
"Adding release tag" -a release_
$(TAG
)
562 git push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
566 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
567 lisp
/org-agenda.elc
: lisp
/org.el
568 lisp
/org-ascii.elc
: lisp
/org-exp.el
569 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
570 lisp
/org-archive.elc
: lisp
/org.el
571 lisp
/org-bbdb.elc
: lisp
/org.el
572 lisp
/org-beamer.elc
: lisp
/org.el
573 lisp
/org-bibtex.elc
: lisp
/org.el
574 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
575 lisp
/org-clock.elc
: lisp
/org.el
576 lisp
/org-colview.elc
: lisp
/org.el
577 lisp
/org-colview-xemacs.elc
: lisp
/org.el
578 lisp
/org-compat.elc
: lisp
/org-macs.el
579 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
580 lisp
/org-ctags.elc
: lisp
/org.el
581 lisp
/org-datetree.elc
: lisp
/org.el
582 lisp
/org-docview.elc
: lisp
/org.el
583 lisp
/org-entities.elc
:
584 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
585 lisp
/org-exp-blocks.elc
: lisp
/org.el
586 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
587 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
588 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
589 lisp
/org-feed.elc
: lisp
/org.el
590 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
591 lisp
/org-freemind.elc
: lisp
/org.el
592 lisp
/org-gnus.elc
: lisp
/org.el
593 lisp
/org-html.elc
: lisp
/org-exp.el lisp
/org-lparse.el
594 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
595 lisp
/org-icalendar.elc
: lisp
/org-exp.el
596 lisp
/org-id.elc
: lisp
/org.el
597 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
598 lisp
/org-info.elc
: lisp
/org.el
599 lisp
/org-inlinetask.elc
:
600 lisp
/org-irc.elc
: lisp
/org.el
601 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
602 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
603 lisp
/org-lparse.elc
: lisp
/org-exp.el
604 lisp
/org-mac-message.elc
: lisp
/org.el
606 lisp
/org-mew.elc
: lisp
/org.el
607 lisp
/org-mhe.elc
: lisp
/org.el
609 lisp
/org-mobile.elc
: lisp
/org.el
610 lisp
/org-mouse.elc
: lisp
/org.el
611 lisp
/org-odt.elc
: lisp
/org-lparse.el
612 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
613 lisp
/org-publish.elc
:
614 lisp
/org-protocol.elc
: lisp
/org.el
615 lisp
/org-remember.elc
: lisp
/org.el
616 lisp
/org-rmail.elc
: lisp
/org.el
617 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
618 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
619 lisp
/org-table.elc
: lisp
/org.el
620 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
621 lisp
/org-timer.elc
: lisp
/org.el
622 lisp
/org-vm.elc
: lisp
/org.el
623 lisp
/org-w3m.elc
: lisp
/org.el
624 lisp
/org-wl.elc
: lisp
/org.el
625 lisp
/org-xoxo.elc
: lisp
/org-exp.el
627 # Describe valid make targets for org-mode.
629 @echo
"make - compile Org ELisp files"
630 @echo
"make clean - clean Elisp and documentation files"
631 @echo
"make all - compile Org ELisp files and documentation"
633 @echo
"make doc - make all documentation"
634 @echo
"make info - make Info documentation"
635 @echo
"make html - make HTML documentation"
636 @echo
"make pdf - make pdf documentation"
637 @echo
"make card - make refcards documentation"
639 @echo
"make install - install Org"
640 @echo
"make install-lisp - install Org ELisp files"
641 @echo
"make install-info - install Org Info file"