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
= lisp
/org-lparse.el lisp
/org-html.el lisp
/org-odt.el
212 ifndef PKG_LISP_FILES
213 PKG_LISP_FILES
= $(LISPFILES0
)
216 PKG_INFO_FILES
= doc
/org doc
/dir
217 # PKG_DOC_FILES = doc/org.pdf \
222 # doc/orgcard_letter.pdf
224 PKG_DATA_DIRS
= contrib
/odt
225 PKG_README_ORG_FILE
= doc
/ReleaseNotes.org
226 PKG_README_HTML_FILE
= $(PKG_README_ORG_FILE
:.org
=.html
)
229 PKG_UPLOAD_DIR
= packages
232 BATCH_EXTRA
= -eval
"(setq load-path (cons (expand-file-name \"$(PKG_EL_DIR)\") load-path))"
235 .SUFFIXES
: .el .elc .texi
238 # Additional distribution files
239 DISTFILES_extra
= Makefile request-assign-future.txt contrib
241 default
: $(ELCFILES
) $(ELCBFILES
)
243 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
253 compile
: $(ELCFILES0
) $(ELCBFILES
)
255 install: install-lisp
257 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
260 ${MAKE} pdf
&& open doc
/org.pdf
263 ${MAKE} pdf
&& open doc
/orgguide.pdf
265 install-lisp
: $(LISPFILES
) $(ELCFILES
)
266 if
[ ! -d
$(lispdir
) ]; then
$(MKDIR
) $(lispdir
); else true
; fi
;
267 $(CP
) $(LISPFILES
) $(lispdir
)
268 $(CP
) $(ELCFILES
) $(lispdir
)
270 install-info
: $(INFOFILES
)
271 if
[ ! -d
$(infodir) ]; then
$(MKDIR
) $(infodir); else true
; fi
;
272 $(CP
) $(INFOFILES
) $(infodir)
273 $(INSTALL_INFO
) --info-file
=$(INFOFILES
) --info-dir
=$(infodir)
275 install-info-debian
: $(INFOFILES
)
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 "org-install.el")' \
283 --eval
'(erase-buffer)' \
284 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
285 --eval
'(insert "\n(provide (quote org-install))\n")' \
286 --eval
'(save-buffer)'
287 mv org-install.el lisp
289 doc
/org
: doc
/org.texi
290 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
292 doc
/org.pdf
: doc
/org.texi
293 (cd doc
&& $(TEXI2PDF
) org.texi
)
295 doc
/orgguide.pdf
: doc
/orgguide.texi
296 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
298 doc
/org.html
: doc
/org.texi
299 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
300 UTILITIES
/manfull.pl doc
/org.html
302 doc
/orgcard.pdf
: doc
/orgcard.
tex
303 (cd doc
&& pdftex orgcard.
tex)
305 doc
/orgcard.txt
: doc
/orgcard.
tex
306 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
308 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
309 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
310 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
312 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
313 (cd doc
&& pdftex orgcard_letter.
tex)
315 # Below here are special targets for maintenance only
319 html_manual
: doc
/org.texi
322 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
323 UTILITIES
/mansplit.pl doc
/manual
/*.html
325 html_guide
: doc
/orgguide.texi
328 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
329 UTILITIES
/guidesplit.pl doc
/guide
/*.html
333 pdf
: doc
/org.pdf doc
/orgguide.pdf
335 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
338 git checkout
-b testrelease maint
339 git merge
-s recursive
-X theirs master
340 UTILITIES
/set-version.pl testing
341 git commit
-a
-m
"Release testing"
342 make distfile TAG
=testversion
344 rm -rf org-testversion
*
347 git branch
-D testrelease
349 # The following target makes a full release for the stuff that is
350 # currently on master. Do it like this:
352 # make release TAG=7.01
356 git merge
-s recursive
-X theirs master
357 UTILITIES
/set-version.pl
$(TAG
)
358 git commit
-a
-m
"Release $(TAG)"
359 make relup TAG
=$(TAG
)
362 rm -f org-
$(TAG
)*.zip
363 rm -f org-
$(TAG
)*.
tar.gz
364 make pushreleasetag TAG
=$(TAG
)
365 git push
-f
origin maint
367 git merge
-s ours maint
368 UTILITIES
/set-version.pl
-a
$(TAG
)
369 git commit
-a
-m
"Update website to show $(TAG) as current release"
372 # The following target makes a release, but from the stuff that is on
373 # maint, not from the stuff that is on master. The idea is that it pushes
374 # out a minor fix into a minor update, while development on master
375 # already went full steam ahead. To make a micro-relesse, cherry-pick
376 # the necessary changes into maint, then run (with proper version number)
377 # This is just like release, but we skip the step which merges master
380 # make fixrelease TAG=7.01.02
384 git merge
-s recursive
-X theirs master
385 UTILITIES
/set-version.pl
$(TAG
)
386 git commit
-a
-m
"Release $(TAG)"
387 make relup TAG
=$(TAG
)
391 rm org-
$(TAG
)*.
tar.gz
392 make pushreleasetag TAG
=$(TAG
)
393 git push
-f
origin maint
395 git merge
-s ours maint
396 UTILITIES
/set-version.pl
-o
$(TAG
)
397 git commit
-a
-m
"Update website to show $(TAG) as current release"
400 # ~$ make relup only makes sense from orgmode.org server
401 # Don't call it from your computer!
408 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
411 UTILITIES
/gplmanual.pl
416 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
417 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
418 cp doc
/org_dual_license.texi RELEASEDIR
419 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
420 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
421 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
423 # ~$ make sync_release only makes sense from orgmode.org server
424 # Don't call it from your computer!
426 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
428 # ~$ make sync_manual only makes sense from orgmode.org server
429 # Don't call it from your computer!
431 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
432 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
435 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
436 touch doc
/org.texi doc
/orgcard.
tex # force update
440 ${MAKE} lisp
/org-install.el
441 rm -rf org-
$(TAG
) org-
$(TAG
).zip
443 $(MKDIR
) org-
$(TAG
)/doc
444 $(MKDIR
) org-
$(TAG
)/lisp
445 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
446 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
447 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
448 cp
-r README_DIST org-
$(TAG
)/README
449 zip
-r org-
$(TAG
).zip org-
$(TAG
)
450 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
453 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
454 echo
"Building $(PKG_FNAME).tar ..."
455 touch doc
/org.texi doc
/orgcard.
tex # force update
456 rm -rf
$(PKG_FNAME
) $(PKG_FNAME
).
tar
457 $(MKDIR
) $(PKG_FNAME
)
458 cp
-r
$(PKG_LISP_FILES
) $(PKG_FNAME
)
463 echo
"(define-package \"$(PKG_QNAME)\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > $(PKG_FNAME
)/$(PKG_QNAME
)-pkg.el
464 tar cf
$(PKG_FNAME
).
tar $(PKG_FNAME
) --remove-files
467 pkg-data
: $(PKG_DATA_DIRS
)
468 @if
[ "X$(PKG_DATA_DIRS)" = "X" ]; \
469 then echo
"*** WARNING: PKG_DATA_DIRS not defined ***"; \
472 mkdir
-p
$(PKG_FNAME
)/$<; \
473 cp
-r
$</* $(PKG_FNAME
)/$<; \
476 pkg-info
: $(PKG_INFO_FILES
)
477 cp
-r
$(PKG_INFO_FILES
) $(PKG_FNAME
)
479 pkg-doc
: $(PKG_DOC_FILES
)
480 @if
[ "X$(PKG_DOC_FILES)" = "X" ]; \
481 then echo
"*** WARNING: PKG_DOC_FILES not defined ***"; \
483 $(MKDIR
) $(PKG_FNAME
)/doc
; \
484 cp
-r
$(PKG_DOC_FILES
) $(PKG_FNAME
)/doc
; \
488 $(MKDIR
) $(PKG_FNAME
)
489 cp
$(PKG_README_ORG_FILE
) $(PKG_FNAME
)/README.org
491 --eval
"(require 'org-ascii)" \
492 --visit
=$(PKG_FNAME
)/README.org \
493 --eval
"(org-export-as-ascii 3 t)"
494 cp
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README
495 rm -f
$(PKG_FNAME
)/README.txt
$(PKG_FNAME
)/README.org
498 @if
[ "X$(PKG_UPLOAD_DIR)" = "X" ]; \
499 then echo
"*** WARNING: Skipping Upload of $(PKG_FNAME).tar ***"; \
501 echo
"Uploading $(PKG_FNAME).tar to $(PKG_UPLOAD_DIR) ..."; \
502 $(MKDIR
) $(PKG_UPLOAD_DIR
); \
503 rm -f
$(PKG_UPLOAD_DIR
)/archive-contents
; \
504 $(BATCH
) $(BATCH_EXTRA
) \
505 --eval
'(toggle-debug-on-error)' \
506 --eval
"(require 'package-x)" \
507 --eval
'(setq package-archive-upload-base "$(PKG_UPLOAD_DIR)")' \
508 --eval
'(setq package-update-news-on-upload nil)' \
509 --eval
'(package-upload-file (expand-file-name "$(PKG_FNAME).tar"))'; \
511 --eval
"(require 'org-html)" \
512 --visit
=$(PKG_README_ORG_FILE
) \
513 --eval
"(org-export-as-html 3 t)"; \
514 mv
$(PKG_README_HTML_FILE
) $(PKG_UPLOAD_DIR
)/README.html
; \
519 rm -f lisp
/org-install.el
528 find contrib
-name \
*~
-exec
rm {} \
;
533 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
534 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
535 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
536 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
537 -(cd doc
&& rm -rf manual
)
542 rm -rf org-7
*zip org-7
*tar.gz
549 git-push orgmode@orgmode.org
:org-mode.git master
552 git-tag
-m
"Adding tag" -a
$(TAG
)
553 git-push orgmode@orgmode.org
:org-mode.git
$(TAG
)
556 git-tag
-m
"Adding release tag" -a release_
$(TAG
)
557 git-push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
561 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
562 lisp
/org-agenda.elc
: lisp
/org.el
563 lisp
/org-ascii.elc
: lisp
/org-exp.el
564 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
565 lisp
/org-archive.elc
: lisp
/org.el
566 lisp
/org-bbdb.elc
: lisp
/org.el
567 lisp
/org-beamer.elc
: lisp
/org.el
568 lisp
/org-bibtex.elc
: lisp
/org.el
569 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
570 lisp
/org-clock.elc
: lisp
/org.el
571 lisp
/org-colview.elc
: lisp
/org.el
572 lisp
/org-colview-xemacs.elc
: lisp
/org.el
573 lisp
/org-compat.elc
: lisp
/org-macs.el
574 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
575 lisp
/org-ctags.elc
: lisp
/org.el
576 lisp
/org-datetree.elc
: lisp
/org.el
577 lisp
/org-docview.elc
: lisp
/org.el
578 lisp
/org-entities.elc
:
579 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
580 lisp
/org-exp-blocks.elc
: lisp
/org.el
581 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
582 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
583 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
584 lisp
/org-feed.elc
: lisp
/org.el
585 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
586 lisp
/org-freemind.elc
: lisp
/org.el
587 lisp
/org-gnus.elc
: lisp
/org.el
588 lisp
/org-html.elc
: lisp
/org-exp.el lisp
/org-lparse.el
589 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
590 lisp
/org-icalendar.elc
: lisp
/org-exp.el
591 lisp
/org-id.elc
: lisp
/org.el
592 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
593 lisp
/org-info.elc
: lisp
/org.el
594 lisp
/org-inlinetask.elc
:
595 lisp
/org-irc.elc
: lisp
/org.el
596 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
597 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
598 lisp
/org-mac-message.elc
: lisp
/org.el
600 lisp
/org-mew.elc
: lisp
/org.el
601 lisp
/org-mhe.elc
: lisp
/org.el
603 lisp
/org-mobile.elc
: lisp
/org.el
604 lisp
/org-mouse.elc
: lisp
/org.el
605 lisp
/org-lparse.elc
: lisp
/org-exp.el
606 lisp
/org-odt.elc
: lisp
/org-lparse.el
607 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
608 lisp
/org-publish.elc
:
609 lisp
/org-protocol.elc
: lisp
/org.el
610 lisp
/org-remember.elc
: lisp
/org.el
611 lisp
/org-rmail.elc
: lisp
/org.el
612 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
613 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
614 lisp
/org-table.elc
: lisp
/org.el
615 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
616 lisp
/org-timer.elc
: lisp
/org.el
617 lisp
/org-vm.elc
: lisp
/org.el
618 lisp
/org-w3m.elc
: lisp
/org.el
619 lisp
/org-wl.elc
: lisp
/org.el
620 lisp
/org-xoxo.elc
: lisp
/org-exp.el