Makefile 7.3 KB

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