Makefile 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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 org-macs.el \
  48. org-table.el org-exp.el org-remember.el org-agenda.el\
  49. org-publish.el org-mouse.el org-export-latex.el \
  50. org-bbdb.el org-gnus.el org-info.el org-irc.el \
  51. org-mac-message.el org-mhe.el org-rmail.el org-vm.el org-wl.el
  52. LISPFILES0 = $(LISPF:%=lisp/%)
  53. LISPFILES = $(LISPFILES0) lisp/org-install.el
  54. ELCFILES0 = $(LISPFILES0:.el=.elc)
  55. ELCFILES = $(LISPFILES:.el=.elc)
  56. DOCFILES = org.texi org.pdf org
  57. CARDFILES = doc/orgcard.tex doc/orgcard.pdf doc/orgcard_letter.pdf
  58. TEXIFILES = doc/org.texi
  59. INFOFILES = org
  60. HG_RELEASES = ../org-mode-all-releases-hg/
  61. .SUFFIXES: .el .elc .texi
  62. SHELL = /bin/sh
  63. DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} \
  64. Makefile dir ChangeLog request-assign-future.txt \
  65. CONTRIB
  66. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  67. all: $(ELCFILES)
  68. compile: $(ELCFILES0)
  69. install: install-lisp
  70. doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf
  71. p:
  72. make pdf && open doc/org.pdf
  73. c:
  74. make card && gv doc/orgcard.ps
  75. install-lisp: $(LISPFILES) $(ELCFILES)
  76. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  77. $(CP) $(LISPFILES) $(lispdir)
  78. $(CP) $(ELCFILES) $(lispdir)
  79. install-info: $(INFOFILES)
  80. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  81. $(CP) $(INFOFILES) $(infodir)
  82. install-noutline: xemacs/noutline.elc
  83. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  84. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  85. autoloads: lisp/org-install.el
  86. lisp/org-install.el: $(LISPFILES0) Makefile
  87. $(BATCH) --eval "(require 'autoload)" \
  88. --eval '(find-file "org-install.el")' \
  89. --eval '(erase-buffer)' \
  90. --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \
  91. --eval '(insert "\n(provide (quote org-install))\n")' \
  92. --eval '(save-buffer)'
  93. mv org-install.el lisp
  94. xemacs/noutline.elc: xemacs/noutline.el
  95. doc/org: doc/org.texi
  96. (cd doc; $(MAKEINFO) --no-split org.texi -o org)
  97. doc/org.pdf: doc/org.texi
  98. (cd doc; $(TEXI2PDF) org.texi)
  99. doc/org.html: doc/org.texi
  100. (cd doc; $(TEXI2HTML) --no-split -o org.html org.texi)
  101. doc/orgcard.dvi: doc/orgcard.tex
  102. (cd doc; tex orgcard.tex)
  103. doc/orgcard.pdf: doc/orgcard.dvi
  104. dvips -q -f -t landscape doc/orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard.pdf -c .setpdfwrite -
  105. doc/orgcard.ps: doc/orgcard.dvi
  106. dvips -t landscape -o doc/orgcard.ps doc/orgcard.dvi
  107. doc/orgcard_letter.dvi: doc/orgcard.tex
  108. perl -pe 's/letterpaper=0/letterpaper=1/' doc/orgcard.tex > doc/orgcard_letter.tex
  109. (cd doc; tex orgcard_letter.tex)
  110. doc/orgcard_letter.pdf: doc/orgcard_letter.dvi
  111. dvips -q -f -t landscape doc/orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=doc/orgcard_letter.pdf -c .setpdfwrite -
  112. doc/orgcard_letter.ps: doc/orgcard_letter.dvi
  113. dvips -t landscape -o doc/orgcard_letter.ps doc/orgcard_letter.dvi
  114. # Below here are special targets for maintenance only
  115. webfiles:
  116. (cd ORGWEBPAGE; emacs -batch -l ~/.emacs index.org -f org-publish-current-project)
  117. web:
  118. make webfiles
  119. (cd ORGWEBPAGE/tmp; lftp -f ../../../org-mode-proprietary/ftp_upload_website)
  120. html: doc/org.html
  121. html_split: doc/org.texi
  122. rm -rf doc/manual
  123. mkdir doc/manual
  124. $(TEXI2HTML) -o doc/manual doc/org.texi
  125. info: doc/org
  126. pdf: doc/org.pdf
  127. card: doc/orgcard.pdf doc/orgcard.ps doc/orgcard_letter.pdf doc/orgcard_letter.ps
  128. distfile:
  129. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  130. touch org.texi orgcard.tex
  131. make info
  132. make doc
  133. make org-install.el
  134. rm -rf org-$(TAG) org-$(TAG).zip
  135. $(MKDIR) org-$(TAG)
  136. $(MKDIR) org-$(TAG)/xemacs
  137. cp -r $(DISTFILES) org-$(TAG)/
  138. cp -r $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  139. zip -r org-$(TAG).zip org-$(TAG)
  140. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  141. release:
  142. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  143. make webfiles
  144. make distfile
  145. make doc
  146. make html_split
  147. rm -rf RELEASEDIR
  148. $(MKDIR) RELEASEDIR
  149. cp org-$(TAG).zip org-$(TAG).tar.gz RELEASEDIR
  150. cp org.pdf orgcard.pdf org.texi org.html RELEASEDIR
  151. cp ORGWEBPAGE/tmp/*.html RELEASEDIR
  152. # cp ORGWEBPAGE/tmp/*.el RELEASEDIR
  153. cp ORGWEBPAGE/tmp/*.txt RELEASEDIR
  154. cp ORGWEBPAGE/tmp/*.css RELEASEDIR
  155. # cp ORGWEBPAGE/tmp/*.jpg RELEASEDIR
  156. cp RELEASEDIR/org-$(TAG).zip RELEASEDIR/org.zip
  157. cp RELEASEDIR/org-$(TAG).tar.gz RELEASEDIR/org.tar.gz
  158. (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
  159. cp -r org-$(TAG)/* $(HG_RELEASES)
  160. (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
  161. trackrelease:
  162. (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
  163. cp -r org-$(TAG)/* $(HG_RELEASES)
  164. (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
  165. upload_release:
  166. (cd RELEASEDIR; lftp -f ../../org-mode-proprietary/ftp_upload_release)
  167. upload_manual:
  168. lftp -f ../org-mode-proprietary/ftp_upload_manual
  169. relup:
  170. make release
  171. make upload_release
  172. make upload_manual
  173. clean:
  174. rm -f $(ELCFILES)
  175. (cd doc; rm -f org.pdf org org.html orgcard.pdf orgcard.ps)
  176. rm -f *~ */*~ */*/*~
  177. (cd doc; rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs)
  178. (cd doc; rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps)
  179. (cd doc; rm -f orgcard_letter.tex orgcard_letter.pdf)
  180. rm -rf doc/manual
  181. rm -rf RELEASEDIR
  182. .el.elc:
  183. $(ELC) $<
  184. push:
  185. git-push git+ssh://repo.or.cz/srv/git/org-mode.git master
  186. pushtag:
  187. git-tag -m "Adding tag" -a $(TAG)
  188. git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG)