Makefile 10 KB

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