Makefile 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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) (expand-file-name \"./lisp/\")) \
  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 copy the lisp files and elc files to their distination.
  39. CP = cp -p
  40. # Name of the program to install info files
  41. INSTALL_INFO=install-info
  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-agenda.el \
  48. org-archive.el \
  49. org-bbdb.el \
  50. org-bibtex.el \
  51. org-clock.el \
  52. org-colview.el \
  53. org-colview-xemacs.el \
  54. org-compat.el \
  55. org-exp.el \
  56. org-export-latex.el \
  57. org-faces.el \
  58. org-gnus.el \
  59. org-id.el \
  60. org-info.el \
  61. org-jsinfo.el \
  62. org-irc.el \
  63. org-list.el \
  64. org-mac-message.el \
  65. org-macs.el \
  66. org-mew.el \
  67. org-mhe.el \
  68. org-mouse.el \
  69. org-publish.el \
  70. org-plot.el \
  71. org-remember.el \
  72. org-rmail.el \
  73. org-table.el \
  74. org-vm.el \
  75. org-wl.el
  76. LISPFILES0 = $(LISPF:%=lisp/%)
  77. LISPFILES = $(LISPFILES0) lisp/org-install.el
  78. ELCFILES0 = $(LISPFILES0:.el=.elc)
  79. ELCFILES = $(LISPFILES:.el=.elc)
  80. DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir
  81. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  82. TEXIFILES = doc/org.texi
  83. INFOFILES = doc/org
  84. .SUFFIXES: .el .elc .texi
  85. SHELL = /bin/sh
  86. # Additional distribution files
  87. DISTFILES_extra= Makefile ChangeLog request-assign-future.txt contrib
  88. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  89. default: $(ELCFILES)
  90. all: $(ELCFILES) $(INFOFILES)
  91. compile: $(ELCFILES0)
  92. install: install-lisp
  93. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
  94. p:
  95. make pdf && open doc/org.pdf
  96. c:
  97. make card && gv doc/orgcard.ps
  98. install-lisp: $(LISPFILES) $(ELCFILES)
  99. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  100. $(CP) $(LISPFILES) $(lispdir)
  101. $(CP) $(ELCFILES) $(lispdir)
  102. install-info: $(INFOFILES)
  103. $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
  104. install-noutline: xemacs/noutline.elc
  105. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  106. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  107. autoloads: lisp/org-install.el
  108. lisp/org-install.el: $(LISPFILES0) Makefile
  109. $(BATCH) --eval "(require 'autoload)" \
  110. --eval '(find-file "org-install.el")' \
  111. --eval '(erase-buffer)' \
  112. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  113. --eval '(insert "\n(provide (quote org-install))\n")' \
  114. --eval '(save-buffer)'
  115. mv org-install.el lisp
  116. xemacs/noutline.elc: xemacs/noutline.el
  117. doc/org: doc/org.texi
  118. (cd doc; $(MAKEINFO) --no-split org.texi -o org)
  119. doc/org.pdf: doc/org.texi
  120. (cd doc; $(TEXI2PDF) org.texi)
  121. doc/org.html: doc/org.texi
  122. (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
  123. doc/orgcard.dvi: doc/orgcard.tex
  124. (cd doc; tex orgcard.tex)
  125. doc/orgcard.pdf: doc/orgcard.dvi
  126. dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
  127. doc/orgcard.ps: doc/orgcard.dvi
  128. dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
  129. doc/orgcard_letter.dvi: doc/orgcard.tex
  130. perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
  131. (cd doc; tex orgcard_letter.tex)
  132. doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
  133. dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
  134. doc/orgcard_letter.ps: doc/orgcard_letter.dvi
  135. dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
  136. # Below here are special targets for maintenance only
  137. updateweb:
  138. ssh cdominik@caprisun.dreamhost.com 'pull-worg-org.sh && publish-worg-org.sh'
  139. html: doc/org.html
  140. html_manual: doc/org.texi
  141. rm -rf doc/manual
  142. mkdir doc/manual
  143. $(TEXI2HTML) -o doc/manual doc/org.texi
  144. info: doc/org
  145. pdf: doc/org.pdf
  146. card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
  147. distfile:
  148. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  149. touch doc/org.texi doc/orgcard.tex # force update
  150. make cleancontrib
  151. make info
  152. make doc
  153. make lisp/org-install.el
  154. rm -rf org-$(TAG) org-$(TAG).zip
  155. $(MKDIR) org-$(TAG)
  156. $(MKDIR) org-$(TAG)/xemacs
  157. $(MKDIR) org-$(TAG)/doc
  158. $(MKDIR) org-$(TAG)/lisp
  159. cp -r $(LISPFILES) org-$(TAG)/lisp
  160. cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
  161. cp -r $(DISTFILES_extra) org-$(TAG)/
  162. cp -r README_DIST org-$(TAG)/README
  163. cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
  164. cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  165. zip -r org-$(TAG).zip org-$(TAG)
  166. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  167. release:
  168. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  169. make distfile
  170. make doc
  171. UTILITIES/gplmanual.pl
  172. make html_manual
  173. rm -rf RELEASEDIR
  174. $(MKDIR) RELEASEDIR
  175. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  176. cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
  177. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  178. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  179. upload_release:
  180. (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
  181. upload_manual:
  182. lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
  183. relup0:
  184. make release
  185. make upload_release
  186. relup:
  187. make release
  188. make upload_release
  189. make upload_manual
  190. db:
  191. grep -e '(debug)' lisp/*el
  192. cleancontrib:
  193. find contrib -name \*~ -exec rm {} \;
  194. cleanelc:
  195. rm -f $(ELCFILES)
  196. cleandoc:
  197. (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
  198. (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  199. (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  200. (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
  201. (cd doc; rm -rf manual)
  202. clean:
  203. make cleanelc
  204. make cleandoc
  205. rm -f *~ */*~ */*/*~
  206. rm -rf RELEASEDIR
  207. rm -f lisp/org-install.el
  208. .el.elc:
  209. $(ELC) $<
  210. push:
  211. git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
  212. pushtag:
  213. git-tag -m "Adding tag" -a $(TAG)
  214. git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
  215. pushreleasetag:
  216. git-tag -m "Adding release tag" -a release_$(TAG)
  217. git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
  218. dummy:
  219. echo ${prefix}
  220. # Dependencies
  221. lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc
  222. lisp/org-agenda.elc: lisp/org.elc
  223. lisp/org-archive.elc: lisp/org.elc
  224. lisp/org-bbdb.elc: lisp/org.elc
  225. lisp/org-bibtex.elc: lisp/org.elc
  226. lisp/org-clock.elc: lisp/org.elc
  227. lisp/org-colview.elc: lisp/org.elc
  228. lisp/org-colview-xemacs.elc: lisp/org.elc
  229. lisp/org-compat.elc: lisp/org-macs.elc
  230. lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc
  231. lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc
  232. lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc
  233. lisp/org-gnus.elc: lisp/org.elc
  234. lisp/org-id.elc: lisp/org.elc
  235. lisp/org-info.elc: lisp/org.elc
  236. lisp/org-irc.elc: lisp/org.elc
  237. lisp/org-jsinfo.elc: lisp/org.elc lisp/org-exp.elc
  238. lisp/org-list.elc: lisp/org-macs.elc lisp/org-compat.elc
  239. lisp/org-mac-message.elc: lisp/org.elc
  240. lisp/org-macs.elc:
  241. lisp/org-mew.elc: lisp/org.elc
  242. lisp/org-mhe.elc: lisp/org.elc
  243. lisp/org-mouse.elc: lisp/org.elc
  244. lisp/org-plot.elc: lisp/org.elc lisp/org-exp.elc lisp/org-table.elc
  245. lisp/org-publish.elc:
  246. lisp/org-remember.elc: lisp/org.elc
  247. lisp/org-rmail.elc: lisp/org.elc
  248. lisp/org-table.elc: lisp/org.elc
  249. lisp/org-vm.elc: lisp/org.elc
  250. lisp/org-wl.elc: lisp/org.elc