Makefile 6.3 KB

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