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 \
163 LISPFILES0
= $(LISPF
:%=lisp
/%)
164 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
165 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
166 ELCFILES
= $(LISPFILES
:.el
=.elc
)
167 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir \
168 doc
/pdflayout.sty doc
/.nosearch \
169 doc
/orgguide.texi doc
/orgguide.pdf
170 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
171 TEXIFILES
= doc
/org.texi
174 # Package Manager (ELPA)
178 # |---------------------------------------+----------------------+--------------|
179 # | Invocation | Output | Side-Effects |
180 # |---------------------------------------+----------------------+--------------|
181 # | make pkg | org-20110518.tar | |
182 # | make PKG_TAG=7.3 pkg | org-7.3.tar | |
183 # | make PKG_FLAVOUR=odt pkg | org-odt-20110518.tar | |
184 # |---------------------------------------+----------------------+--------------|
188 # make PKG_EL_DIR="~/elisp" PKG_UPLOAD_DIR="~/packages/" PKG_TAG=7.3 pkg
190 # Invocation shown above builds org-7.3.tar and uploads the same to
191 # "~/packages" using package-x.el in "~/elisp/".
196 PKG_TAG
= $(shell date
+%Y
%m
%d
)
204 PKG_QNAME
= $(PKG_BNAME
)$(PKG_SEP
)$(PKG_FLAVOUR
)
205 PKG_FNAME
= $(PKG_QNAME
)-$(PKG_TAG
)
207 PKG_DOC
= "OpenDocumentText exporter for Orgmode"
209 PKG_REQ
= ((org
\"20110626\"))
211 PKG_LISP_FILES
= lisp
/org-lparse.el lisp
/org-html.el lisp
/org-odt.el
213 ifndef PKG_LISP_FILES
214 PKG_LISP_FILES
= $(LISPFILES0
)
217 PKG_INFO_FILES
= doc
/org doc
/dir
218 # PKG_DOC_FILES = doc/org.pdf \
223 # doc/orgcard_letter.pdf
225 PKG_DATA_DIRS
= contrib
/odt
226 PKG_README_ORG_FILE
= doc
/ReleaseNotes.org
227 PKG_README_HTML_FILE
= $(PKG_README_ORG_FILE
:.org
=.html
)
230 PKG_UPLOAD_DIR
= packages
233 BATCH_EXTRA
= -eval
"(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
236 .SUFFIXES
: .el .elc .texi
239 # Additional distribution files
240 DISTFILES_extra
= Makefile request-assign-future.txt contrib
242 default
: $(ELCFILES
) $(ELCBFILES
)
244 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
254 compile
: $(ELCFILES0
) $(ELCBFILES
)
256 install: install-lisp
258 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
261 ${MAKE} pdf
&& open doc
/org.pdf
264 ${MAKE} pdf
&& open doc
/orgguide.pdf
266 install-lisp
: $(LISPFILES
) $(ELCFILES
)
267 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
268 $(CP
) $(LISPFILES
) $(lispdir
)
269 $(CP
) $(ELCFILES
) $(lispdir
)
271 install-info
: $(INFOFILES
)
272 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
273 $(CP
) $(INFOFILES
) $(infodir)
274 $(INSTALL_INFO
) --info-file
=$(INFOFILES
) --info-dir
=$(infodir)
276 install-info-debian
: $(INFOFILES
)
277 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
279 autoloads
: lisp
/org-install.el
281 lisp
/org-install.el
: $(LISPFILES0
) Makefile
282 $(BATCH
) --eval
"(require 'autoload)" \
283 --eval
'(find-file "org-install.el")' \
284 --eval
'(erase-buffer)' \
285 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
286 --eval
'(insert "\n(provide (quote org-install))\n")' \
287 --eval
'(save-buffer)'
288 mv org-install.el lisp
290 doc
/org
: doc
/org.texi
291 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
293 doc
/org.pdf
: doc
/org.texi
294 (cd doc
&& $(TEXI2PDF
) org.texi
)
296 doc
/orgguide.pdf
: doc
/orgguide.texi
297 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
299 doc
/org.html
: doc
/org.texi
300 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
301 UTILITIES
/manfull.pl doc
/org.html
303 doc
/orgcard.pdf
: doc
/orgcard.
tex
304 (cd doc
&& pdftex orgcard.
tex)
306 doc
/orgcard.txt
: doc
/orgcard.
tex
307 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
309 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
310 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
311 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
313 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
314 (cd doc
&& pdftex orgcard_letter.
tex)
316 # Below here are special targets for maintenance only
320 html_manual
: doc
/org.texi
323 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
324 UTILITIES
/mansplit.pl doc
/manual
/*.html
326 html_guide
: doc
/orgguide.texi
329 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
330 UTILITIES
/guidesplit.pl doc
/guide
/*.html
334 pdf
: doc
/org.pdf doc
/orgguide.pdf
336 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
339 git checkout
-b testrelease maint
340 git merge
-s recursive
-X theirs master
341 UTILITIES
/set-version.pl testing
342 git commit
-a
-m
"Release testing"
343 make distfile TAG
=testversion
345 rm -rf org-testversion
*
348 git branch
-D testrelease
350 # The following target makes a full release for the stuff that is
351 # currently on master. Do it like this:
353 # make release TAG=7.01
357 git merge
-s recursive
-X theirs master
358 UTILITIES
/set-version.pl
$(TAG
)
359 git commit
-a
-m
"Release $(TAG)"
360 make relup TAG
=$(TAG
)
363 rm -f org-
$(TAG
)*.zip
364 rm -f org-
$(TAG
)*.
tar.gz
365 make pushreleasetag TAG
=$(TAG
)
366 git push
-f
origin maint
368 git merge
-s ours maint
369 UTILITIES
/set-version.pl
-a
$(TAG
)
370 git commit
-a
-m
"Update website to show $(TAG) as current release"
373 # The following target makes a release, but from the stuff that is on
374 # maint, not from the stuff that is on master. The idea is that it pushes
375 # out a minor fix into a minor update, while development on master
376 # already went full steam ahead. To make a micro-relesse, cherry-pick
377 # the necessary changes into maint, then run (with proper version number)
378 # This is just like release, but we skip the step which merges master
381 # make fixrelease TAG=7.01.02
385 git merge
-s recursive
-X theirs master
386 UTILITIES
/set-version.pl
$(TAG
)
387 git commit
-a
-m
"Release $(TAG)"
388 make relup TAG
=$(TAG
)
392 rm org-
$(TAG
)*.
tar.gz
393 make pushreleasetag TAG
=$(TAG
)
394 git push
-f
origin maint
396 git merge
-s ours maint
397 UTILITIES
/set-version.pl
-o
$(TAG
)
398 git commit
-a
-m
"Update website to show $(TAG) as current release"
401 # ~$ make relup only makes sense from orgmode.org server
402 # Don't call it from your computer!
409 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
412 UTILITIES
/gplmanual.pl
417 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
418 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
419 cp doc
/org_dual_license.texi RELEASEDIR
420 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
421 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
422 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
424 # ~$ make sync_release only makes sense from orgmode.org server
425 # Don't call it from your computer!
427 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
429 # ~$ make sync_manual only makes sense from orgmode.org server
430 # Don't call it from your computer!
432 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
433 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
436 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
437 touch doc
/org.texi doc
/orgcard.
tex # force update
441 ${MAKE} lisp
/org-install.el
442 rm -rf org-
$(TAG
) org-
$(TAG
).zip
444 $(MKDIR
) org-
$(TAG
)/doc
445 $(MKDIR
) org-
$(TAG
)/lisp
446 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
447 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
448 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
449 cp
-r README_DIST org-
$(TAG
)/README
450 zip
-r org-
$(TAG
).zip org-
$(TAG
)
451 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
454 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
455 echo
"Building $(PKG_FNAME).tar ..."
456 touch doc
/org.texi doc
/orgcard.
tex # force update
457 rm -rf
$(PKG_FNAME
) $(PKG_FNAME
).
tar
458 $(MKDIR
) $(PKG_FNAME
)
459 cp
-r
$(PKG_LISP_FILES
) $(PKG_FNAME
)
464 echo
"(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" '$(PKG_REQ))" > $(PKG_FNAME
)/$(PKG_QNAME
)-pkg.el
465 tar cf
$(PKG_FNAME
).
tar $(PKG_FNAME
) --remove-files
468 pkg-data
: $(PKG_DATA_DIRS
)
469 @if
[ "X$(PKG_DATA_DIRS)" = "X" ]; \
470 then echo
"*** WARNING: PKG_DATA_DIRS not defined ***"; \
473 mkdir
-p
$(PKG_FNAME
)/$<; \
474 cp
-r
$</* $(PKG_FNAME
)/$<; \
477 pkg-info
: $(PKG_INFO_FILES
)
478 cp
-r
$(PKG_INFO_FILES
) $(PKG_FNAME
)
480 pkg-doc
: $(PKG_DOC_FILES
)
481 @if
[ "X$(PKG_DOC_FILES)" = "X" ]; \
482 then echo
"*** WARNING: PKG_DOC_FILES not defined ***"; \
484 $(MKDIR
) $(PKG_FNAME
)/doc
; \
485 cp
-r
$(PKG_DOC_FILES
) $(PKG_FNAME
)/doc
; \
489 $(MKDIR
) $(PKG_FNAME
)
490 cp
$(PKG_README_ORG_FILE
) $(PKG_FNAME
)/README.org
492 --eval
"(require 'org-ascii)" \
493 --visit
=$(PKG_FNAME
)/README.org \
494 --eval
"(org-export-as-ascii 3 t)"
495 cp
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README
496 rm -f
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README.org
499 @if
[ "X$(PKG_UPLOAD_DIR)" = "X" ]; \
500 then echo
"*** WARNING: Skipping Upload of $(PKG_FNAME).tar ***"; \
502 echo
"Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ..."; \
503 $(MKDIR
) $(PKG_UPLOAD_DIR
); \
504 rm -f
$(PKG_UPLOAD_DIR
)/archive-contents
; \
505 $(BATCH
) $(BATCH_EXTRA
) \
506 --eval
'(toggle-debug-on-error)' \
507 --eval
"(require 'package-x)" \
508 --eval
'(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")' \
509 --eval
'(setq package-update-news-on-upload nil)' \
510 --eval
'(package-upload-file (expand-file-name "$(PKG_FNAME).tar"))'; \
512 --eval
"(require 'org-html)" \
513 --visit
=$(PKG_README_ORG_FILE
) \
514 --eval
"(org-export-as-html 3 t)"; \
515 mv
$(PKG_README_HTML_FILE
) $(PKG_UPLOAD_DIR
)/README.html
; \
520 rm -f lisp
/org-install.el
529 find contrib
-name \
*~
-exec
rm {} \
;
534 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
535 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
536 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
537 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
538 -(cd doc
&& rm -rf manual
)
543 rm -rf org-7
*zip org-7
*tar.gz
550 git-push orgmode@orgmode.org
:org-mode.git master
553 git-tag
-m
"Adding tag" -a
$(TAG
)
554 git-push orgmode@orgmode.org
:org-mode.git
$(TAG
)
557 git-tag
-m
"Adding release tag" -a release_
$(TAG
)
558 git-push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
562 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
563 lisp
/org-agenda.elc
: lisp
/org.el
564 lisp
/org-ascii.elc
: lisp
/org-exp.el
565 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
566 lisp
/org-archive.elc
: lisp
/org.el
567 lisp
/org-bbdb.elc
: lisp
/org.el
568 lisp
/org-beamer.elc
: lisp
/org.el
569 lisp
/org-bibtex.elc
: lisp
/org.el
570 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
571 lisp
/org-clock.elc
: lisp
/org.el
572 lisp
/org-colview.elc
: lisp
/org.el
573 lisp
/org-colview-xemacs.elc
: lisp
/org.el
574 lisp
/org-compat.elc
: lisp
/org-macs.el
575 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
576 lisp
/org-ctags.elc
: lisp
/org.el
577 lisp
/org-datetree.elc
: lisp
/org.el
578 lisp
/org-docview.elc
: lisp
/org.el
579 lisp
/org-entities.elc
:
580 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
581 lisp
/org-exp-blocks.elc
: lisp
/org.el
582 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
583 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
584 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
585 lisp
/org-feed.elc
: lisp
/org.el
586 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
587 lisp
/org-freemind.elc
: lisp
/org.el
588 lisp
/org-gnus.elc
: lisp
/org.el
589 lisp
/org-html.elc
: lisp
/org-exp.el lisp
/org-lparse.el
590 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
591 lisp
/org-icalendar.elc
: lisp
/org-exp.el
592 lisp
/org-id.elc
: lisp
/org.el
593 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
594 lisp
/org-info.elc
: lisp
/org.el
595 lisp
/org-inlinetask.elc
:
596 lisp
/org-irc.elc
: lisp
/org.el
597 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
598 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
599 lisp
/org-mac-message.elc
: lisp
/org.el
601 lisp
/org-mew.elc
: lisp
/org.el
602 lisp
/org-mhe.elc
: lisp
/org.el
604 lisp
/org-mobile.elc
: lisp
/org.el
605 lisp
/org-mouse.elc
: lisp
/org.el
606 lisp
/org-lparse.elc
: lisp
/org-exp.el
607 lisp
/org-odt.elc
: lisp
/org-lparse.el
608 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
609 lisp
/org-publish.elc
:
610 lisp
/org-protocol.elc
: lisp
/org.el
611 lisp
/org-remember.elc
: lisp
/org.el
612 lisp
/org-rmail.elc
: lisp
/org.el
613 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
614 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
615 lisp
/org-table.elc
: lisp
/org.el
616 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
617 lisp
/org-timer.elc
: lisp
/org.el
618 lisp
/org-vm.elc
: lisp
/org.el
619 lisp
/org-w3m.elc
: lisp
/org.el
620 lisp
/org-wl.elc
: lisp
/org.el
621 lisp
/org-xoxo.elc
: lisp
/org-exp.el