Makefile 9.7 KB

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