Makefile 6.8 KB

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