Makefile 11 KB

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