Makefile 9.2 KB

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