Makefile 6.5 KB

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