Makefile 6.6 KB

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