Makefile 10 KB

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