Makefile 10 KB

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