Makefile 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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. ob.el \
  102. ob-table.el \
  103. ob-lob.el \
  104. ob-ref.el \
  105. ob-exp.el \
  106. ob-tangle.el \
  107. ob-comint.el \
  108. ob-eval.el \
  109. ob-keys.el \
  110. ob-C.el \
  111. ob-ditaa.el \
  112. ob-haskell.el \
  113. ob-perl.el \
  114. ob-sh.el \
  115. ob-R.el \
  116. ob-dot.el \
  117. ob-mscgen.el \
  118. ob-latex.el \
  119. ob-ledger.el \
  120. ob-python.el \
  121. ob-sql.el \
  122. ob-asymptote.el \
  123. ob-emacs-lisp.el \
  124. ob-matlab.el \
  125. ob-ruby.el \
  126. ob-sqlite.el \
  127. ob-clojure.el \
  128. ob-ocaml.el \
  129. ob-sass.el \
  130. ob-css.el \
  131. ob-gnuplot.el \
  132. ob-octave.el \
  133. ob-screen.el \
  134. ob-plantuml.el \
  135. ob-org.el \
  136. ob-js.el \
  137. ob-scheme.el
  138. LISPFILES0 = $(LISPF:%=lisp/%)
  139. LISPFILES = $(LISPFILES0) lisp/org-install.el
  140. ELCFILES0 = $(LISPFILES0:.el=.elc)
  141. ELCFILES = $(LISPFILES:.el=.elc)
  142. DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
  143. doc/pdflayout.sty doc/.nosearch \
  144. doc/orgguide.texi doc/orgguide.pdf
  145. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  146. TEXIFILES = doc/org.texi
  147. INFOFILES = doc/org
  148. # Package Manager (ELPA)
  149. PKG_TAG = $(shell date +%Y%m%d)
  150. PKG_DOC = "Outline-based notes management and organizer"
  151. PKG_REQ = "nil"
  152. PKG_FILES = $(LISPFILES0) \
  153. doc/dir doc/org \
  154. doc/pdflayout.sty \
  155. doc/org.pdf \
  156. doc/orgguide.pdf \
  157. doc/orgcard.tex \
  158. doc/orgcard.pdf \
  159. doc/orgcard_letter.pdf
  160. .SUFFIXES: .el .elc .texi
  161. SHELL = /bin/sh
  162. # Additional distribution files
  163. DISTFILES_extra= Makefile request-assign-future.txt contrib
  164. default: $(ELCFILES) $(ELCBFILES)
  165. all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
  166. up2: update
  167. sudo ${MAKE} install
  168. update:
  169. git pull
  170. ${MAKE} clean
  171. ${MAKE} all
  172. compile: $(ELCFILES0) $(ELCBFILES)
  173. install: install-lisp
  174. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf
  175. p:
  176. ${MAKE} pdf && open doc/org.pdf
  177. g:
  178. ${MAKE} pdf && open doc/orgguide.pdf
  179. install-lisp: $(LISPFILES) $(ELCFILES)
  180. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  181. $(CP) $(LISPFILES) $(lispdir)
  182. $(CP) $(ELCFILES) $(lispdir)
  183. install-info: $(INFOFILES)
  184. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  185. $(CP) $(INFOFILES) $(infodir)
  186. $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
  187. install-info-debian: $(INFOFILES)
  188. $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
  189. autoloads: lisp/org-install.el
  190. lisp/org-install.el: $(LISPFILES0) Makefile
  191. $(BATCH) --eval "(require 'autoload)" \
  192. --eval '(find-file "org-install.el")' \
  193. --eval '(erase-buffer)' \
  194. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  195. --eval '(insert "\n(provide (quote org-install))\n")' \
  196. --eval '(save-buffer)'
  197. mv org-install.el lisp
  198. doc/org: doc/org.texi
  199. (cd doc; $(MAKEINFO) --no-split org.texi -o org)
  200. doc/org.pdf: doc/org.texi
  201. (cd doc; $(TEXI2PDF) org.texi)
  202. doc/orgguide.pdf: doc/orgguide.texi
  203. (cd doc; $(TEXI2PDF) orgguide.texi)
  204. doc/org.html: doc/org.texi
  205. (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
  206. UTILITIES/manfull.pl doc/org.html
  207. doc/orgcard.pdf: doc/orgcard.tex
  208. (cd doc; pdftex orgcard.tex)
  209. doc/orgcard.txt: doc/orgcard.tex
  210. (cd doc; perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
  211. doc/orgcard_letter.tex: doc/orgcard.tex
  212. perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
  213. doc/orgcard.tex > doc/orgcard_letter.tex
  214. doc/orgcard_letter.pdf: doc/orgcard_letter.tex
  215. (cd doc; pdftex orgcard_letter.tex)
  216. # Below here are special targets for maintenance only
  217. updateweb:
  218. ssh cdominik@orgmode.org 'pull-worg-org.sh && publish-worg-org.sh'
  219. html: doc/org.html
  220. html_manual: doc/org.texi
  221. rm -rf doc/manual
  222. mkdir doc/manual
  223. $(TEXI2HTML) -o doc/manual doc/org.texi
  224. UTILITIES/mansplit.pl doc/manual/*.html
  225. html_guide: doc/orgguide.texi
  226. rm -rf doc/guide
  227. mkdir doc/guide
  228. $(TEXI2HTML) -o doc/guide doc/orgguide.texi
  229. UTILITIES/guidesplit.pl doc/guide/*.html
  230. info: doc/org
  231. pdf: doc/org.pdf doc/orgguide.pdf
  232. card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
  233. testrelease:
  234. git checkout -b testrelease maint
  235. git merge -s recursive -X theirs master
  236. UTILITIES/set-version.pl testing
  237. git commit -a -m "Release testing"
  238. make distfile TAG=testversion
  239. make cleanrel
  240. rm -rf org-testversion*
  241. git reset --hard
  242. git checkout master
  243. git branch -D testrelease
  244. release:
  245. git checkout maint
  246. git merge -s recursive -X theirs master
  247. UTILITIES/set-version.pl $(TAG)
  248. git commit -a -m "Release $(TAG)"
  249. make relup TAG=$(TAG)
  250. make cleanrel
  251. rm -rf org-$(TAG)
  252. rm org-$(TAG)*.zip
  253. rm org-$(TAG)*.tar.gz
  254. make pushreleasetag TAG=$(TAG)
  255. git push origin maint
  256. git checkout master
  257. git merge -s ours maint
  258. UTILITIES/set-version.pl -o $(TAG)
  259. git commit -a -m "Update website to show $(TAG) as current release"
  260. git push
  261. make updateweb
  262. relup:
  263. ${MAKE} makerelease
  264. ${MAKE} upload_release
  265. ${MAKE} upload_manual
  266. distfile:
  267. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  268. touch doc/org.texi doc/orgcard.tex # force update
  269. ${MAKE} cleancontrib
  270. ${MAKE} info
  271. ${MAKE} doc
  272. ${MAKE} lisp/org-install.el
  273. rm -rf org-$(TAG) org-$(TAG).zip
  274. $(MKDIR) org-$(TAG)
  275. $(MKDIR) org-$(TAG)/doc
  276. $(MKDIR) org-$(TAG)/lisp
  277. cp -r $(LISPFILES) org-$(TAG)/lisp
  278. cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
  279. cp -r $(DISTFILES_extra) org-$(TAG)/
  280. cp -r README_DIST org-$(TAG)/README
  281. cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
  282. zip -r org-$(TAG).zip org-$(TAG)
  283. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  284. pkg:
  285. @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  286. touch doc/org.texi doc/orgcard.tex # force update
  287. ${MAKE} info
  288. ${MAKE} doc
  289. rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
  290. $(MKDIR) org-$(PKG_TAG)
  291. cp -r $(PKG_FILES) org-$(PKG_TAG)
  292. echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
  293. tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
  294. makerelease:
  295. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  296. ${MAKE} distfile
  297. ${MAKE} doc
  298. UTILITIES/gplmanual.pl
  299. ${MAKE} html_manual
  300. ${MAKE} html_guide
  301. rm -rf RELEASEDIR
  302. $(MKDIR) RELEASEDIR
  303. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  304. cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
  305. cp doc/org_dual_license.texi RELEASEDIR
  306. cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
  307. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  308. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  309. upload_release:
  310. rsync -avuz RELEASEDIR/ cdominik@orgmode.org:orgmode.org/
  311. upload_manual:
  312. rsync -avuz --delete doc/manual/ cdominik@orgmode.org:orgmode.org/manual/
  313. rsync -avuz --delete doc/guide/ cdominik@orgmode.org:orgmode.org/guide/
  314. cleanall:
  315. ${MAKE} clean
  316. rm -f lisp/org-install.el
  317. clean:
  318. ${MAKE} cleanelc
  319. ${MAKE} cleandoc
  320. ${MAKE} cleanrel
  321. rm -f *~ */*~ */*/*~
  322. cleancontrib:
  323. find contrib -name \*~ -exec rm {} \;
  324. cleanelc:
  325. rm -f $(ELCFILES)
  326. cleandoc:
  327. (cd doc; rm -f org.pdf org org.html orgcard.pdf)
  328. (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  329. (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  330. (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
  331. (cd doc; rm -rf manual)
  332. cleanrel:
  333. rm -rf RELEASEDIR
  334. rm -rf org-7.*
  335. rm -rf org-7*zip org-7*tar.gz
  336. .el.elc:
  337. $(ELC) $<
  338. push:
  339. git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
  340. pushtag:
  341. git-tag -m "Adding tag" -a $(TAG)
  342. git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)
  343. pushreleasetag:
  344. git-tag -m "Adding release tag" -a release_$(TAG)
  345. git-push git+ssh://repo.or.cz/srv/git/org-mode.git release_$(TAG)
  346. # Dependencies
  347. lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
  348. lisp/org-agenda.elc: lisp/org.el
  349. lisp/org-ascii.elc: lisp/org-exp.el
  350. lisp/org-attach.elc: lisp/org.el lisp/org-id.el
  351. lisp/org-archive.elc: lisp/org.el
  352. lisp/org-bbdb.elc: lisp/org.el
  353. lisp/org-beamer.elc: lisp/org.el
  354. lisp/org-bibtex.elc: lisp/org.el
  355. lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
  356. lisp/org-clock.elc: lisp/org.el
  357. lisp/org-colview.elc: lisp/org.el
  358. lisp/org-colview-xemacs.elc: lisp/org.el
  359. lisp/org-compat.elc: lisp/org-macs.el
  360. lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
  361. lisp/org-ctags.elc: lisp/org.el
  362. lisp/org-datetree.elc: lisp/org.el
  363. lisp/org-docview.elc: lisp/org.el
  364. lisp/org-entities.elc:
  365. lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
  366. lisp/org-exp-blocks.elc: lisp/org.el
  367. lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
  368. lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
  369. lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
  370. lisp/org-feed.elc: lisp/org.el
  371. lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
  372. lisp/org-freemind.elc: lisp/org.el
  373. lisp/org-gnus.elc: lisp/org.el
  374. lisp/org-html.elc: lisp/org-exp.el
  375. lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
  376. lisp/org-icalendar.elc: lisp/org-exp.el
  377. lisp/org-id.elc: lisp/org.el
  378. lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
  379. lisp/org-info.elc: lisp/org.el
  380. lisp/org-inlinetask.elc:
  381. lisp/org-irc.elc: lisp/org.el
  382. lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
  383. lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
  384. lisp/org-mac-message.elc: lisp/org.el
  385. lisp/org-macs.elc:
  386. lisp/org-mew.elc: lisp/org.el
  387. lisp/org-mhe.elc: lisp/org.el
  388. lisp/org-mks.elc:
  389. lisp/org-mobile.elc: lisp/org.el
  390. lisp/org-mouse.elc: lisp/org.el
  391. lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
  392. lisp/org-publish.elc:
  393. lisp/org-protocol.elc: lisp/org.el
  394. lisp/org-remember.elc: lisp/org.el
  395. lisp/org-rmail.elc: lisp/org.el
  396. lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
  397. lisp/org-table.elc: lisp/org.el
  398. lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
  399. lisp/org-timer.elc: lisp/org.el
  400. lisp/org-vm.elc: lisp/org.el
  401. lisp/org-w3m.elc: lisp/org.el
  402. lisp/org-wl.elc: lisp/org.el
  403. lisp/org-xoxo.elc: lisp/org-exp.el