Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. # Specify the byte-compiler for compiling org-mode files
  25. ELC= $(BATCH) -f batch-byte-compile
  26. # How to make a pdf file from a texinfo file
  27. TEXI2PDF = texi2pdf
  28. # How to create directories
  29. MKDIR = mkdir -p
  30. # How to create the info files from the texinfo file
  31. MAKEINFO = makeinfo
  32. # How to create the HTML file
  33. TEXI2HTML = makeinfo --html --number-sections --no-split
  34. # How to move the byte compiled files to their destination.
  35. MV = mv
  36. # How to copy the lisp files to their distination.
  37. CP = cp -p
  38. ##----------------------------------------------------------------------
  39. ## BELOW THIS LINE ON YOUR OWN RISK!
  40. ##----------------------------------------------------------------------
  41. # The following variables need to be defined by the maintainer
  42. LISPFILES = org.el org-publish.el org-mouse.el org-install.el
  43. ELCFILES = $(LISPFILES:.el=.elc)
  44. DOCFILES = org.texi org.pdf org
  45. CARDFILES = orgcard.tex orgcard.pdf orgcard_letter.pdf orgcard_letter.ps
  46. TEXIFILES = org.texi
  47. INFOFILES = org
  48. HTMLDIR = /home/dominik/public_html/Tools/org
  49. .SUFFIXES: .el .elc .texi
  50. SHELL = /bin/sh
  51. DISTFILES= README ${LISPFILES} ${DOCFILES} ${CARDFILES} Makefile
  52. DISTFILES_xemacs= xemacs/noutline.el xemacs/ps-print-invisible.el xemacs/README
  53. all: $(ELCFILES)
  54. install: install-lisp
  55. doc: org.html org.pdf orgcard.pdf
  56. p:
  57. make pdf && open org.pdf
  58. c:
  59. make card && gv orgcard.ps
  60. install-lisp: $(LISPFILES) $(ELCFILES)
  61. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  62. $(CP) $(LISPFILES) $(lispdir)
  63. $(CP) $(ELCFILES) $(lispdir)
  64. install-info: $(INFOFILES)
  65. if [ ! -d $(infodir) ]; then $(MKDIR) $(infodir); else true; fi ;
  66. $(CP) $(INFOFILES) $(infodir)
  67. install-noutline: xemacs/noutline.elc
  68. if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ;
  69. $(CP) xemacs/noutline.el xemacs/noutline.elc $(lispdir)
  70. org.elc: org.el
  71. org-publish.elc: org-publish.el
  72. org-install.elc: org-install.el
  73. xemacs/noutline.elc: xemacs/noutline.el
  74. org: org.texi
  75. $(MAKEINFO) --no-split org.texi -o org
  76. org.pdf: org.texi
  77. $(TEXI2PDF) org.texi
  78. org.html: org.texi
  79. $(TEXI2HTML) -o org.html org.texi
  80. orgcard.dvi: orgcard.tex
  81. tex orgcard.tex
  82. orgcard.pdf: orgcard.dvi
  83. dvips -q -f -t landscape orgcard.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard.pdf -c .setpdfwrite -
  84. orgcard.ps: orgcard.dvi
  85. dvips -t landscape -o orgcard.ps orgcard.dvi
  86. orgcard_letter.dvi: orgcard.tex
  87. perl -pe 's/letterpaper=0/letterpaper=1/' orgcard.tex > orgcard_letter.tex
  88. tex orgcard_letter.tex
  89. orgcard_letter.pdf: orgcard_letter.dvi
  90. dvips -q -f -t landscape orgcard_letter.dvi | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=orgcard_letter.pdf -c .setpdfwrite -
  91. orgcard_letter.ps: orgcard_letter.dvi
  92. dvips -t landscape -o orgcard_letter.ps orgcard_letter.dvi
  93. # Below here are special targets for maintenance only
  94. info:
  95. $(MAKEINFO) --no-split org.texi -o org
  96. pdf: org.pdf
  97. card: orgcard.pdf orgcard.ps orgcard_letter.pdf orgcard_letter.ps
  98. xcompile:
  99. xemacs -batch -q -f batch-byte-compile $(LISPFILES)
  100. ecompile:
  101. emacs -batch -q -f batch-byte-compile $(LISPFILES)
  102. distfile:
  103. @if [ "X$(TAG)" = "X" ]; then echo "*** No tag ***"; exit 1; fi
  104. touch org.texi orgcard.tex
  105. make info
  106. make doc
  107. rm -rf org-$(TAG) org-$(TAG).zip
  108. $(MKDIR) org-$(TAG)
  109. $(MKDIR) org-$(TAG)/xemacs
  110. cp $(DISTFILES) org-$(TAG)/
  111. cp $(DISTFILES_xemacs) org-$(TAG)/xemacs/
  112. zip -r org-$(TAG).zip org-$(TAG)
  113. gtar zcvf org-$(TAG).tar.gz org-$(TAG)
  114. dist:
  115. make distfile TAG=$(TAG)
  116. cp org-$(TAG).zip org-$(TAG).tar.gz $(HTMLDIR)
  117. rm -f $(HTMLDIR)/org.zip $(HTMLDIR)/org.tar.gz
  118. (cd $(HTMLDIR); ln -s org-$(TAG).zip org.zip)
  119. (cd $(HTMLDIR); ln -s org-$(TAG).tar.gz org.tar.gz)
  120. make doc
  121. cp org.pdf orgcard.pdf org.texi org.html $(HTMLDIR)
  122. minidist:
  123. rm -f org-$(TAG).zip
  124. zip org-$(TAG).zip org.el
  125. scp org-$(TAG).zip remote.science.uva.nl:public_html/Tools/org/
  126. clean:
  127. rm -f $(ELCFILES) org.pdf org org.html orgcard.pdf orgcard.ps
  128. rm -f *~
  129. rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
  130. rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
  131. .el.elc:
  132. $(ELC) $<