Makefile 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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-pcomplete.el \
  58. org-crypt.el \
  59. org-ctags.el \
  60. org-datetree.el \
  61. org-docview.el \
  62. org-entities.el \
  63. org-exp.el \
  64. org-exp-blocks.el \
  65. org-docbook.el \
  66. org-faces.el \
  67. org-feed.el \
  68. org-footnote.el \
  69. org-freemind.el \
  70. org-gnus.el \
  71. org-habit.el \
  72. org-html.el \
  73. org-icalendar.el \
  74. org-id.el \
  75. org-indent.el \
  76. org-info.el \
  77. org-inlinetask.el \
  78. org-jsinfo.el \
  79. org-irc.el \
  80. org-latex.el \
  81. org-list.el \
  82. org-mac-message.el \
  83. org-macs.el \
  84. org-mew.el \
  85. org-mhe.el \
  86. org-mks.el \
  87. org-mobile.el \
  88. org-mouse.el \
  89. org-publish.el \
  90. org-plot.el \
  91. org-protocol.el \
  92. org-remember.el \
  93. org-rmail.el \
  94. org-special-blocks.el \
  95. org-src.el \
  96. org-table.el \
  97. org-taskjuggler.el \
  98. org-timer.el \
  99. org-vm.el \
  100. org-w3m.el \
  101. org-wl.el \
  102. org-xoxo.el \
  103. ob.el \
  104. ob-table.el \
  105. ob-lob.el \
  106. ob-ref.el \
  107. ob-exp.el \
  108. ob-tangle.el \
  109. ob-comint.el \
  110. ob-eval.el \
  111. ob-keys.el \
  112. ob-awk.el \
  113. ob-C.el \
  114. ob-calc.el \
  115. ob-ditaa.el \
  116. ob-haskell.el \
  117. ob-perl.el \
  118. ob-sh.el \
  119. ob-R.el \
  120. ob-dot.el \
  121. ob-mscgen.el \
  122. ob-latex.el \
  123. ob-lisp.el \
  124. ob-ledger.el \
  125. ob-python.el \
  126. ob-sql.el \
  127. ob-asymptote.el \
  128. ob-emacs-lisp.el \
  129. ob-matlab.el \
  130. ob-ruby.el \
  131. ob-sqlite.el \
  132. ob-clojure.el \
  133. ob-ocaml.el \
  134. ob-sass.el \
  135. ob-css.el \
  136. ob-gnuplot.el \
  137. ob-octave.el \
  138. ob-screen.el \
  139. ob-plantuml.el \
  140. ob-org.el \
  141. ob-js.el \
  142. ob-scheme.el
  143. LISPFILES0 = $(LISPF:%=lisp/%)
  144. LISPFILES = $(LISPFILES0) lisp/org-install.el
  145. ELCFILES0 = $(LISPFILES0:.el=.elc)
  146. ELCFILES = $(LISPFILES:.el=.elc)
  147. DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir \
  148. doc/pdflayout.sty doc/.nosearch \
  149. doc/orgguide.texi doc/orgguide.pdf
  150. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  151. TEXIFILES = doc/org.texi
  152. INFOFILES = doc/org
  153. # Package Manager (ELPA)
  154. PKG_TAG = $(shell date +%Y%m%d)
  155. PKG_DOC = "Outline-based notes management and organizer"
  156. PKG_REQ = "nil"
  157. PKG_FILES = $(LISPFILES0) \
  158. doc/dir doc/org \
  159. doc/pdflayout.sty \
  160. doc/org.pdf \
  161. doc/orgguide.pdf \
  162. doc/orgcard.tex \
  163. doc/orgcard.pdf \
  164. doc/orgcard_letter.pdf
  165. .SUFFIXES: .el .elc .texi
  166. SHELL = /bin/sh
  167. # Additional distribution files
  168. DISTFILES_extra= Makefile request-assign-future.txt contrib
  169. default: $(ELCFILES) $(ELCBFILES)
  170. all: $(ELCFILES) $(ELCBFILES) $(INFOFILES)
  171. up2: update
  172. sudo ${MAKE} install
  173. update:
  174. git pull
  175. ${MAKE} clean
  176. ${MAKE} all
  177. compile: $(ELCFILES0) $(ELCBFILES)
  178. install: install-lisp
  179. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt
  180. p:
  181. ${MAKE} pdf && open doc/org.pdf
  182. g:
  183. ${MAKE} pdf && open doc/orgguide.pdf
  184. install-lisp: $(LISPFILES) $(ELCFILES)
  185. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  186. $(CP) $(LISPFILES) $(lispdir)
  187. $(CP) $(ELCFILES) $(lispdir)
  188. install-info: $(INFOFILES)
  189. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  190. $(CP) $(INFOFILES) $(infodir)
  191. $(INSTALL_INFO) --info-file=$(INFOFILES) --info-dir=$(infodir)
  192. install-info-debian: $(INFOFILES)
  193. $(INSTALL_INFO) --infodir=$(infodir) $(INFOFILES)
  194. autoloads: lisp/org-install.el
  195. lisp/org-install.el: $(LISPFILES0) Makefile
  196. $(BATCH) --eval "(require 'autoload)" \
  197. --eval '(find-file "org-install.el")' \
  198. --eval '(erase-buffer)' \
  199. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  200. --eval '(insert "\n(provide (quote org-install))\n")' \
  201. --eval '(save-buffer)'
  202. mv org-install.el lisp
  203. doc/org: doc/org.texi
  204. (cd doc && $(MAKEINFO) --no-split org.texi -o org)
  205. doc/org.pdf: doc/org.texi
  206. (cd doc && $(TEXI2PDF) org.texi)
  207. doc/orgguide.pdf: doc/orgguide.texi
  208. (cd doc && $(TEXI2PDF) orgguide.texi)
  209. doc/org.html: doc/org.texi
  210. (cd doc && $(TEXI2HTML) --no-split -o org.html org.texi)
  211. UTILITIES/manfull.pl doc/org.html
  212. doc/orgcard.pdf: doc/orgcard.tex
  213. (cd doc && pdftex orgcard.tex)
  214. doc/orgcard.txt: doc/orgcard.tex
  215. (cd doc && perl ../UTILITIES/orgcard2txt.pl orgcard.tex > orgcard.txt)
  216. doc/orgcard_letter.tex: doc/orgcard.tex
  217. perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \
  218. doc/orgcard.tex > doc/orgcard_letter.tex
  219. doc/orgcard_letter.pdf: doc/orgcard_letter.tex
  220. (cd doc && pdftex orgcard_letter.tex)
  221. # Below here are special targets for maintenance only
  222. html: doc/org.html
  223. html_manual: doc/org.texi
  224. rm -rf doc/manual
  225. mkdir doc/manual
  226. $(TEXI2HTML) -o doc/manual doc/org.texi
  227. UTILITIES/mansplit.pl doc/manual/*.html
  228. html_guide: doc/orgguide.texi
  229. rm -rf doc/guide
  230. mkdir doc/guide
  231. $(TEXI2HTML) -o doc/guide doc/orgguide.texi
  232. UTILITIES/guidesplit.pl doc/guide/*.html
  233. info: doc/org
  234. pdf: doc/org.pdf doc/orgguide.pdf
  235. card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt
  236. testrelease:
  237. git checkout -b testrelease maint
  238. git merge -s recursive -X theirs master
  239. UTILITIES/set-version.pl testing
  240. git commit -a -m "Release testing"
  241. make distfile TAG=testversion
  242. make cleanrel
  243. rm -rf org-testversion*
  244. git reset --hard
  245. git checkout master
  246. git branch -D testrelease
  247. # The following target makes a full release for the stuff that is
  248. # currently on master. Do it like this:
  249. #
  250. # make release TAG=7.01
  251. release:
  252. git checkout maint
  253. git merge -s recursive -X theirs master
  254. UTILITIES/set-version.pl $(TAG)
  255. git commit -a -m "Release $(TAG)"
  256. make relup TAG=$(TAG)
  257. make cleanrel
  258. rm -rf org-$(TAG)
  259. rm -f org-$(TAG)*.zip
  260. rm -f org-$(TAG)*.tar.gz
  261. make pushreleasetag TAG=$(TAG)
  262. git push -f origin maint
  263. git checkout master
  264. git merge -s ours maint
  265. UTILITIES/set-version.pl -a $(TAG)
  266. git commit -a -m "Update website to show $(TAG) as current release"
  267. git push
  268. # The following target makes a release, but from the stuff that is on
  269. # maint, not from the stuff that is on master. The idea is that it pushes
  270. # out a minor fix into a minor update, while development on master
  271. # already went full steam ahead. To make a micro-relesse, cherry-pick
  272. # the necessary changes into maint, then run (with proper version number)
  273. # This is just like release, but we skip the step which merges master
  274. # into maint.
  275. #
  276. # make fixrelease TAG=7.01.02
  277. fixrelease:
  278. git checkout maint
  279. git merge -s recursive -X theirs master
  280. UTILITIES/set-version.pl $(TAG)
  281. git commit -a -m "Release $(TAG)"
  282. make relup TAG=$(TAG)
  283. make cleanrel
  284. rm -rf org-$(TAG)
  285. rm org-$(TAG)*.zip
  286. rm org-$(TAG)*.tar.gz
  287. make pushreleasetag TAG=$(TAG)
  288. git push -f origin maint
  289. git checkout master
  290. git merge -s ours maint
  291. UTILITIES/set-version.pl -o $(TAG)
  292. git commit -a -m "Update website to show $(TAG) as current release"
  293. git push
  294. # ~$ make relup only makes sense from orgmode.org server
  295. # Don't call it from your computer!
  296. relup:
  297. ${MAKE} makerelease
  298. ${MAKE} sync_release
  299. ${MAKE} sync_manual
  300. makerelease:
  301. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  302. ${MAKE} distfile
  303. ${MAKE} doc
  304. UTILITIES/gplmanual.pl
  305. ${MAKE} html_manual
  306. ${MAKE} html_guide
  307. rm -rf RELEASEDIR
  308. $(MKDIR) RELEASEDIR
  309. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  310. cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
  311. cp doc/org_dual_license.texi RELEASEDIR
  312. cp doc/orgguide.pdf doc/orgcard.txt RELEASEDIR
  313. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  314. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  315. # ~$ make sync_release only makes sense from orgmode.org server
  316. # Don't call it from your computer!
  317. sync_release:
  318. rsync -avuz RELEASEDIR/ /var/www/orgmode.org/
  319. # ~$ make sync_manual only makes sense from orgmode.org server
  320. # Don't call it from your computer!
  321. sync_manual:
  322. rsync -avuz --delete doc/manual/ /var/www/orgmode.org/manual/
  323. rsync -avuz --delete doc/guide/ /var/www/orgmode.org/guide/
  324. distfile:
  325. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  326. touch doc/org.texi doc/orgcard.tex # force update
  327. ${MAKE} cleancontrib
  328. ${MAKE} info
  329. ${MAKE} doc
  330. ${MAKE} lisp/org-install.el
  331. rm -rf org-$(TAG) org-$(TAG).zip
  332. $(MKDIR) org-$(TAG)
  333. $(MKDIR) org-$(TAG)/doc
  334. $(MKDIR) org-$(TAG)/lisp
  335. cp -r $(LISPFILES) org-$(TAG)/lisp
  336. cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
  337. cp -r $(DISTFILES_extra) org-$(TAG)/
  338. cp -r README_DIST org-$(TAG)/README
  339. zip -r org-$(TAG).zip org-$(TAG)
  340. tar zcvf org-$(TAG).tar.gz org-$(TAG)
  341. pkg:
  342. @if [ "X$(PKG_TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  343. touch doc/org.texi doc/orgcard.tex # force update
  344. ${MAKE} info
  345. ${MAKE} doc
  346. rm -rf org-$(PKG_TAG) org-$(PKG_TAG).tar
  347. $(MKDIR) org-$(PKG_TAG)
  348. cp -r $(PKG_FILES) org-$(PKG_TAG)
  349. echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el
  350. tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files
  351. cleanall:
  352. ${MAKE} clean
  353. rm -f lisp/org-install.el
  354. clean:
  355. ${MAKE} cleanelc
  356. ${MAKE} cleandoc
  357. ${MAKE} cleanrel
  358. rm -f *~ */*~ */*/*~
  359. cleancontrib:
  360. find contrib -name \*~ -exec rm {} \;
  361. cleanelc:
  362. rm -f $(ELCFILES)
  363. cleandoc:
  364. -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf)
  365. -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  366. -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  367. -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf)
  368. -(cd doc && rm -rf manual)
  369. cleanrel:
  370. rm -rf RELEASEDIR
  371. rm -rf org-7.*
  372. rm -rf org-7*zip org-7*tar.gz
  373. .el.elc:
  374. $(ELC) $<
  375. push:
  376. git-push orgmode@orgmode.org:org-mode.git master
  377. pushtag:
  378. git-tag -m "Adding tag" -a $(TAG)
  379. git-push orgmode@orgmode.org:org-mode.git $(TAG)
  380. pushreleasetag:
  381. git-tag -m "Adding release tag" -a release_$(TAG)
  382. git-push orgmode@orgmode.org:org-mode.git release_$(TAG)
  383. # Dependencies
  384. lisp/org.elc: lisp/org-macs.el lisp/org-compat.el lisp/org-faces.el
  385. lisp/org-agenda.elc: lisp/org.el
  386. lisp/org-ascii.elc: lisp/org-exp.el
  387. lisp/org-attach.elc: lisp/org.el lisp/org-id.el
  388. lisp/org-archive.elc: lisp/org.el
  389. lisp/org-bbdb.elc: lisp/org.el
  390. lisp/org-beamer.elc: lisp/org.el
  391. lisp/org-bibtex.elc: lisp/org.el
  392. lisp/org-capture.elc: lisp/org.el lisp/org-mks.el
  393. lisp/org-clock.elc: lisp/org.el
  394. lisp/org-colview.elc: lisp/org.el
  395. lisp/org-colview-xemacs.elc: lisp/org.el
  396. lisp/org-compat.elc: lisp/org-macs.el
  397. lisp/org-crypt.elc: lisp/org-crypt.el lisp/org.el
  398. lisp/org-ctags.elc: lisp/org.el
  399. lisp/org-datetree.elc: lisp/org.el
  400. lisp/org-docview.elc: lisp/org.el
  401. lisp/org-entities.elc:
  402. lisp/org-exp.elc: lisp/org.el lisp/org-agenda.el
  403. lisp/org-exp-blocks.elc: lisp/org.el
  404. lisp/org-latex.elc: lisp/org.el lisp/org-exp.el lisp/org-beamer.el
  405. lisp/org-docbook.elc: lisp/org.el lisp/org-exp.el
  406. lisp/org-faces.elc: lisp/org-macs.el lisp/org-compat.el
  407. lisp/org-feed.elc: lisp/org.el
  408. lisp/org-footnotes.elc: lisp/org-macs.el lisp/org-compat.el
  409. lisp/org-freemind.elc: lisp/org.el
  410. lisp/org-gnus.elc: lisp/org.el
  411. lisp/org-html.elc: lisp/org-exp.el
  412. lisp/org-habit.elc: lisp/org.el lisp/org-agenda.el
  413. lisp/org-icalendar.elc: lisp/org-exp.el
  414. lisp/org-id.elc: lisp/org.el
  415. lisp/org-indent.elc: lisp/org.el lisp/org-macs.el lisp/org-compat.el
  416. lisp/org-info.elc: lisp/org.el
  417. lisp/org-inlinetask.elc:
  418. lisp/org-irc.elc: lisp/org.el
  419. lisp/org-jsinfo.elc: lisp/org.el lisp/org-exp.el
  420. lisp/org-list.elc: lisp/org-macs.el lisp/org-compat.el
  421. lisp/org-mac-message.elc: lisp/org.el
  422. lisp/org-macs.elc:
  423. lisp/org-mew.elc: lisp/org.el
  424. lisp/org-mhe.elc: lisp/org.el
  425. lisp/org-mks.elc:
  426. lisp/org-mobile.elc: lisp/org.el
  427. lisp/org-mouse.elc: lisp/org.el
  428. lisp/org-plot.elc: lisp/org.el lisp/org-exp.el lisp/org-table.el
  429. lisp/org-publish.elc:
  430. lisp/org-protocol.elc: lisp/org.el
  431. lisp/org-remember.elc: lisp/org.el
  432. lisp/org-rmail.elc: lisp/org.el
  433. lisp/org-special-blocks.elc: lisp/org-compat.el
  434. lisp/org-src.elc: lisp/org-macs.el lisp/org-compat.el
  435. lisp/org-table.elc: lisp/org.el
  436. lisp/org-taskjuggler.elc: lisp/org.el lisp/org-exp.el
  437. lisp/org-timer.elc: lisp/org.el
  438. lisp/org-vm.elc: lisp/org.el
  439. lisp/org-w3m.elc: lisp/org.el
  440. lisp/org-wl.elc: lisp/org.el
  441. lisp/org-xoxo.elc: lisp/org-exp.el