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"
210 PKG_LISP_FILES
= $(LISPFILES0
)
211 PKG_INFO_FILES
= doc
/org doc
/dir
212 # PKG_DOC_FILES = doc/org.pdf \
217 # doc/orgcard_letter.pdf
219 PKG_DATA_DIRS
= contrib
/odt
220 PKG_README_ORG_FILE
= doc
/ReleaseNotes.org
221 PKG_README_HTML_FILE
= $(PKG_README_ORG_FILE
:.org
=.html
)
224 PKG_UPLOAD_DIR
= packages
227 BATCH_EXTRA
= -eval
"(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
230 .SUFFIXES
: .el .elc .texi
233 # Additional distribution files
234 DISTFILES_extra
= Makefile request-assign-future.txt contrib
236 default
: $(ELCFILES
) $(ELCBFILES
)
238 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
248 compile
: $(ELCFILES0
) $(ELCBFILES
)
250 install: install-lisp
252 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
255 ${MAKE} pdf
&& open doc
/org.pdf
258 ${MAKE} pdf
&& open doc
/orgguide.pdf
260 install-lisp
: $(LISPFILES
) $(ELCFILES
)
261 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
262 $(CP
) $(LISPFILES
) $(lispdir
)
263 $(CP
) $(ELCFILES
) $(lispdir
)
265 install-info
: $(INFOFILES
)
266 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
267 $(CP
) $(INFOFILES
) $(infodir)
268 $(INSTALL_INFO
) --info-file
=$(INFOFILES
) --info-dir
=$(infodir)
270 install-info-debian
: $(INFOFILES
)
271 $(INSTALL_INFO
) --infodir=$(infodir) $(INFOFILES
)
273 autoloads
: lisp
/org-install.el
275 lisp
/org-install.el
: $(LISPFILES0
) Makefile
276 $(BATCH
) --eval
"(require 'autoload)" \
277 --eval
'(find-file "org-install.el")' \
278 --eval
'(erase-buffer)' \
279 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
280 --eval
'(insert "\n(provide (quote org-install))\n")' \
281 --eval
'(save-buffer)'
282 mv org-install.el lisp
284 doc
/org
: doc
/org.texi
285 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
287 doc
/org.pdf
: doc
/org.texi
288 (cd doc
&& $(TEXI2PDF
) org.texi
)
290 doc
/orgguide.pdf
: doc
/orgguide.texi
291 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
293 doc
/org.html
: doc
/org.texi
294 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
295 UTILITIES
/manfull.pl doc
/org.html
297 doc
/orgcard.pdf
: doc
/orgcard.
tex
298 (cd doc
&& pdftex orgcard.
tex)
300 doc
/orgcard.txt
: doc
/orgcard.
tex
301 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
303 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
304 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
305 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
307 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
308 (cd doc
&& pdftex orgcard_letter.
tex)
310 # Below here are special targets for maintenance only
314 html_manual
: doc
/org.texi
317 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
318 UTILITIES
/mansplit.pl doc
/manual
/*.html
320 html_guide
: doc
/orgguide.texi
323 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
324 UTILITIES
/guidesplit.pl doc
/guide
/*.html
328 pdf
: doc
/org.pdf doc
/orgguide.pdf
330 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
333 git checkout
-b testrelease maint
334 git merge
-s recursive
-X theirs master
335 UTILITIES
/set-version.pl testing
336 git commit
-a
-m
"Release testing"
337 make distfile TAG
=testversion
339 rm -rf org-testversion
*
342 git branch
-D testrelease
344 # The following target makes a full release for the stuff that is
345 # currently on master. Do it like this:
347 # make release TAG=7.01
351 git merge
-s recursive
-X theirs master
352 UTILITIES
/set-version.pl
$(TAG
)
353 git commit
-a
-m
"Release $(TAG)"
354 make relup TAG
=$(TAG
)
357 rm -f org-
$(TAG
)*.zip
358 rm -f org-
$(TAG
)*.
tar.gz
359 make pushreleasetag TAG
=$(TAG
)
360 git push
-f
origin maint
362 git merge
-s ours maint
363 UTILITIES
/set-version.pl
-a
$(TAG
)
364 git commit
-a
-m
"Update website to show $(TAG) as current release"
367 # The following target makes a release, but from the stuff that is on
368 # maint, not from the stuff that is on master. The idea is that it pushes
369 # out a minor fix into a minor update, while development on master
370 # already went full steam ahead. To make a micro-relesse, cherry-pick
371 # the necessary changes into maint, then run (with proper version number)
372 # This is just like release, but we skip the step which merges master
375 # make fixrelease TAG=7.01.02
379 git merge
-s recursive
-X theirs master
380 UTILITIES
/set-version.pl
$(TAG
)
381 git commit
-a
-m
"Release $(TAG)"
382 make relup TAG
=$(TAG
)
386 rm org-
$(TAG
)*.
tar.gz
387 make pushreleasetag TAG
=$(TAG
)
388 git push
-f
origin maint
390 git merge
-s ours maint
391 UTILITIES
/set-version.pl
-o
$(TAG
)
392 git commit
-a
-m
"Update website to show $(TAG) as current release"
395 # ~$ make relup only makes sense from orgmode.org server
396 # Don't call it from your computer!
403 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
406 UTILITIES
/gplmanual.pl
411 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
412 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
413 cp doc
/org_dual_license.texi RELEASEDIR
414 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
415 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
416 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
418 # ~$ make sync_release only makes sense from orgmode.org server
419 # Don't call it from your computer!
421 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
423 # ~$ make sync_manual only makes sense from orgmode.org server
424 # Don't call it from your computer!
426 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
427 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
430 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
431 touch doc
/org.texi doc
/orgcard.
tex # force update
435 ${MAKE} lisp
/org-install.el
436 rm -rf org-
$(TAG
) org-
$(TAG
).zip
438 $(MKDIR
) org-
$(TAG
)/doc
439 $(MKDIR
) org-
$(TAG
)/lisp
440 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
441 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
442 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
443 cp
-r README_DIST org-
$(TAG
)/README
444 zip
-r org-
$(TAG
).zip org-
$(TAG
)
445 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
448 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
449 echo
"Building $(PKG_FNAME).tar ..."
450 touch doc
/org.texi doc
/orgcard.
tex # force update
451 rm -rf
$(PKG_FNAME
) $(PKG_FNAME
).
tar
452 $(MKDIR
) $(PKG_FNAME
)
453 cp
-r
$(PKG_LISP_FILES
) $(PKG_FNAME
)
458 echo
"(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > $(PKG_FNAME
)/$(PKG_QNAME
)-pkg.el
459 tar cf
$(PKG_FNAME
).
tar $(PKG_FNAME
) --remove-files
462 pkg-data
: $(PKG_DATA_DIRS
)
463 @if
[ "X$(PKG_DATA_DIRS)" = "X" ]; \
464 then echo
"*** WARNING: PKG_DATA_DIRS not defined ***"; \
467 mkdir
-p
$(PKG_FNAME
)/$<; \
468 cp
-r
$</* $(PKG_FNAME
)/$<; \
471 pkg-info
: $(PKG_INFO_FILES
)
472 cp
-r
$(PKG_INFO_FILES
) $(PKG_FNAME
)
474 pkg-doc
: $(PKG_DOC_FILES
)
475 @if
[ "X$(PKG_DOC_FILES)" = "X" ]; \
476 then echo
"*** WARNING: PKG_DOC_FILES not defined ***"; \
478 $(MKDIR
) $(PKG_FNAME
)/doc
; \
479 cp
-r
$(PKG_DOC_FILES
) $(PKG_FNAME
)/doc
; \
483 $(MKDIR
) $(PKG_FNAME
)
484 cp
$(PKG_README_ORG_FILE
) $(PKG_FNAME
)/README.org
486 --eval
"(require 'org-ascii)" \
487 --visit
=$(PKG_FNAME
)/README.org \
488 --eval
"(org-export-as-ascii 3 t)"
489 cp
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README
490 rm -f
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README.org
493 @if
[ "X$(PKG_UPLOAD_DIR)" = "X" ]; \
494 then echo
"*** WARNING: Skipping Upload of $(PKG_FNAME).tar ***"; \
496 echo
"Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ..."; \
497 $(MKDIR
) $(PKG_UPLOAD_DIR
); \
498 rm -f
$(PKG_UPLOAD_DIR
)/archive-contents
; \
499 $(BATCH
) $(BATCH_EXTRA
) \
500 --eval
'(toggle-debug-on-error)' \
501 --eval
"(require 'package-x)" \
502 --eval
'(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")' \
503 --eval
'(setq package-update-news-on-upload nil)' \
504 --eval
'(package-upload-file (expand-file-name "$(PKG_FNAME).tar"))'; \
506 --eval
"(require 'org-html)" \
507 --visit
=$(PKG_README_ORG_FILE
) \
508 --eval
"(org-export-as-html 3 t)"; \
509 mv
$(PKG_README_HTML_FILE
) $(PKG_UPLOAD_DIR
)/README.html
; \
514 rm -f lisp
/org-install.el
523 find contrib
-name \
*~
-exec
rm {} \
;
528 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
529 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
530 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
531 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
532 -(cd doc
&& rm -rf manual
)
537 rm -rf org-7
*zip org-7
*tar.gz
544 git-push orgmode@orgmode.org
:org-mode.git master
547 git-tag
-m
"Adding tag" -a
$(TAG
)
548 git-push orgmode@orgmode.org
:org-mode.git
$(TAG
)
551 git-tag
-m
"Adding release tag" -a release_
$(TAG
)
552 git-push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
556 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
557 lisp
/org-agenda.elc
: lisp
/org.el
558 lisp
/org-ascii.elc
: lisp
/org-exp.el
559 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
560 lisp
/org-archive.elc
: lisp
/org.el
561 lisp
/org-bbdb.elc
: lisp
/org.el
562 lisp
/org-beamer.elc
: lisp
/org.el
563 lisp
/org-bibtex.elc
: lisp
/org.el
564 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
565 lisp
/org-clock.elc
: lisp
/org.el
566 lisp
/org-colview.elc
: lisp
/org.el
567 lisp
/org-colview-xemacs.elc
: lisp
/org.el
568 lisp
/org-compat.elc
: lisp
/org-macs.el
569 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
570 lisp
/org-ctags.elc
: lisp
/org.el
571 lisp
/org-datetree.elc
: lisp
/org.el
572 lisp
/org-docview.elc
: lisp
/org.el
573 lisp
/org-entities.elc
:
574 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
575 lisp
/org-exp-blocks.elc
: lisp
/org.el
576 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
577 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
578 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
579 lisp
/org-feed.elc
: lisp
/org.el
580 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
581 lisp
/org-freemind.elc
: lisp
/org.el
582 lisp
/org-gnus.elc
: lisp
/org.el
583 lisp
/org-html.elc
: lisp
/org-exp.el lisp
/org-lprint.el
584 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
585 lisp
/org-icalendar.elc
: lisp
/org-exp.el
586 lisp
/org-id.elc
: lisp
/org.el
587 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
588 lisp
/org-info.elc
: lisp
/org.el
589 lisp
/org-inlinetask.elc
:
590 lisp
/org-irc.elc
: lisp
/org.el
591 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
592 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
593 lisp
/org-mac-message.elc
: lisp
/org.el
595 lisp
/org-mew.elc
: lisp
/org.el
596 lisp
/org-mhe.elc
: lisp
/org.el
598 lisp
/org-mobile.elc
: lisp
/org.el
599 lisp
/org-mouse.elc
: lisp
/org.el
600 lisp
/org-lprint.elc
: lisp
/org-exp.el
601 lisp
/org-odt.elc
: lisp
/org-lprint.el
602 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
603 lisp
/org-publish.elc
:
604 lisp
/org-protocol.elc
: lisp
/org.el
605 lisp
/org-remember.elc
: lisp
/org.el
606 lisp
/org-rmail.elc
: lisp
/org.el
607 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
608 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
609 lisp
/org-table.elc
: lisp
/org.el
610 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
611 lisp
/org-timer.elc
: lisp
/org.el
612 lisp
/org-vm.elc
: lisp
/org.el
613 lisp
/org-w3m.elc
: lisp
/org.el
614 lisp
/org-wl.elc
: lisp
/org.el
615 lisp
/org-xoxo.elc
: lisp
/org-exp.el