Makefile 9.3 KB

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