Makefile 5.0 KB

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