Makefile 12 KB

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