Makefile 10 KB

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