Makefile 9.7 KB

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