Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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 --no-split
  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. LISPFILES = org.el org-publish.el org-mouse.el org-export-latex.el org-install.el
  44. ELCFILES = $(LISPFILES:.el=.elc)
  45. DOCFILES = org.texi org.pdf org
  46. CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf
  47. TEXIFILES = org.texi
  48. INFOFILES = org
  49. HTMLDIR = /home/dominik/public_html/Tools/org
  50. HG_RELEASES = ../org-mode-all-releases-hg/
  51. .SUFFIXES: .el .elc .texi
  52. SHELL = /bin/sh
  53. DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} Makefile dir ChangeLog request-assign-future.txt
  54. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  55. all: $(ELCFILES)
  56. install: install-lisp
  57. doc: org.html org.pdf orgcard.pdf
  58. p:
  59. make pdf && open org.pdf
  60. c:
  61. make card && gv orgcard.ps
  62. install-lisp: $(LISPFILES) $(ELCFILES)
  63. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  64. $(CP) $(LISPFILES) $(lispdir)
  65. $(CP) $(ELCFILES) $(lispdir)
  66. install-info: $(INFOFILES)
  67. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  68. $(CP) $(INFOFILES) $(infodir)
  69. install-noutline: xemacs/noutline.elc
  70. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  71. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  72. org.elc: org.el
  73. org-publish.elc: org-publish.el
  74. org-install.elc: org-install.el
  75. xemacs/noutline.elc: xemacs/noutline.el
  76. org: org.texi
  77. $(MAKEINFO) --no-split org.texi -o org
  78. org.pdf: org.texi
  79. $(TEXI2PDF) org.texi
  80. org.html: org.texi
  81. $(TEXI2HTML) -o org.html org.texi
  82. orgcard.dvi: orgcard.tex
  83. tex orgcard.tex
  84. orgcard.pdf: orgcard.dvi
  85. dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
  86. orgcard.ps: orgcard.dvi
  87. dvips -t landscape -o orgcard.ps orgcard.dvi
  88. orgcard_letter.dvi: orgcard.tex
  89. perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
  90. tex orgcard_letter.tex
  91. orgcard_letter.pdf: orgcard_letter.dvi
  92. dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
  93. orgcard_letter.ps: orgcard_letter.dvi
  94. dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
  95. # Below here are special targets for maintenance only
  96. info:
  97. $(MAKEINFO) --no-split org.texi -o org
  98. pdf: org.pdf
  99. card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
  100. xcompile:
  101. xemacs -batch -q -f batch-byte-compile $(LISPFILES)
  102. ecompile:
  103. emacs -batch -q -f batch-byte-compile $(LISPFILES)
  104. distfile:
  105. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  106. touch org.texi orgcard.tex
  107. make info
  108. make doc
  109. rm -rf org-$(TAG) org-$(TAG).zip
  110. $(MKDIR) org-$(TAG)
  111. $(MKDIR) org-$(TAG)/xemacs
  112. cp $(DISTFILES) org-$(TAG)/
  113. cp $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  114. zip -r org-$(TAG).zip org-$(TAG)
  115. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  116. release:
  117. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  118. make distfile
  119. make doc
  120. rm -rf org-release
  121. $(MKDIR) org-release
  122. cp org-$(TAG).zip org-$(TAG).tar.gz org-release
  123. cp org.pdf orgcard.pdf org.texi org.html org-release
  124. cp ORGWEBPAGE/tmp/*.html org-release
  125. cp ORGWEBPAGE/tmp/*.el org-release
  126. cp ORGWEBPAGE/tmp/*.txt org-release
  127. cp ORGWEBPAGE/tmp/*.css org-release
  128. cp ORGWEBPAGE/tmp/*.jpg org-release
  129. # cp ORGWEBPAGE/tmp/*.tar.gz org-release
  130. # cp ORGWEBPAGE/tmp/*.zip org-release
  131. cp org-release/org-$(TAG).zip org-release/org.zip
  132. cp org-release/org-$(TAG).tar.gz org-release/org.tar.gz
  133. (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
  134. cp -r org-$(TAG)/* $(HG_RELEASES)
  135. (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
  136. trackrelease:
  137. (cd $(HG_RELEASES); rm -rf $(DISTFILES) xemacs)
  138. cp -r org-$(TAG)/* $(HG_RELEASES)
  139. (cd $(HG_RELEASES); hg addremove; hg ci -m $(TAG); hg tag $(TAG))
  140. dist:
  141. make distfile TAG=$(TAG)
  142. cp org-$(TAG).zip org-$(TAG).tar.gz $(HTMLDIR)
  143. rm -f $(HTMLDIR)/org.zip $(HTMLDIR)/org.tar.gz
  144. (cd $(HTMLDIR); ln -s org-$(TAG).zip org.zip)
  145. (cd $(HTMLDIR); ln -s org-$(TAG).tar.gz org.tar.gz)
  146. make doc
  147. cp org.pdf orgcard.pdf org.texi org.html $(HTMLDIR)
  148. minidist:
  149. rm -f org-$(TAG).zip
  150. zip org-$(TAG).zip org.el
  151. scp org-$(TAG).zip remote.science.uva.nl:public_html/Tools/org/
  152. clean:
  153. rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
  154. rm -f *~
  155. rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
  156. rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
  157. .el.elc:
  158. $(ELC) $<