Makefile 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. # Makefile - for the org-mode distribution
  2. #
  3. # Maintainer: Carsten Dominik <dominik@science.uva.nl>
  4. # Version: VERSIONTAG
  5. #
  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'.
  8. ##----------------------------------------------------------------------
  9. ## YOU MUST EDIT THE FOLLOWING LINES
  10. ##----------------------------------------------------------------------
  11. # Name of your emacs binary
  12. EMACS=emacs
  13. # Where local software is found
  14. prefix=/usr/local
  15. # Where local lisp files go.
  16. lispdir = $(prefix)/share/emacs/site-lisp
  17. # Where info files go.
  18. infodir = $(prefix)/info
  19. ##----------------------------------------------------------------------
  20. ## YOU MAY NEED TO EDIT THESE
  21. ##----------------------------------------------------------------------
  22. # Using emacs in batch mode.
  23. # BATCH=$(EMACS) -batch -q
  24. # BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
  25. BATCH=$(EMACS) -batch -q -eval \
  26. "(progn (add-to-list (quote load-path) \".\") \
  27. (add-to-list (quote load-path) \"$(lispdir)\"))"
  28. # Specify the byte-compiler for compiling org-mode files
  29. ELC= $(BATCH) -f batch-byte-compile
  30. # How to make a pdf file from a texinfo file
  31. TEXI2PDF = texi2pdf
  32. # How to create directories
  33. MKDIR = mkdir -p
  34. # How to create the info files from the texinfo file
  35. MAKEINFO = makeinfo
  36. # How to create the HTML file
  37. TEXI2HTML = makeinfo --html --number-sections
  38. # How to move the byte compiled files to their destination.
  39. MV = mv
  40. # How to copy the lisp files to their distination.
  41. CP = cp -p
  42. ##----------------------------------------------------------------------
  43. ## BELOW THIS LINE ON YOUR OWN RISK!
  44. ##----------------------------------------------------------------------
  45. # The following variables need to be defined by the maintainer
  46. LISPF = org.el \
  47. org-archive.el \
  48. org-colview.el \
  49. org-compat.el \
  50. org-macs.el \
  51. org-clock.el \
  52. org-table.el \
  53. org-exp.el \
  54. org-faces.el \
  55. org-remember.el \
  56. org-agenda.el \
  57. org-publish.el \
  58. org-mouse.el \
  59. org-export-latex.el \
  60. org-bbdb.el \
  61. org-bibtex.el \
  62. org-gnus.el \
  63. org-info.el \
  64. org-infojs.el \
  65. org-irc.el \
  66. org-mac-message.el \
  67. org-mhe.el \
  68. org-rmail.el \
  69. org-vm.el \
  70. org-wl.el
  71. LISPFILES0 = $(LISPF:%=lisp/%)
  72. LISPFILES = $(LISPFILES0) lisp/org-install.el
  73. ELCFILES0 = $(LISPFILES0:.el=.elc)
  74. ELCFILES = $(LISPFILES:.el=.elc)
  75. DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir
  76. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  77. TEXIFILES = doc/org.texi
  78. INFOFILES = doc/org
  79. .SUFFIXES: .el .elc .texi
  80. SHELL = /bin/sh
  81. # Additional distribution files
  82. DISTFILES_extra= Makefile ChangeLog request-assign-future.txt CONTRIB
  83. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  84. default: $(ELCFILES)
  85. all: $(ELCFILES) $(INFOFILES)
  86. compile: $(ELCFILES0)
  87. install: install-lisp
  88. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
  89. p:
  90. make pdf && open doc/org.pdf
  91. c:
  92. make card && gv doc/orgcard.ps
  93. install-lisp: $(LISPFILES) $(ELCFILES)
  94. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  95. $(CP) $(LISPFILES) $(lispdir)
  96. $(CP) $(ELCFILES) $(lispdir)
  97. install-info: $(INFOFILES)
  98. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  99. $(CP) $(INFOFILES) $(infodir)
  100. install-noutline: xemacs/noutline.elc
  101. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  102. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  103. autoloads: lisp/org-install.el
  104. lisp/org-install.el: $(LISPFILES0) Makefile
  105. $(BATCH) --eval "(require 'autoload)" \
  106. --eval '(find-file "org-install.el")' \
  107. --eval '(erase-buffer)' \
  108. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  109. --eval '(insert "\n(provide (quote org-install))\n")' \
  110. --eval '(save-buffer)'
  111. mv org-install.el lisp
  112. xemacs/noutline.elc: xemacs/noutline.el
  113. doc/org: doc/org.texi
  114. (cd doc; $(MAKEINFO) --no-split org.texi -o org)
  115. doc/org.pdf: doc/org.texi
  116. (cd doc; $(TEXI2PDF) org.texi)
  117. doc/org.html: doc/org.texi
  118. (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
  119. doc/orgcard.dvi: doc/orgcard.tex
  120. (cd doc; tex orgcard.tex)
  121. doc/orgcard.pdf: doc/orgcard.dvi
  122. dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
  123. doc/orgcard.ps: doc/orgcard.dvi
  124. dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
  125. doc/orgcard_letter.dvi: doc/orgcard.tex
  126. perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
  127. (cd doc; tex orgcard_letter.tex)
  128. doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
  129. dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
  130. doc/orgcard_letter.ps: doc/orgcard_letter.dvi
  131. dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
  132. # Below here are special targets for maintenance only
  133. updateweb:
  134. ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
  135. html: doc/org.html
  136. html_manual: doc/org.texi
  137. rm -rf doc/manual
  138. mkdir doc/manual
  139. $(TEXI2HTML) -o doc/manual doc/org.texi
  140. info: doc/org
  141. pdf: doc/org.pdf
  142. card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
  143. distfile:
  144. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  145. touch doc/org.texi doc/orgcard.tex # force update
  146. make info
  147. make doc
  148. make lisp/org-install.el
  149. rm -rf org-$(TAG) org-$(TAG).zip
  150. $(MKDIR) org-$(TAG)
  151. $(MKDIR) org-$(TAG)/xemacs
  152. $(MKDIR) org-$(TAG)/doc
  153. $(MKDIR) org-$(TAG)/lisp
  154. cp -r $(LISPFILES) org-$(TAG)/lisp
  155. cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
  156. cp -r $(DISTFILES_extra) org-$(TAG)/
  157. cp -r README_DIST org-$(TAG)/README
  158. cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
  159. cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  160. zip -r org-$(TAG).zip org-$(TAG)
  161. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  162. release:
  163. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  164. make webfiles
  165. make distfile
  166. make doc
  167. make html_manual
  168. rm -rf RELEASEDIR
  169. $(MKDIR) RELEASEDIR
  170. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  171. cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
  172. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  173. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  174. upload_release:
  175. (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
  176. upload_manual:
  177. lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
  178. relup0:
  179. make release
  180. make upload_release
  181. relup:
  182. make release
  183. make upload_release
  184. make upload_manual
  185. cleanelc:
  186. rm -f $(ELCFILES)
  187. cleandoc:
  188. (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
  189. (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  190. (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  191. (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
  192. (cd doc; rm -rf manual)
  193. clean:
  194. make cleanelc
  195. make cleandoc
  196. rm -f *~ */*~ */*/*~
  197. rm -rf RELEASEDIR
  198. .el.elc:
  199. $(ELC) $<
  200. push:
  201. git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
  202. pushtag:
  203. git-tag -m "Adding tag" -a $(TAG)
  204. git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
  205. pushreleasetag:
  206. git-tag -m "Adding tag" -a $(TAG)
  207. git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
  208. # Dependencies
  209. lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc
  210. lisp/org-agenda.elc: lisp/org.elc
  211. lisp/org-archive.elc: lisp/org.elc
  212. lisp/org-bbdb.elc: lisp/org.elc
  213. lisp/org-bibtex.elc: lisp/org.elc
  214. lisp/org-clock.elc: lisp/org.elc
  215. lisp/org-colview.elc: lisp/org.elc
  216. lisp/org-compat.elc:
  217. lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc
  218. lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc
  219. lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc
  220. lisp/org-gnus.elc: lisp/org.elc
  221. lisp/org-info.elc: lisp/org.elc
  222. lisp/org-infojs.elc: lisp/org.elc lisp/org-exp.elc
  223. lisp/org-irc.elc: lisp/org.elc
  224. lisp/org-mac-message.elc: lisp/org.elc
  225. lisp/org-macs.elc:
  226. lisp/org-mew.elc: lisp/org.elc
  227. lisp/org-mhe.elc: lisp/org.elc
  228. lisp/org-mouse.elc: lisp/org.elc
  229. lisp/org-publish.elc:
  230. lisp/org-remember.elc: lisp/org.elc
  231. lisp/org-rmail.elc: lisp/org.elc
  232. lisp/org-table.elc: lisp/org.elc
  233. lisp/org-vm.elc: lisp/org.elc
  234. lisp/org-wl.elc: lisp/org.elc