Makefile 10 KB

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