Makefile 12 KB

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