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
23 # $(datadir) contains auxiliary files for use with ODT exporter.
24 # See comments under DATAFILES.
25 datadir = $(prefix)/share
/emacs
/etc
28 infodir = $(prefix)/share
/info
30 ##----------------------------------------------------------------------
31 ## YOU MAY NEED TO EDIT THESE
32 ##----------------------------------------------------------------------
34 # Using emacs in batch mode.
36 BATCH
=$(EMACS
) -batch
-q
-no-site-file
-eval \
37 "(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))" $(BATCH_EXTRA
)
39 # Specify the byte-compiler for compiling org-mode files
40 ELC
= $(BATCH
) -f batch-byte-compile
42 # How to make a pdf file from a texinfo file
45 # How to create directories
48 # How to create the info files from the texinfo file
51 # How to create the HTML file
52 TEXI2HTML
= makeinfo --html
--number-sections
53 TEXI2HTMLNOPSLIT
= makeinfo --html
--no-split
--number-sections
55 # How to copy the lisp files and elc files to their distination.
58 # Name of the program to install info files
59 INSTALL_INFO
=install-info
61 ##----------------------------------------------------------------------
62 ## BELOW THIS LINE ON YOUR OWN RISK!
63 ##----------------------------------------------------------------------
65 # The following variables need to be defined by the maintainer
77 org-colview-xemacs.el \
119 org-special-blocks.el \
175 LISPFILES0
= $(LISPF
:%=lisp
/%)
176 LISPFILES
= $(LISPFILES0
) lisp
/org-install.el
177 ELCFILES0
= $(LISPFILES0
:.el
=.elc
)
178 ELCFILES
= $(LISPFILES
:.el
=.elc
)
179 DOCFILES
= doc
/org.texi doc
/org.pdf doc
/org doc
/dir \
180 doc
/pdflayout.sty doc
/.nosearch \
181 doc
/orgguide.texi doc
/orgguide.pdf
182 CARDFILES
= doc
/orgcard.
tex doc
/orgcard.pdf doc
/orgcard_letter.pdf
183 TEXIFILES
= doc
/org.texi
186 # etc/styles contains OpenDocument style files. These files *must* be
187 # installed for the ODT exporter to function. These files are
188 # distirbuted with GNU ELPA as well as with stock Emacs >= 24.1.
190 # contrib/odt/etc/schema contains OpenDocument schema files. It is
191 # *desirable* but *not* mandatory that these files be installed.
192 # These files are not distributed with stock Emacs. This is because
193 # the terms under which OASIS distributes these files are not
196 # BasicODConverter-x.y.z.oxt is a LibreOffice extension for converting
197 # OpenDocument files to numerous other formats. It is similar to
198 # unoconv and is implemented in StarBasic. It is *desirable* but
199 # *not* *mandatory* that the converter be installed. It is
200 # distributed under the same license as GNU Emacs. This file is *not*
202 DATAFILES
= etc
/styles \
203 # contrib/odt/BasicODConverter/BasicODConverter*.oxt \
204 # contrib/odt/etc/schema \
206 # Package Manager (ELPA)
207 PKG_TAG
= $(shell date
+%Y
%m
%d
)
208 PKG_DOC
= "Outline-based notes management and organizer"
211 PKG_FILES
= $(LISPFILES0
) \
218 doc
/orgcard_letter.pdf \
221 .SUFFIXES
: .el .elc .texi
224 # Additional distribution files
225 DISTFILES_extra
= Makefile request-assign-future.txt contrib etc
227 default
: $(ELCFILES
) $(ELCBFILES
)
229 all: $(ELCFILES
) $(ELCBFILES
) $(INFOFILES
)
239 compile
: $(ELCFILES0
) $(ELCBFILES
)
241 install: install-lisp install-data
243 doc
: doc
/org.html doc
/org.pdf doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgguide.pdf doc
/orgcard.txt
246 ${MAKE} pdf
&& open doc
/org.pdf
249 ${MAKE} pdf
&& open doc
/orgguide.pdf
251 # Always force re-compilation of org-odt
252 lisp
/org-odt.elc
: org-odt-data-dir
255 # Sleight of hand to "hard code" the value of $(datadir) in
256 # org-odt.el. See variables `org-odt-styles-dir-list' and
257 # `org-odt-schema-dir-list'.
258 install-lisp
: BATCH_EXTRA
= -eval
"(setq org-odt-data-dir (expand-file-name \"$(datadir)\"))"
260 install-lisp
: $(LISPFILES
) $(ELCFILES
)
261 if
[ ! -d
$(DESTDIR
)$(lispdir
) ]; then \
262 $(MKDIR
) $(DESTDIR
)$(lispdir
); else true
; fi
;
263 $(CP
) $(LISPFILES
) $(DESTDIR
)$(lispdir
)
264 $(CP
) $(ELCFILES
) $(DESTDIR
)$(lispdir
)
266 install-info
: $(INFOFILES
)
267 if
[ ! -d
$(DESTDIR
)$(infodir) ]; then \
268 $(MKDIR
) $(DESTDIR
)$(infodir); else true
; fi
;
269 $(CP
) $(INFOFILES
) $(DESTDIR
)$(infodir)
270 $(INSTALL_INFO
) --infodir=$(DESTDIR
)$(infodir) $(INFOFILES
)
272 install-data
: $(DATAFILES
)
273 if
[ ! -d
$(DESTDIR
)$(datadir) ]; then \
274 $(MKDIR
) $(DESTDIR
)$(datadir); else true
; fi
;
275 $(CP
) $(DATAFILES
) $(DESTDIR
)$(datadir)
277 autoloads
: lisp
/org-install.el
279 lisp
/org-install.el
: $(LISPFILES0
) Makefile
280 $(BATCH
) --eval
"(require 'autoload)" \
281 --eval
'(find-file "lisp/org-install.el")' \
282 --eval
'(erase-buffer)' \
283 --eval
'(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \
284 --eval
'(insert "\n(provide (quote org-install))\n")' \
285 --eval
'(save-buffer)'
287 doc
/org
: doc
/org.texi
288 (cd doc
&& $(MAKEINFO
) --no-split org.texi
-o org
)
290 doc
/org.pdf
: doc
/org.texi
291 (cd doc
&& $(TEXI2PDF
) org.texi
)
293 doc
/orgguide.pdf
: doc
/orgguide.texi
294 (cd doc
&& $(TEXI2PDF
) orgguide.texi
)
296 doc
/org.html
: doc
/org.texi
297 (cd doc
&& $(TEXI2HTML
) --no-split
-o org.html org.texi
)
298 UTILITIES
/manfull.pl doc
/org.html
300 doc
/orgcard.pdf
: doc
/orgcard.
tex
301 (cd doc
&& pdftex orgcard.
tex)
303 doc
/orgcard.txt
: doc
/orgcard.
tex
304 (cd doc
&& perl ..
/UTILITIES
/orgcard2txt.pl orgcard.
tex > orgcard.txt
)
306 doc
/orgcard_letter.
tex: doc
/orgcard.
tex
307 perl
-pe
's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
308 doc
/orgcard.
tex > doc
/orgcard_letter.
tex
310 doc
/orgcard_letter.pdf
: doc
/orgcard_letter.
tex
311 (cd doc
&& pdftex orgcard_letter.
tex)
313 # Below here are special targets for maintenance only
317 html_manual
: doc
/org.texi
320 $(TEXI2HTML
) -o doc
/manual doc
/org.texi
321 UTILITIES
/mansplit.pl doc
/manual
/*.html
323 html_guide
: doc
/orgguide.texi
326 $(TEXI2HTML
) -o doc
/guide doc
/orgguide.texi
327 UTILITIES
/guidesplit.pl doc
/guide
/*.html
331 pdf
: doc
/org.pdf doc
/orgguide.pdf
333 card
: doc
/orgcard.pdf doc
/orgcard_letter.pdf doc
/orgcard.txt
336 git checkout
-b testrelease
origin/maint
337 git merge
-s recursive
-X theirs master
338 UTILITIES
/set-version.pl testing
339 git commit
-a
-m
"Release testing"
340 make distfile TAG
=testversion
342 rm -rf org-testversion
*
345 git branch
-D testrelease
347 # The following target makes a full release for the stuff that is
348 # currently on master. Do it like this:
350 # make release TAG=7.01
354 git merge
-s recursive
-X theirs master
355 UTILITIES
/set-version.pl
$(TAG
)
356 git commit
-a
-m
"Release $(TAG)"
357 make relup TAG
=$(TAG
)
360 rm -f org-
$(TAG
)*.zip
361 rm -f org-
$(TAG
)*.
tar.gz
362 make pushreleasetag TAG
=$(TAG
)
363 git push
-f
origin maint
365 git merge
-s ours maint
366 UTILITIES
/set-version.pl
-a
$(TAG
)
367 git commit
-a
-m
"Update website to show $(TAG) as current release"
370 # The following target makes a release, but from the stuff that is on
371 # maint, not from the stuff that is on master. The idea is that it pushes
372 # out a minor fix into a minor update, while development on master
373 # already went full steam ahead. To make a micro-relesse, cherry-pick
374 # the necessary changes into maint, then run (with proper version number)
375 # This is just like release, but we skip the step which merges master
378 # make fixrelease TAG=7.01.02
382 git merge
-s recursive
-X theirs master
383 UTILITIES
/set-version.pl
$(TAG
)
384 git commit
-a
-m
"Release $(TAG)"
385 make relup TAG
=$(TAG
)
389 rm org-
$(TAG
)*.
tar.gz
390 make pushreleasetag TAG
=$(TAG
)
391 git push
-f
origin maint
393 git merge
-s ours maint
394 UTILITIES
/set-version.pl
-o
$(TAG
)
395 git commit
-a
-m
"Update website to show $(TAG) as current release"
398 # ~$ make relup only makes sense from orgmode.org server
399 # Don't call it from your computer!
406 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
409 UTILITIES
/gplmanual.pl
414 cp org-
$(TAG
).zip org-
$(TAG
).
tar.gz RELEASEDIR
415 cp doc
/org.pdf doc
/orgcard.pdf doc
/org.texi doc
/org.html RELEASEDIR
416 cp doc
/org_dual_license.texi RELEASEDIR
417 cp doc
/orgguide.pdf doc
/orgcard.txt RELEASEDIR
418 cp RELEASEDIR
/org-
$(TAG
).zip RELEASEDIR
/org.zip
419 cp RELEASEDIR
/org-
$(TAG
).
tar.gz RELEASEDIR
/org.
tar.gz
421 # ~$ make sync_release only makes sense from orgmode.org server
422 # Don't call it from your computer!
424 rsync
-avuz RELEASEDIR
/ /var
/www
/orgmode.org
/
426 # ~$ make sync_manual only makes sense from orgmode.org server
427 # Don't call it from your computer!
429 rsync
-avuz
--delete doc
/manual
/ /var
/www
/orgmode.org
/manual
/
430 rsync
-avuz
--delete doc
/guide
/ /var
/www
/orgmode.org
/guide
/
433 @if
[ "X$(TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
434 touch doc
/org.texi doc
/orgcard.
tex # force update
438 ${MAKE} lisp
/org-install.el
439 rm -rf org-
$(TAG
) org-
$(TAG
).zip
441 $(MKDIR
) org-
$(TAG
)/doc
442 $(MKDIR
) org-
$(TAG
)/lisp
443 cp
-r
$(LISPFILES
) org-
$(TAG
)/lisp
444 cp
-r
$(DOCFILES
) $(CARDFILES
) org-
$(TAG
)/doc
445 cp
-r
$(DISTFILES_extra
) org-
$(TAG
)/
446 cp
-r README_DIST org-
$(TAG
)/README
447 zip
-r org-
$(TAG
).zip org-
$(TAG
)
448 tar zcvf org-
$(TAG
).
tar.gz org-
$(TAG
)
451 @if
[ "X$(PKG_TAG)" = "X" ]; then echo
"*** No tag ***"; exit
1; fi
452 touch doc
/org.texi doc
/orgcard.
tex # force update
455 rm -rf org-
$(PKG_TAG
) org-
$(PKG_TAG
).
tar
456 $(MKDIR
) org-
$(PKG_TAG
)
457 cp
-r
$(PKG_FILES
) org-
$(PKG_TAG
)
458 echo
"(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-
$(PKG_TAG
)/org-pkg.el
459 tar cf org-
$(PKG_TAG
).
tar org-
$(PKG_TAG
) --remove-files
463 rm -f lisp
/org-install.el
472 find contrib
-name \
*~
-exec
rm {} \
;
477 -(cd doc
&& rm -f org.pdf org org.html orgcard.pdf orgguide.pdf
)
478 -(cd doc
&& rm -f
*.aux
*.cp
*.cps
*.
dvi *.fn
*.fns
*.ky
*.kys
*.pg
*.pgs
)
479 -(cd doc
&& rm -f
*.toc
*.tp
*.tps
*.vr
*.vrs
*.log
*.html
*.ps
)
480 -(cd doc
&& rm -f orgcard_letter.
tex orgcard_letter.pdf
)
481 -(cd doc
&& rm -rf manual
)
486 rm -rf org-7
*zip org-7
*tar.gz
493 git push orgmode@orgmode.org
:org-mode.git master
496 git tag
-m
"Adding tag" -a
$(TAG
)
497 git push orgmode@orgmode.org
:org-mode.git
$(TAG
)
500 git tag
-m
"Adding release tag" -a release_
$(TAG
)
501 git push orgmode@orgmode.org
:org-mode.git release_
$(TAG
)
505 lisp
/org.elc
: lisp
/org-macs.el lisp
/org-compat.el lisp
/org-faces.el
506 lisp
/org-agenda.elc
: lisp
/org.el
507 lisp
/org-ascii.elc
: lisp
/org-exp.el
508 lisp
/org-attach.elc
: lisp
/org.el lisp
/org-id.el
509 lisp
/org-archive.elc
: lisp
/org.el
510 lisp
/org-bbdb.elc
: lisp
/org.el
511 lisp
/org-beamer.elc
: lisp
/org.el
512 lisp
/org-bibtex.elc
: lisp
/org.el
513 lisp
/org-capture.elc
: lisp
/org.el lisp
/org-mks.el
514 lisp
/org-clock.elc
: lisp
/org.el
515 lisp
/org-colview.elc
: lisp
/org.el
516 lisp
/org-colview-xemacs.elc
: lisp
/org.el
517 lisp
/org-compat.elc
: lisp
/org-macs.el
518 lisp
/org-crypt.elc
: lisp
/org-crypt.el lisp
/org.el
519 lisp
/org-ctags.elc
: lisp
/org.el
520 lisp
/org-datetree.elc
: lisp
/org.el
521 lisp
/org-docview.elc
: lisp
/org.el
522 lisp
/org-entities.elc
:
523 lisp
/org-exp.elc
: lisp
/org.el lisp
/org-agenda.el
524 lisp
/org-exp-blocks.elc
: lisp
/org.el
525 lisp
/org-latex.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-beamer.el
526 lisp
/org-docbook.elc
: lisp
/org.el lisp
/org-exp.el
527 lisp
/org-faces.elc
: lisp
/org-macs.el lisp
/org-compat.el
528 lisp
/org-feed.elc
: lisp
/org.el
529 lisp
/org-footnotes.elc
: lisp
/org-macs.el lisp
/org-compat.el
530 lisp
/org-freemind.elc
: lisp
/org.el
531 lisp
/org-gnus.elc
: lisp
/org.el
532 lisp
/org-html.elc
: lisp
/org-exp.el
533 lisp
/org-habit.elc
: lisp
/org.el lisp
/org-agenda.el
534 lisp
/org-icalendar.elc
: lisp
/org-exp.el
535 lisp
/org-id.elc
: lisp
/org.el
536 lisp
/org-indent.elc
: lisp
/org.el lisp
/org-macs.el lisp
/org-compat.el
537 lisp
/org-info.elc
: lisp
/org.el
538 lisp
/org-inlinetask.elc
:
539 lisp
/org-irc.elc
: lisp
/org.el
540 lisp
/org-jsinfo.elc
: lisp
/org.el lisp
/org-exp.el
541 lisp
/org-list.elc
: lisp
/org-macs.el lisp
/org-compat.el
542 lisp
/org-lparse.elc
: lisp
/org-exp.el
543 lisp
/org-mac-message.elc
: lisp
/org.el
545 lisp
/org-mew.elc
: lisp
/org.el
546 lisp
/org-mhe.elc
: lisp
/org.el
548 lisp
/org-mobile.elc
: lisp
/org.el
549 lisp
/org-mouse.elc
: lisp
/org.el
550 lisp
/org-odt.elc
: lisp
/org-lparse.el
551 lisp
/org-plot.elc
: lisp
/org.el lisp
/org-exp.el lisp
/org-table.el
552 lisp
/org-publish.elc
:
553 lisp
/org-protocol.elc
: lisp
/org.el
554 lisp
/org-remember.elc
: lisp
/org.el
555 lisp
/org-rmail.elc
: lisp
/org.el
556 lisp
/org-special-blocks.elc
: lisp
/org-compat.el
557 lisp
/org-src.elc
: lisp
/org-macs.el lisp
/org-compat.el
558 lisp
/org-table.elc
: lisp
/org.el
559 lisp
/org-taskjuggler.elc
: lisp
/org.el lisp
/org-exp.el
560 lisp
/org-timer.elc
: lisp
/org.el
561 lisp
/org-vm.elc
: lisp
/org.el
562 lisp
/org-w3m.elc
: lisp
/org.el
563 lisp
/org-wl.elc
: lisp
/org.el
564 lisp
/org-xoxo.elc
: lisp
/org-exp.el
566 # Describe valid make targets for org-mode.
568 @echo
"make - compile Org ELisp files"
569 @echo
"make clean - clean Elisp and documentation files"
570 @echo
"make all - compile Org ELisp files and documentation"
572 @echo
"make doc - make all documentation"
573 @echo
"make info - make Info documentation"
574 @echo
"make html - make HTML documentation"
575 @echo
"make pdf - make pdf documentation"
576 @echo
"make card - make refcards documentation"
578 @echo
"make install - install Org"
579 @echo
"make install-lisp - install Org ELisp files"
580 @echo
"make install-info - install Org Info file"