Makefile 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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)/info
  19. ##----------------------------------------------------------------------
  20. ## YOU MAY NEED TO EDIT THESE
  21. ##----------------------------------------------------------------------
  22. # Using emacs in batch mode.
  23. # BATCH=$(EMACS) -batch -q
  24. # BATCH=$(EMACS) -batch -q -eval "(add-to-list (quote load-path) \".\")"
  25. BATCH=$(EMACS) -batch -q -eval \
  26. "(progn (add-to-list (quote load-path) \".\") \
  27. (add-to-list (quote load-path) \"$(lispdir)\"))"
  28. # Specify the byte-compiler for compiling org-mode files
  29. ELC= $(BATCH) -f batch-byte-compile
  30. # How to make a pdf file from a texinfo file
  31. TEXI2PDF = texi2pdf
  32. # How to create directories
  33. MKDIR = mkdir -p
  34. # How to create the info files from the texinfo file
  35. MAKEINFO = makeinfo
  36. # How to create the HTML file
  37. TEXI2HTML = makeinfo --html --number-sections
  38. # How to move the byte compiled files to their destination.
  39. MV = mv
  40. # How to copy the lisp files to their distination.
  41. CP = cp -p
  42. ##----------------------------------------------------------------------
  43. ## BELOW THIS LINE ON YOUR OWN RISK!
  44. ##----------------------------------------------------------------------
  45. # The following variables need to be defined by the maintainer
  46. LISPF = org.el \
  47. org-compat.el \
  48. org-macs.el \
  49. org-clock.el \
  50. org-table.el \
  51. org-exp.el \
  52. org-remember.el \
  53. org-agenda.el \
  54. org-publish.el \
  55. org-mouse.el \
  56. org-export-latex.el \
  57. org-bbdb.el \
  58. org-bibtex.el \
  59. org-gnus.el \
  60. org-info.el \
  61. org-irc.el \
  62. org-mac-message.el \
  63. org-mhe.el \
  64. org-rmail.el \
  65. org-vm.el \
  66. org-wl.el
  67. LISPFILES0 = $(LISPF:%=lisp/%)
  68. LISPFILES = $(LISPFILES0) lisp/org-install.el
  69. ELCFILES0 = $(LISPFILES0:.el=.elc)
  70. ELCFILES = $(LISPFILES:.el=.elc)
  71. DOCFILES = doc/org.texi doc/org.pdf doc/org doc/dir
  72. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  73. TEXIFILES = doc/org.texi
  74. INFOFILES = doc/org
  75. .SUFFIXES: .el .elc .texi
  76. SHELL = /bin/sh
  77. # Additional distribution files
  78. DISTFILES_extra= Makefile ChangeLog request-assign-future.txt CONTRIB
  79. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  80. default: $(ELCFILES)
  81. all: $(ELCFILES) $(INFOFILES)
  82. compile: $(ELCFILES0)
  83. install: install-lisp
  84. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
  85. p:
  86. make pdf && open doc/org.pdf
  87. c:
  88. make card && gv doc/orgcard.ps
  89. install-lisp: $(LISPFILES) $(ELCFILES)
  90. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  91. $(CP) $(LISPFILES) $(lispdir)
  92. $(CP) $(ELCFILES) $(lispdir)
  93. install-info: $(INFOFILES)
  94. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  95. $(CP) $(INFOFILES) $(infodir)
  96. install-noutline: xemacs/noutline.elc
  97. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  98. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  99. autoloads: lisp/org-install.el
  100. lisp/org-install.el: $(LISPFILES0) Makefile
  101. $(BATCH) --eval "(require 'autoload)" \
  102. --eval '(find-file "org-install.el")' \
  103. --eval '(erase-buffer)' \
  104. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  105. --eval '(insert "\n(provide (quote org-install))\n")' \
  106. --eval '(save-buffer)'
  107. mv org-install.el lisp
  108. xemacs/noutline.elc: xemacs/noutline.el
  109. doc/org: doc/org.texi
  110. (cd doc; $(MAKEINFO) --no-split org.texi -o org)
  111. doc/org.pdf: doc/org.texi
  112. (cd doc; $(TEXI2PDF) org.texi)
  113. doc/org.html: doc/org.texi
  114. (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
  115. doc/orgcard.dvi: doc/orgcard.tex
  116. (cd doc; tex orgcard.tex)
  117. doc/orgcard.pdf: doc/orgcard.dvi
  118. dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
  119. doc/orgcard.ps: doc/orgcard.dvi
  120. dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
  121. doc/orgcard_letter.dvi: doc/orgcard.tex
  122. perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
  123. (cd doc; tex orgcard_letter.tex)
  124. doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
  125. dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
  126. doc/orgcard_letter.ps: doc/orgcard_letter.dvi
  127. dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
  128. # Below here are special targets for maintenance only
  129. webfiles:
  130. (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -eval '(org-publish (assoc "orgwebpage" org-publish-project-alist))')
  131. (cd ORGWEBPAGE/tmp; rm *~)
  132. web:
  133. make webfiles
  134. (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website_legito)
  135. html: doc/org.html
  136. html_manual: doc/org.texi
  137. rm -rf doc/manual
  138. mkdir doc/manual
  139. $(TEXI2HTML) -o doc/manual doc/org.texi
  140. info: doc/org
  141. pdf: doc/org.pdf
  142. card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
  143. distfile:
  144. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  145. touch doc/org.texi doc/orgcard.tex # force update
  146. make info
  147. make doc
  148. make lisp/org-install.el
  149. rm -rf org-$(TAG) org-$(TAG).zip
  150. $(MKDIR) org-$(TAG)
  151. $(MKDIR) org-$(TAG)/xemacs
  152. $(MKDIR) org-$(TAG)/doc
  153. $(MKDIR) org-$(TAG)/lisp
  154. cp -r $(LISPFILES) org-$(TAG)/lisp
  155. cp -r $(DOCFILES) $(CARDFILES) org-$(TAG)/doc
  156. cp -r $(DISTFILES_extra) org-$(TAG)/
  157. cp -r README_DIST org-$(TAG)/README
  158. cp -r ORGWEBPAGE/Changes.org org-$(TAG)/
  159. cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  160. zip -r org-$(TAG).zip org-$(TAG)
  161. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  162. release:
  163. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  164. make webfiles
  165. make distfile
  166. make doc
  167. make html_manual
  168. rm -rf RELEASEDIR
  169. $(MKDIR) RELEASEDIR
  170. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  171. cp doc/org.pdf doc/orgcard.pdf doc/org.texi doc/org.html RELEASEDIR
  172. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  173. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  174. upload_release:
  175. (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release_legito)
  176. upload_manual:
  177. lftp -f ../org-mode-proprietary/ftp_upload_manual_legito
  178. relup:
  179. make release
  180. make upload_release
  181. make upload_manual
  182. cleanelc:
  183. rm -f $(ELCFILES)
  184. cleandoc:
  185. (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
  186. (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  187. (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  188. (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
  189. (cd doc; rm -rf manual)
  190. clean:
  191. make cleanelc
  192. make cleandoc
  193. rm -f *~ */*~ */*/*~
  194. rm -rf RELEASEDIR
  195. .el.elc:
  196. $(ELC) $<
  197. push:
  198. git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
  199. pushtag:
  200. git-tag -m "Adding tag" -a $(TAG)
  201. git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)